]> Pileus Git - ~andy/gtk/blob - gdk/TODO
Added a file describing some upcoming and more
[~andy/gtk] / gdk / TODO
1 Dir structure for ports
2 =======================
3
4 The directory structure here is:
5
6  gdk/
7  gdk/x11
8  gdk/win32
9  ...
10  
11 The gdk/ directory directly contains all public
12 header files (that are not specific to one 
13 windowing system).
14
15 There, in general should be no system dependency 
16
17 For each set of functionality, there are the following
18 files:
19
20  gdkwindow.h:        public header file
21  gdkwindow.c:        common implementation
22  x11/gdkwindow.i:    functionality specific to X11
23  win32/gdkwindow.i: functionality specific to win32
24
25 The gdkwindow.c file looks like:
26
27 ====
28 #include "gdkwindow.h"
29
30 #ifdef GDK_WINDOWING_X11
31 #include "x11/gdkwindow.i"
32 #elif defined(GDK_WINDOW_WIN32)
33 #include "win32/gdkwindow.i"
34  fo#endif
35
36 [ generic implementation bits ]
37 ====
38
39 x11/gdkwindow.i should only assume that gdkwindow.h has been
40 included and included all other dependencies explicitely.
41
42 The x11/ directory will contain:
43
44  .i files
45  .c files specific to X
46  .h files specific to X
47
48 And a Makefile.am that takes care of distributing the
49 files in the directory, and also for building any
50 X-specific utilities. (Such as the gxid daemon).
51
52
53 Virtualization
54 ==============
55
56 The concept of virtualization is that calls to draw
57 on a drawable are dispatched through a function table.
58 This potentially allows for:
59
60  Postscript drawables
61  metafiles
62
63 It also provides a nice clean framework for multi-windowing
64 support - instead of reimplementing a whole bunch of function
65 calls, one provides an implementaiton for the vtables.
66
67 X works in this way internally - per-screen functions are
68 virtualized inside a screen structure, and drawing functions 
69 are virtualized inside the GC structure.
70
71 For the virtualization of drawing, clearly GdkDrawable needs
72 to be virtualized. Beyond that, one has to decide on
73 a case-by-case basis whether a particular structure is
74 drawing-mode independent (like GdkRectangle) or not.
75
76 The most important GDK structures that are involved drawing are:
77
78  GdkColor
79  GdkGC
80  GdkFont
81  GdkRegion
82
83 The whole font aspect of Gdk is going to get heavily
84 reworked with the introduction of "Pango".
85 GdkRegion almost certainly needs to be virtualized,
86 if you, way, want to do postscript drawables.
87
88 While doing so, the API of GdkRegion should be
89 changed so that the region operations take 3 parameters
90 instead of returning a newly created region.
91
92
93 Drawable operations:
94   destroy
95   create_gc
96   get_values
97   set_values
98   set_dashes
99   copy
100
101 GC Operations:
102   draw_point
103   draw_line
104   draw_rectangle
105   draw_arc
106   draw_polygon
107   draw_string
108   draw_text
109   draw_text_wc
110   draw_pixmap
111   draw_bitmap
112   draw_image
113   draw_points
114   draw_segments
115   draw_lines
116
117
118 Adding multi-screen, display support.
119 =====================================
120
121  The following functions need to have per-display variants:
122
123 void gdk_pointer_ungrab (guint32         time);
124 void gdk_keyboard_ungrab (guint32         time);
125 gint gdk_pointer_is_grabbed (void);
126
127 gint gdk_screen_width  (void);
128 gint gdk_screen_height (void);
129
130 gint gdk_screen_width_mm  (void);
131 gint gdk_screen_height_mm (void);
132
133 void gdk_beep (void);
134
135 void gdk_key_repeat_disable (void);
136 void gdk_key_repeat_restore (void);
137
138 gint          gdk_visual_get_best_depth      (void);
139 GdkVisualType gdk_visual_get_best_type       (void);
140 GdkVisual*    gdk_visual_get_system          (void);
141 GdkVisual*    gdk_visual_get_best            (void);
142 GdkVisual*    gdk_visual_get_best_with_depth (gint           depth);
143 GdkVisual*    gdk_visual_get_best_with_type  (GdkVisualType  visual_type);
144 GdkVisual*    gdk_visual_get_best_with_both  (gint           depth,
145                                               GdkVisualType  visual_type);
146
147 void gdk_query_depths       (gint           **depths,
148                              gint            *count);
149 void gdk_query_visual_types (GdkVisualType  **visual_types,
150                              gint            *count);
151
152 GList* gdk_list_visuals (void);
153
154 void gdk_add_client_message_filter (GdkAtom       message_type,
155                                     GdkFilterFunc func,
156                                     gpointer      data);
157
158 guint32         gdk_drag_get_protocol (guint32          xid,
159                                        GdkDragProtocol *protocol);
160
161 GdkCursor* gdk_cursor_new                (GdkCursorType   cursor_type);
162 GdkCursor* gdk_cursor_new_from_pixmap    (GdkPixmap       *source,
163                                           GdkPixmap       *mask,
164                                           GdkColor        *fg,
165                                           GdkColor        *bg,
166                                           gint             x,
167                                           gint             y);
168 GdkColormap* gdk_colormap_get_system       (void);
169 gint         gdk_colormap_get_system_size  (void);
170
171 GdkFont* gdk_font_load      (const gchar    *font_name);
172 GdkFont* gdk_fontset_load   (gchar          *fontset_name);
173
174 gint       gdk_selection_owner_set (GdkWindow    *owner,
175                                     GdkAtom       selection,
176                                     guint32       time,
177                                     gint          send_event);
178 GdkWindow* gdk_selection_owner_get (GdkAtom       selection);
179
180 void       gdk_selection_send_notify (guint32       requestor,
181                                       GdkAtom       selection,
182                                       GdkAtom       target,
183                                       GdkAtom       property,
184                                       guint32       time);
185 gint       gdk_text_property_to_text_list (GdkAtom encoding, gint format,
186                                            guchar *text, gint length,
187                                            gchar ***list);
188 void       gdk_free_text_list             (gchar **list);
189 gint       gdk_string_to_compound_text    (gchar *str,
190                                            GdkAtom *encoding, gint *format,
191                                            guchar **ctext, gint *length);
192 void       gdk_free_compound_text         (guchar *ctext);
193 GdkAtom gdk_atom_intern     (const gchar *atom_name,
194                              gint         only_if_exists);
195 gchar*  gdk_atom_name       (GdkAtom atom);
196 GList *gdk_input_list_devices               (void);
197 void gdk_input_set_source                   (guint32 deviceid,
198                                              GdkInputSource source);
199 gint gdk_input_set_mode                     (guint32 deviceid,
200                                              GdkInputMode mode);
201 void gdk_input_set_axes                     (guint32 deviceid,
202                                              GdkAxisUse *axes);
203 void gdk_input_set_key                      (guint32 deviceid,
204                                              guint   index,
205                                              guint   keyval,
206                                              GdkModifierType modifiers);
207 gint         gdk_im_ready          (void);
208 void         gdk_im_end            (void);
209 GdkIC*       gdk_ic_new            (GdkICAttr           *attr,
210                                     GdkICAttributesType mask);
211 GdkRegion*     gdk_region_new       (void);
212 void     gdk_event_send_clientmessage_toall (GdkEvent    *event);
213 gboolean gdk_event_send_client_message (GdkEvent    *event,
214                                         guint32      xid);
215
216  And maybe:
217
218 void      gdk_error_trap_push           (void);
219 gint      gdk_error_trap_pop            (void);