4 - gdk_pointer_grab() and gdk_keyboard_grab() are logically member
5 functions of GdkWindow.
7 X specific Functions that need to be moved out of the common header files
8 =========================================================================
11 Dir structure for ports
12 =======================
14 The directory structure here is:
21 The gdk/ directory directly contains all public
22 header files (that are not specific to one
25 There, in general should be no system dependency
27 For each set of functionality, there are the following
30 gdkwindow.h: public header file
31 gdkwindow.c: common implementation
32 x11/gdkwindow.i: functionality specific to X11
33 win32/gdkwindow.i: functionality specific to win32
35 The gdkwindow.c file looks like:
38 #include "gdkwindow.h"
40 #ifdef GDK_WINDOWING_X11
41 #include "x11/gdkwindow.i"
42 #elif defined(GDK_WINDOW_WIN32)
43 #include "win32/gdkwindow.i"
46 [ generic implementation bits ]
49 x11/gdkwindow.i should only assume that gdkwindow.h has been
50 included and included all other dependencies explicitely.
52 The x11/ directory will contain:
55 .c files specific to X
56 .h files specific to X
58 And a Makefile.am that takes care of distributing the
59 files in the directory, and also for building any
60 X-specific utilities. (Such as the gxid daemon).
68 Much of the contents have been moved to x11/gtkmain.c.
69 I've added a little argument-parsing abstraction.
70 (Currently called gdk_arg_context_*) that allows
71 arguments from multiple places to be combined - that
72 probably needs to be either fixed up and moved into
73 GLib or replaced with some existing solution like
78 This will be removed for GTK+-1.4. Right now, it has been moved
79 completely into the x11/ directory to avoid having to port it.
83 There are a few common utility functions, and the rest
84 is in the port-specific files.
88 No shared code - completely port-specific.
92 No shared code - completely arch-specific. It's possible that some
93 common code for handling GdkDragContext could exist, but the
94 GdkDragContextPrivate will be different on each port.
98 Pretty much done. GdkDrawable is completely virtualized.
102 There are a few common utility functions, and the rest
103 is in the port-specific files.
107 Pretty much done for now - gdkfont.c contains a number of functions
108 reimplemented as utility functions, and the rest is
109 ports-specific. It will be obsoleted by pango before 1.4.
113 GdkGC is virtualized to go along with GdkDrawable. There are
114 a couple of functions I punted on for now and moved into the
115 port-specific files - the clipmask functions (because gdkregion
116 is not finalized) and also gdk_gc_copy, which I'm not sure
117 I like enough to put into the vtable.
121 All in the port-specific directories. The abstraction here probably
122 will be changed at some point to something more convenient and
127 GdkImage is virtualized - all of the code except for ref/unref
128 is in the port-specific files.
132 Right now all the code is port-specific. It should be possible
133 to share the code in gdkinputnone.c, but probably not worth it;
134 I'd like to get rid of the gdk_input_vtable in X11 code -
135 it doesn't make sense since you can't switch the type of input
140 All moved into the port-specific file for now. The xpm loader
141 should be changed to render with GdkRGB, and thus be
142 windowing-system independent, but that requires
143 first making GdkRGB able to render onto any arbitrary visual.
147 All port-specific. Possibly should be X-specific with a higher-level
148 clipboard API on top of it.
152 Right now punted to being port-specific, but that probably needs
153 to change with the virtualized drawables and GC's.
157 With a few changes to debugging code, it was already port-independent.
161 Completely port specific. (In fact, really doesn't make sense
162 on anything other than X; a higher-level clipboard facility
163 should be provided somewhere, though.)
167 Completely port-specific. (The concepts are rather X-specific)
171 The window-private data is split between windowing-system independent
172 parts and windowing system dependent parts. There are a few
173 functions in gdk/gdkwindow.c and the rest is moved off
174 into x11/gdkwindow-x11.c
179 The concept of virtualization is that calls to draw
180 on a drawable are dispatched through a function table.
181 This potentially allows for:
186 It also provides a nice clean framework for multi-windowing
187 support - instead of reimplementing a whole bunch of function
188 calls, one provides an implementaiton for the vtables.
190 X works in this way internally - per-screen functions are
191 virtualized inside a screen structure, and drawing functions
192 are virtualized inside the GC structure.
194 For the virtualization of drawing, clearly GdkDrawable needs
195 to be virtualized. Beyond that, one has to decide on
196 a case-by-case basis whether a particular structure is
197 drawing-mode independent (like GdkRectangle) or not.
199 The most important GDK structures that are involved drawing are:
206 The whole font aspect of Gdk is going to get heavily
207 reworked with the introduction of "Pango".
208 GdkRegion almost certainly needs to be virtualized,
209 if you, way, want to do postscript drawables.
211 While doing so, the API of GdkRegion should be
212 changed so that the region operations take 3 parameters
213 instead of returning a newly created region.
241 Adding multi-screen, display support.
242 =====================================
244 The following functions need to have per-display variants:
246 void gdk_pointer_ungrab (guint32 time);
247 void gdk_keyboard_ungrab (guint32 time);
248 gint gdk_pointer_is_grabbed (void);
250 gint gdk_screen_width (void);
251 gint gdk_screen_height (void);
253 gint gdk_screen_width_mm (void);
254 gint gdk_screen_height_mm (void);
256 void gdk_beep (void);
258 gint gdk_visual_get_best_depth (void);
259 GdkVisualType gdk_visual_get_best_type (void);
260 GdkVisual* gdk_visual_get_system (void);
261 GdkVisual* gdk_visual_get_best (void);
262 GdkVisual* gdk_visual_get_best_with_depth (gint depth);
263 GdkVisual* gdk_visual_get_best_with_type (GdkVisualType visual_type);
264 GdkVisual* gdk_visual_get_best_with_both (gint depth,
265 GdkVisualType visual_type);
267 void gdk_query_depths (gint **depths,
269 void gdk_query_visual_types (GdkVisualType **visual_types,
272 GList* gdk_list_visuals (void);
274 void gdk_add_client_message_filter (GdkAtom message_type,
278 guint32 gdk_drag_get_protocol (guint32 xid,
279 GdkDragProtocol *protocol);
281 GdkCursor* gdk_cursor_new (GdkCursorType cursor_type);
282 GdkCursor* gdk_cursor_new_from_pixmap (GdkPixmap *source,
288 GdkColormap* gdk_colormap_get_system (void);
289 gint gdk_colormap_get_system_size (void);
291 GdkFont* gdk_font_load (const gchar *font_name);
292 GdkFont* gdk_fontset_load (gchar *fontset_name);
294 gint gdk_selection_owner_set (GdkWindow *owner,
298 GdkWindow* gdk_selection_owner_get (GdkAtom selection);
300 void gdk_selection_send_notify (guint32 requestor,
305 gint gdk_text_property_to_text_list (GdkAtom encoding, gint format,
306 guchar *text, gint length,
308 void gdk_free_text_list (gchar **list);
309 gint gdk_string_to_compound_text (gchar *str,
310 GdkAtom *encoding, gint *format,
311 guchar **ctext, gint *length);
312 void gdk_free_compound_text (guchar *ctext);
313 GdkAtom gdk_atom_intern (const gchar *atom_name,
314 gint only_if_exists);
315 gchar* gdk_atom_name (GdkAtom atom);
316 GList *gdk_input_list_devices (void);
317 void gdk_input_set_source (guint32 deviceid,
318 GdkInputSource source);
319 gint gdk_input_set_mode (guint32 deviceid,
321 void gdk_input_set_axes (guint32 deviceid,
323 void gdk_input_set_key (guint32 deviceid,
326 GdkModifierType modifiers);
327 gint gdk_im_ready (void);
328 void gdk_im_end (void);
329 GdkIC* gdk_ic_new (GdkICAttr *attr,
330 GdkICAttributesType mask);
331 GdkRegion* gdk_region_new (void);
332 void gdk_event_send_clientmessage_toall (GdkEvent *event);
333 gboolean gdk_event_send_client_message (GdkEvent *event,
338 void gdk_error_trap_push (void);
339 gint gdk_error_trap_pop (void);