]> Pileus Git - ~andy/gtk/blob - gdk/TODO
remove generated files
[~andy/gtk] / gdk / TODO
1 General
2 =======
3
4 - gdk_pointer_grab() and gdk_keyboard_grab() are logically member
5   functions of GdkWindow.
6
7 X specific Functions that need to be moved out of the common header files
8 =========================================================================
9
10
11 Dir structure for ports
12 =======================
13
14 The directory structure here is:
15
16  gdk/
17  gdk/x11
18  gdk/win32
19  ...
20  
21 The gdk/ directory directly contains all public
22 header files (that are not specific to one 
23 windowing system).
24
25 There, in general should be no system dependency 
26
27 For each set of functionality, there are the following
28 files:
29
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
34
35 The gdkwindow.c file looks like:
36
37 ====
38 #include "gdkwindow.h"
39
40 #ifdef GDK_WINDOWING_X11
41 #include "x11/gdkwindow.i"
42 #elif defined(GDK_WINDOW_WIN32)
43 #include "win32/gdkwindow.i"
44  fo#endif
45
46 [ generic implementation bits ]
47 ====
48
49 x11/gdkwindow.i should only assume that gdkwindow.h has been
50 included and included all other dependencies explicitely.
51
52 The x11/ directory will contain:
53
54  .i files
55  .c files specific to X
56  .h files specific to X
57
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).
61
62
63 Port Status for Files
64 =====================
65
66 gdk
67
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
74  popt.
75
76 gdkcc
77
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.
80
81 gdkcolor
82
83  There are a few common utility functions, and the rest
84  is in the port-specific files.
85
86 gdkcursor
87
88  No shared code - completely port-specific.
89
90 gdkdnd
91
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.
95
96 gdkdrawable
97
98  Pretty much done. GdkDrawable is completely virtualized.
99
100 gdkevents
101
102  There are a few common utility functions, and the rest
103  is in the port-specific files.
104
105 gdkfont
106
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.
110
111 gdkgc
112
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.
118
119 gdkim
120
121  All in the port-specific directories. The abstraction here probably
122  will be changed at some point to something more convenient and
123  more Unicode-based.
124
125 gdkimage
126
127  GdkImage is virtualized - all of the code except for ref/unref
128  is in the port-specific files.
129
130 gdkinput
131
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
136  on the fly.
137
138 gdkpixmap
139
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.
144
145 gdkproperty
146
147  All port-specific. Possibly should be X-specific with a higher-level
148  clipboard API on top of it.
149
150 gdkregion
151
152  Right now punted to being port-specific, but that probably needs
153  to change with the virtualized drawables and GC's.
154
155 gdkrgb
156
157  With a few changes to debugging code, it was already port-independent.
158
159 gdkselection
160
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.)
164
165 gdkvisual
166  
167  Completely port-specific. (The concepts are rather X-specific)
168
169 gdkwindow
170
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
175
176 Virtualization
177 ==============
178
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:
182
183  Postscript drawables
184  metafiles
185
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.
189
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.
193
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.
198
199 The most important GDK structures that are involved drawing are:
200
201  GdkColor
202  GdkGC
203  GdkFont
204  GdkRegion
205
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.
210
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.
214
215
216 Drawable operations:
217   destroy
218   create_gc
219   get_values
220   set_values
221   set_dashes
222   copy
223
224 GC Operations:
225   draw_point
226   draw_line
227   draw_rectangle
228   draw_arc
229   draw_polygon
230   draw_string
231   draw_text
232   draw_text_wc
233   draw_pixmap
234   draw_bitmap
235   draw_image
236   draw_points
237   draw_segments
238   draw_lines
239
240
241 Adding multi-screen, display support.
242 =====================================
243
244  The following functions need to have per-display variants:
245
246 void gdk_pointer_ungrab (guint32         time);
247 void gdk_keyboard_ungrab (guint32         time);
248 gint gdk_pointer_is_grabbed (void);
249
250 gint gdk_screen_width  (void);
251 gint gdk_screen_height (void);
252
253 gint gdk_screen_width_mm  (void);
254 gint gdk_screen_height_mm (void);
255
256 void gdk_beep (void);
257
258 void gdk_key_repeat_disable (void);
259 void gdk_key_repeat_restore (void);
260
261 gint          gdk_visual_get_best_depth      (void);
262 GdkVisualType gdk_visual_get_best_type       (void);
263 GdkVisual*    gdk_visual_get_system          (void);
264 GdkVisual*    gdk_visual_get_best            (void);
265 GdkVisual*    gdk_visual_get_best_with_depth (gint           depth);
266 GdkVisual*    gdk_visual_get_best_with_type  (GdkVisualType  visual_type);
267 GdkVisual*    gdk_visual_get_best_with_both  (gint           depth,
268                                               GdkVisualType  visual_type);
269
270 void gdk_query_depths       (gint           **depths,
271                              gint            *count);
272 void gdk_query_visual_types (GdkVisualType  **visual_types,
273                              gint            *count);
274
275 GList* gdk_list_visuals (void);
276
277 void gdk_add_client_message_filter (GdkAtom       message_type,
278                                     GdkFilterFunc func,
279                                     gpointer      data);
280
281 guint32         gdk_drag_get_protocol (guint32          xid,
282                                        GdkDragProtocol *protocol);
283
284 GdkCursor* gdk_cursor_new                (GdkCursorType   cursor_type);
285 GdkCursor* gdk_cursor_new_from_pixmap    (GdkPixmap       *source,
286                                           GdkPixmap       *mask,
287                                           GdkColor        *fg,
288                                           GdkColor        *bg,
289                                           gint             x,
290                                           gint             y);
291 GdkColormap* gdk_colormap_get_system       (void);
292 gint         gdk_colormap_get_system_size  (void);
293
294 GdkFont* gdk_font_load      (const gchar    *font_name);
295 GdkFont* gdk_fontset_load   (gchar          *fontset_name);
296
297 gint       gdk_selection_owner_set (GdkWindow    *owner,
298                                     GdkAtom       selection,
299                                     guint32       time,
300                                     gint          send_event);
301 GdkWindow* gdk_selection_owner_get (GdkAtom       selection);
302
303 void       gdk_selection_send_notify (guint32       requestor,
304                                       GdkAtom       selection,
305                                       GdkAtom       target,
306                                       GdkAtom       property,
307                                       guint32       time);
308 gint       gdk_text_property_to_text_list (GdkAtom encoding, gint format,
309                                            guchar *text, gint length,
310                                            gchar ***list);
311 void       gdk_free_text_list             (gchar **list);
312 gint       gdk_string_to_compound_text    (gchar *str,
313                                            GdkAtom *encoding, gint *format,
314                                            guchar **ctext, gint *length);
315 void       gdk_free_compound_text         (guchar *ctext);
316 GdkAtom gdk_atom_intern     (const gchar *atom_name,
317                              gint         only_if_exists);
318 gchar*  gdk_atom_name       (GdkAtom atom);
319 GList *gdk_input_list_devices               (void);
320 void gdk_input_set_source                   (guint32 deviceid,
321                                              GdkInputSource source);
322 gint gdk_input_set_mode                     (guint32 deviceid,
323                                              GdkInputMode mode);
324 void gdk_input_set_axes                     (guint32 deviceid,
325                                              GdkAxisUse *axes);
326 void gdk_input_set_key                      (guint32 deviceid,
327                                              guint   index,
328                                              guint   keyval,
329                                              GdkModifierType modifiers);
330 gint         gdk_im_ready          (void);
331 void         gdk_im_end            (void);
332 GdkIC*       gdk_ic_new            (GdkICAttr           *attr,
333                                     GdkICAttributesType mask);
334 GdkRegion*     gdk_region_new       (void);
335 void     gdk_event_send_clientmessage_toall (GdkEvent    *event);
336 gboolean gdk_event_send_client_message (GdkEvent    *event,
337                                         guint32      xid);
338
339  And maybe:
340
341 void      gdk_error_trap_push           (void);
342 gint      gdk_error_trap_pop            (void);