Mercurial > projects > dwt-linux
comparison dwt/internal/gtk/OS.d @ 33:27324bbbac70
changed to regenerated BCD bindings
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 10 Jan 2008 02:18:07 +0100 |
parents | b7c28480e3e0 |
children | 3a3e3aa76b66 |
comparison
equal
deleted
inserted
replaced
32:b7c28480e3e0 | 33:27324bbbac70 |
---|---|
15 module dwt.internal.gtk.OS; | 15 module dwt.internal.gtk.OS; |
16 | 16 |
17 import dwt.internal.Platform; | 17 import dwt.internal.Platform; |
18 import tango.core.Traits; | 18 import tango.core.Traits; |
19 | 19 |
20 import dwt.internal.gtk.c.gtk, | 20 import dwt.internal.c.gtk, |
21 dwt.internal.gtk.c.gdk, | 21 dwt.internal.c.gdk, |
22 dwt.internal.gtk.c.atk, | 22 dwt.internal.c.gdkx, |
23 dwt.internal.gtk.c.glib, | 23 dwt.internal.c.atk, |
24 dwt.internal.gtk.c.cairo, | 24 dwt.internal.c.glib, |
25 dwt.internal.gtk.c.pango, | 25 dwt.internal.c.cairo, |
26 dwt.internal.gtk.c.gobject, | 26 dwt.internal.c.pango, |
27 dwt.internal.gtk.c.gthread, | 27 dwt.internal.c.pangocairo, |
28 dwt.internal.gtk.c.gdkpixbuf; | 28 dwt.internal.c.gtk_unix_print_2_0, |
29 | 29 dwt.internal.c.Xlib, |
30 // temporary added, because was not yet available | 30 dwt.internal.c.XTest, |
31 struct XAnyEvent { | 31 dwt.internal.c.Xrender, |
32 int type; | 32 dwt.internal.c.glib_object; |
33 uint serial; | 33 |
34 int send_event; | 34 public alias dwt.internal.c.glib_object.GPollFD GPollFD; |
35 void * display; | 35 public alias dwt.internal.c.glib_object.GClosure GClosure; |
36 uint window; | 36 public alias dwt.internal.c.glib_object.GList GList; |
37 } | 37 public alias dwt.internal.c.glib_object.GObject GObject; |
38 union XEvent{ | 38 public alias dwt.internal.c.glib_object.GTypeInfo GTypeInfo; |
39 int type; | 39 public alias dwt.internal.c.glib_object.GCallback GCallback; |
40 XAnyEvent xany; | 40 public alias dwt.internal.c.glib_object.GClosureNotify GClosureNotify; |
41 } | 41 public alias dwt.internal.c.glib_object.GPollFunc GPollFunc; |
42 | 42 |
43 struct XRenderPictureAttributes{ | 43 public alias dwt.internal.c.gdk.GdkColor GdkColor; |
44 int repeat; | 44 public alias dwt.internal.c.gdk.GdkRegion GdkRegion; |
45 uint alpha_map; | 45 public alias dwt.internal.c.gdk.GdkDrawable GdkDrawable; |
46 int alpha_x_origin; | 46 public alias dwt.internal.c.gdk.GdkGC GdkGC; |
47 int alpha_y_origin; | 47 public alias dwt.internal.c.gdk.GdkPixbuf GdkPixbuf; |
48 int clip_x_origin; | 48 public alias dwt.internal.c.gdk.GdkCursor GdkCursor; |
49 int clip_y_origin; | 49 public alias dwt.internal.c.gdk.GdkEvent GdkEvent; |
50 uint clip_mask; | 50 public alias dwt.internal.c.gdk.GdkEventKey GdkEventKey; |
51 int graphics_exposures; | 51 public alias dwt.internal.c.gdk.GdkWindow GdkWindow; |
52 int subwindow_mode; | 52 public alias dwt.internal.c.gdk.GdkEventButton GdkEventButton; |
53 int poly_edge; | 53 public alias dwt.internal.c.gdk.GdkRectangle GdkRectangle; |
54 int poly_mode; | 54 public alias dwt.internal.c.gdk.GdkEventExpose GdkEventExpose; |
55 uint dither; | 55 public alias dwt.internal.c.gdk.GdkEventCrossing GdkEventCrossing; |
56 int component_alpha; | 56 public alias dwt.internal.c.gdk.GdkEventMotion GdkEventMotion; |
57 } | 57 public alias dwt.internal.c.gdk.GdkEventScroll GdkEventScroll; |
58 struct XRenderDirectFormat { | 58 public alias dwt.internal.c.gdk.GdkEventVisibility GdkEventVisibility; |
59 short red; | 59 public alias dwt.internal.c.gdk.GdkXEvent GdkXEvent; |
60 short redMask; | 60 public alias dwt.internal.c.gdk.GdkPoint GdkPoint; |
61 short green; | 61 public alias dwt.internal.c.gdk.GdkPixmap GdkPixmap; |
62 short greenMask; | 62 public alias dwt.internal.c.gdk.GdkBitmap GdkBitmap; |
63 short blue; | 63 public alias dwt.internal.c.gdk.GdkGCValues GdkGCValues; |
64 short blueMask; | 64 public alias dwt.internal.c.gdk.GdkDisplay GdkDisplay; |
65 short alpha; | 65 public alias dwt.internal.c.gdk.GdkImage GdkImage; |
66 short alphaMask; | 66 public alias dwt.internal.c.gdk.GdkEventAny GdkEventAny; |
67 } | 67 public alias dwt.internal.c.gdk.GdkEventFocus GdkEventFocus; |
68 struct XRenderPictFormat { | 68 public alias dwt.internal.c.gdk.GdkWindowAttr GdkWindowAttr; |
69 uint id; | 69 |
70 int type; | 70 public alias dwt.internal.c.pango.PangoFontDescription PangoFontDescription; |
71 int depth; | 71 public alias dwt.internal.c.pango.PangoTabArray PangoTabArray; |
72 XRenderDirectFormat direct; | 72 public alias dwt.internal.c.pango.PangoContext PangoContext; |
73 uint colormap; | 73 public alias dwt.internal.c.pango.PangoLayout PangoLayout; |
74 } | 74 public alias dwt.internal.c.pango.PangoAttrList PangoAttrList; |
75 | 75 public alias dwt.internal.c.pango.PangoFontFamily PangoFontFamily; |
76 struct XTransform { | 76 public alias dwt.internal.c.pango.PangoFontFace PangoFontFace; |
77 int [3][3] matrix; | 77 public alias dwt.internal.c.pango.PangoRectangle PangoRectangle; |
78 } | 78 public alias dwt.internal.c.pango.PangoAttribute PangoAttribute; |
79 struct XRectangle { | 79 public alias dwt.internal.c.pango.PangoLogAttr PangoLogAttr; |
80 short x; | 80 public alias dwt.internal.c.pango.PangoItem PangoItem; |
81 short y; | 81 public alias dwt.internal.c.pango.PangoLayoutRun PangoLayoutRun; |
82 ushort width; | 82 public alias dwt.internal.c.pango.PangoLayoutLine PangoLayoutLine; |
83 ushort height; | 83 |
84 } | 84 public alias dwt.internal.c.cairo.cairo_t cairo_t; |
85 struct XExposeEvent { | 85 public alias dwt.internal.c.cairo.cairo_pattern_t cairo_pattern_t; |
86 int type; | 86 public alias dwt.internal.c.cairo.cairo_surface_t cairo_surface_t; |
87 uint serial; | 87 public alias dwt.internal.c.cairo.cairo_text_extents_t cairo_text_extents_t; |
88 int send_event; | 88 public alias dwt.internal.c.cairo.cairo_font_extents_t cairo_font_extents_t; |
89 void * display; | 89 public alias dwt.internal.c.cairo.cairo_matrix_t cairo_matrix_t; |
90 uint window; | 90 public alias dwt.internal.c.cairo.cairo_path_t cairo_path_t; |
91 int x; | 91 public alias dwt.internal.c.cairo.cairo_path_data_t cairo_path_data_t; |
92 int y; | 92 |
93 int width; | 93 public alias dwt.internal.c.gtk.GtkWidget GtkWidget; |
94 int height; | 94 public alias dwt.internal.c.gtk.GtkIMContext GtkIMContext; |
95 int count; | 95 public alias dwt.internal.c.gtk.GtkStyle GtkStyle; |
96 } | 96 public alias dwt.internal.c.gtk.GtkRcStyle GtkRcStyle; |
97 struct XVisibilityEvent { | 97 public alias dwt.internal.c.gtk.GtkCellRenderer GtkCellRenderer; |
98 int type; | 98 public alias dwt.internal.c.gtk.GtkScrolledWindow GtkScrolledWindow; |
99 uint serial; | 99 public alias dwt.internal.c.gtk.GtkLabel GtkLabel; |
100 int send_event; | 100 public alias dwt.internal.c.gtk.GtkWindow GtkWindow; |
101 void * display; | 101 public alias dwt.internal.c.gtk.GtkRequisition GtkRequisition; |
102 uint window; | 102 public alias dwt.internal.c.gtk.GtkContainer GtkContainer; |
103 int state; | 103 public alias dwt.internal.c.gtk.GtkAdjustment GtkAdjustment; |
104 } | 104 public alias dwt.internal.c.gtk.GtkCallback GtkCallback; |
105 | 105 public alias dwt.internal.c.gtk.GtkFixedClass GtkFixedClass; |
106 struct XButtonEvent { | 106 public alias dwt.internal.c.gtk.GtkFixed GtkFixed; |
107 int type; | 107 public alias dwt.internal.c.gtk.GtkCellRendererText GtkCellRendererText; |
108 uint serial; | 108 public alias dwt.internal.c.gtk.GtkCellRendererTextClass GtkCellRendererTextClass; |
109 int send_event; | 109 public alias dwt.internal.c.gtk.GtkCellRendererPixbufClass GtkCellRendererPixbufClass; |
110 void * display; | 110 public alias dwt.internal.c.gtk.GtkCellRendererPixbuf GtkCellRendererPixbuf; |
111 uint window; | 111 public alias dwt.internal.c.gtk.GtkCellRendererToggleClass GtkCellRendererToggleClass; |
112 uint root; | 112 public alias dwt.internal.c.gtk.GtkCellRendererToggle GtkCellRendererToggle; |
113 uint subwindow; | 113 public alias dwt.internal.c.gtk.GtkWidgetClass GtkWidgetClass; |
114 uint time; | 114 public alias dwt.internal.c.gtk.GtkCellRendererClass GtkCellRendererClass; |
115 int x; | 115 public alias dwt.internal.c.gtk.GtkAllocation GtkAllocation; |
116 int y; | 116 |
117 int x_root; | 117 public alias dwt.internal.c.Xlib.XErrorEvent XErrorEvent; |
118 int y_root; | 118 public alias dwt.internal.c.Xlib.XExposeEvent XExposeEvent; |
119 uint state; | 119 public alias dwt.internal.c.Xlib.XVisibilityEvent XVisibilityEvent; |
120 uint button; | 120 public alias dwt.internal.c.Xlib.XEvent XEvent; |
121 int same_screen; | 121 public alias dwt.internal.c.Xlib.XRectangle XRectangle; |
122 } | 122 public alias dwt.internal.c.Xlib.XButtonEvent XButtonEvent; |
123 struct XWindowChanges { | 123 public alias dwt.internal.c.Xlib.XWindowChanges XWindowChanges; |
124 int x; | 124 |
125 int y; | 125 public alias dwt.internal.c.Xrender.XRenderPictureAttributes XRenderPictureAttributes; |
126 int width; | 126 public alias dwt.internal.c.Xrender.XTransform XTransform; |
127 int height; | 127 |
128 int border_width; | 128 |
129 uint sibling; | 129 // function with variadic argument list |
130 int stack_mode; | |
131 } | |
132 private extern (C){ | |
133 GdkWindow * gdk_window_lookup(uint); | |
134 uint XRenderCreatePicture(void *, uint, XRenderPictFormat *, uint, XRenderPictureAttributes *); | |
135 XRenderPictFormat * XRenderFindStandardFormat (void *dpy, int format); | |
136 XRenderPictFormat * XRenderFindVisualFormat (void *dpy, void *visual); | |
137 void XRenderSetPictureTransform (void *dpy,uint picture, XTransform *transform); | |
138 void XRenderSetPictureClipRectangles(void *, uint, int, int, XRectangle *, int); | |
139 void XRenderFreePicture(void *, uint); | |
140 void XRenderComposite(void *, int, uint, uint, uint, int, int, int, int, int, int, uint, uint); | |
141 | |
142 cairo_font_options_t * pango_cairo_context_get_font_options(void *); | |
143 void pango_cairo_context_set_font_options(void *, cairo_font_options_t *); | |
144 | |
145 alias int function(void *, XEvent *, void *) _BCD_func__1812; | |
146 int XCheckIfEvent(void *, XEvent *, _BCD_func__1812, void *); | |
147 | |
148 extern uint gtk_major_version; | |
149 extern uint gtk_minor_version; | |
150 extern uint gtk_micro_version; | |
151 | |
152 void * gdk_atom_intern(char *, int); | |
153 int gdk_property_get(GdkDrawable *, void *, void *, uint, uint, int, void **, int *, int *, char ** ); | |
154 void * gdk_x11_drawable_get_xdisplay(GdkDrawable *); | |
155 int XDefaultScreen(void *); | |
156 int XReconfigureWMWindow(void *, uint, int, uint, XWindowChanges *); | |
157 } | |
158 | |
159 | |
160 //void function(GtkWidget* widget, gchar* firstPropertyName, ... )gtk_widget_style_get; | |
161 private void gtk_widget_style_get1( GtkWidget* widget, gchar* firstPropertyName, int* res ){ | 130 private void gtk_widget_style_get1( GtkWidget* widget, gchar* firstPropertyName, int* res ){ |
162 gtk_widget_style_get( widget, firstPropertyName, res, null ); | 131 gtk_widget_style_get( widget, firstPropertyName, res, null ); |
163 } | 132 } |
133 // function with variadic argument list | |
164 private void g_object_get1( void* obj, gchar* firstPropertyName, int* res ){ | 134 private void g_object_get1( void* obj, gchar* firstPropertyName, int* res ){ |
165 g_object_get( obj, firstPropertyName, res, null ); | 135 g_object_get( obj, firstPropertyName, res, null ); |
166 } | 136 } |
167 | 137 |
168 | 138 // for linux always true, the other possibility would be GDK_WINDOWING_WIN32 |
169 private extern(C) PangoLayout *pango_cairo_create_layout (cairo_t *cr); | 139 private bool GDK_WINDOWING_X11(){ |
170 private extern(C) void pango_cairo_layout_path (cairo_t *cr, | 140 return true; |
171 PangoLayout *layout); | 141 } |
172 | 142 |
173 private extern(C) void gdk_pango_context_set_colormap (PangoContext *context, | 143 private uint GDK_PIXMAP_XID(GdkDrawable* win){ |
174 GdkColormap *colormap); | 144 return gdk_x11_drawable_get_xid(win); |
175 | 145 } |
176 private extern(C) void pango_cairo_show_layout(cairo_t *cr, PangoLayout *layout); | 146 |
177 | 147 // macro |
178 private extern(C) GdkRegion *gdk_pango_layout_get_clip_region(PangoLayout *layout, | 148 int g_signal_connect( void* instance, char* sig, GCallback handle, void* ptr ){ |
179 gint x_origin, | 149 return g_signal_connect_data( instance, sig, handle, ptr, cast(GClosureNotify) 0, cast(GConnectFlags)0 ); |
180 gint y_origin, | 150 } |
181 gint *index_ranges, | 151 |
182 gint n_ranges); | 152 // macro |
183 | 153 void gdk_cursor_destroy( GdkCursor* cursor ){ |
184 | 154 gdk_cursor_unref(cursor); |
185 private extern(C) GdkWindow* GDK_ROOT_PARENT(); | 155 } |
186 private extern(C) GdkPixbuf* gdk_pixbuf_new (GdkColorspace colorspace, gboolean has_alpha, int bits_per_sample, | 156 |
187 int width, int height); | 157 int g_thread_supported(){ |
188 | 158 return g_threads_got_initialized; |
189 private extern(C) PangoContext *gdk_pango_context_get(); | 159 } |
190 private extern(C) int XRenderQueryExtension (void *dpy, int *event_basep, int *error_basep); | 160 |
191 alias int Status; | 161 |
192 private extern(C) Status XRenderQueryVersion (void *dpy, | 162 private int PANGO_PIXELS( int v ); |
193 int *major_versionp, | 163 private GdkWindow* GDK_ROOT_PARENT(); |
194 int *minor_versionp); | 164 private GdkDisplay* GDK_DISPLAY(); |
195 struct FcConfig{}; | |
196 private extern(C) int FcConfigAppFontAddFile (FcConfig *config, char *file); | |
197 | |
198 alias extern(C) int function( void* ) XSynchronizeResult; | |
199 private extern(C) XSynchronizeResult function( void*, int ) XSynchronize; | |
200 | |
201 //struct Visual{} | |
202 //private extern(C) Visual* gdk_x11_visual_get_xvisual(GdkVisual* visual); | |
203 | |
204 private extern (C) GdkDisplay* GDK_DISPLAY(); | |
205 | |
206 private extern (C) XID GDK_PIXMAP_XID(GdkDrawable* win); | |
207 struct XErrorEvent {} | |
208 | |
209 private extern (C) bool GDK_WINDOWING_X11(); | |
210 private extern (C) int XFlush(void *); | |
211 public alias extern(C) int function(void*) XIOErrorHandler; | |
212 public alias extern(C) int function(void*, XErrorEvent *) XErrorHandler; | |
213 | |
214 private extern (C) XIOErrorHandler XSetIOErrorHandler(XIOErrorHandler); | |
215 private extern (C) XErrorHandler XSetErrorHandler(XErrorHandler); | |
216 private extern (C) int PANGO_PIXELS( int v ); | |
217 private GType GTK_TYPE_FIXED(); | 165 private GType GTK_TYPE_FIXED(); |
218 private GType GTK_TYPE_CELL_RENDERER_TEXT(); | 166 private GType GTK_TYPE_CELL_RENDERER_TEXT(); |
219 private GType GTK_TYPE_CELL_RENDERER_PIXBUF(); | 167 private GType GTK_TYPE_CELL_RENDERER_PIXBUF(); |
220 private GType GTK_TYPE_CELL_RENDERER_TOGGLE(); | 168 private GType GTK_TYPE_CELL_RENDERER_TOGGLE(); |
221 private bool GTK_IS_WINDOW(GtkWidget *); | 169 private bool GTK_IS_WINDOW(GtkWidget *); |
237 private GType G_OBJECT_TYPE_NAME (); | 185 private GType G_OBJECT_TYPE_NAME (); |
238 private GType G_TYPE_BOOLEAN(); | 186 private GType G_TYPE_BOOLEAN(); |
239 private GType G_TYPE_INT(); | 187 private GType G_TYPE_INT(); |
240 private GType G_OBJECT_TYPE( GObject* ); | 188 private GType G_OBJECT_TYPE( GObject* ); |
241 private GType G_TYPE_STRING(); | 189 private GType G_TYPE_STRING(); |
190 | |
191 // fontconfig.h | |
192 struct FcConfig{}; | |
193 private extern(C) int FcConfigAppFontAddFile (FcConfig *config, char *file); | |
194 | |
195 | |
196 | |
197 /++++ | |
198 // temporary added, because was not yet available | |
199 struct XAnyEvent { | |
200 int type; | |
201 uint serial; | |
202 int send_event; | |
203 void * display; | |
204 uint window; | |
205 } | |
206 union XEvent{ | |
207 int type; | |
208 XAnyEvent xany; | |
209 } | |
210 | |
211 struct XRenderPictureAttributes{ | |
212 int repeat; | |
213 uint alpha_map; | |
214 int alpha_x_origin; | |
215 int alpha_y_origin; | |
216 int clip_x_origin; | |
217 int clip_y_origin; | |
218 uint clip_mask; | |
219 int graphics_exposures; | |
220 int subwindow_mode; | |
221 int poly_edge; | |
222 int poly_mode; | |
223 uint dither; | |
224 int component_alpha; | |
225 } | |
226 struct XRenderDirectFormat { | |
227 short red; | |
228 short redMask; | |
229 short green; | |
230 short greenMask; | |
231 short blue; | |
232 short blueMask; | |
233 short alpha; | |
234 short alphaMask; | |
235 } | |
236 struct XRenderPictFormat { | |
237 uint id; | |
238 int type; | |
239 int depth; | |
240 XRenderDirectFormat direct; | |
241 uint colormap; | |
242 } | |
243 | |
244 struct XTransform { | |
245 int [3][3] matrix; | |
246 } | |
247 struct XRectangle { | |
248 short x; | |
249 short y; | |
250 ushort width; | |
251 ushort height; | |
252 } | |
253 struct XExposeEvent { | |
254 int type; | |
255 uint serial; | |
256 int send_event; | |
257 void * display; | |
258 uint window; | |
259 int x; | |
260 int y; | |
261 int width; | |
262 int height; | |
263 int count; | |
264 } | |
265 struct XVisibilityEvent { | |
266 int type; | |
267 uint serial; | |
268 int send_event; | |
269 void * display; | |
270 uint window; | |
271 int state; | |
272 } | |
273 | |
274 struct XButtonEvent { | |
275 int type; | |
276 uint serial; | |
277 int send_event; | |
278 void * display; | |
279 uint window; | |
280 uint root; | |
281 uint subwindow; | |
282 uint time; | |
283 int x; | |
284 int y; | |
285 int x_root; | |
286 int y_root; | |
287 uint state; | |
288 uint button; | |
289 int same_screen; | |
290 } | |
291 struct XWindowChanges { | |
292 int x; | |
293 int y; | |
294 int width; | |
295 int height; | |
296 int border_width; | |
297 uint sibling; | |
298 int stack_mode; | |
299 } | |
300 private extern (C){ | |
301 GdkWindow * gdk_window_lookup(uint); | |
302 uint XRenderCreatePicture(void *, uint, XRenderPictFormat *, uint, XRenderPictureAttributes *); | |
303 XRenderPictFormat * XRenderFindStandardFormat (void *dpy, int format); | |
304 XRenderPictFormat * XRenderFindVisualFormat (void *dpy, void *visual); | |
305 void XRenderSetPictureTransform (void *dpy,uint picture, XTransform *transform); | |
306 void XRenderSetPictureClipRectangles(void *, uint, int, int, XRectangle *, int); | |
307 void XRenderFreePicture(void *, uint); | |
308 void XRenderComposite(void *, int, uint, uint, uint, int, int, int, int, int, int, uint, uint); | |
309 | |
310 cairo_font_options_t * pango_cairo_context_get_font_options(void *); | |
311 void pango_cairo_context_set_font_options(void *, cairo_font_options_t *); | |
312 | |
313 alias int function(void *, XEvent *, void *) _BCD_func__1812; | |
314 int XCheckIfEvent(void *, XEvent *, _BCD_func__1812, void *); | |
315 | |
316 extern uint gtk_major_version; | |
317 extern uint gtk_minor_version; | |
318 extern uint gtk_micro_version; | |
319 | |
320 void * gdk_atom_intern(char *, int); | |
321 int gdk_property_get(GdkDrawable *, void *, void *, uint, uint, int, void **, int *, int *, char ** ); | |
322 void * gdk_x11_drawable_get_xdisplay(GdkDrawable *); | |
323 int XDefaultScreen(void *); | |
324 int XReconfigureWMWindow(void *, uint, int, uint, XWindowChanges *); | |
325 } | |
326 | |
327 | |
328 | |
329 | |
330 private extern(C) PangoLayout *pango_cairo_create_layout (cairo_t *cr); | |
331 private extern(C) void pango_cairo_layout_path (cairo_t *cr, | |
332 PangoLayout *layout); | |
333 | |
334 private extern(C) void gdk_pango_context_set_colormap (PangoContext *context, | |
335 GdkColormap *colormap); | |
336 | |
337 private extern(C) void pango_cairo_show_layout(cairo_t *cr, PangoLayout *layout); | |
338 | |
339 private extern(C) GdkRegion *gdk_pango_layout_get_clip_region(PangoLayout *layout, | |
340 gint x_origin, | |
341 gint y_origin, | |
342 gint *index_ranges, | |
343 gint n_ranges); | |
344 | |
345 | |
346 private extern(C) GdkWindow* GDK_ROOT_PARENT(); | |
347 private extern(C) GdkPixbuf* gdk_pixbuf_new (GdkColorspace colorspace, gboolean has_alpha, int bits_per_sample, | |
348 int width, int height); | |
349 | |
350 private extern(C) PangoContext *gdk_pango_context_get(); | |
351 private extern(C) int XRenderQueryExtension (void *dpy, int *event_basep, int *error_basep); | |
352 alias int Status; | |
353 private extern(C) Status XRenderQueryVersion (void *dpy, | |
354 int *major_versionp, | |
355 int *minor_versionp); | |
356 | |
357 alias extern(C) int function( void* ) XSynchronizeResult; | |
358 private extern(C) XSynchronizeResult function( void*, int ) XSynchronize; | |
359 | |
360 //struct Visual{} | |
361 //private extern(C) Visual* gdk_x11_visual_get_xvisual(GdkVisual* visual); | |
362 | |
363 | |
364 private extern (C) XID GDK_PIXMAP_XID(GdkDrawable* win); | |
365 struct XErrorEvent {} | |
366 | |
367 private extern (C) bool GDK_WINDOWING_X11(); | |
368 private extern (C) int XFlush(void *); | |
369 public alias extern(C) int function(void*) XIOErrorHandler; | |
370 public alias extern(C) int function(void*, XErrorEvent *) XErrorHandler; | |
371 | |
372 private extern (C) XIOErrorHandler XSetIOErrorHandler(XIOErrorHandler); | |
373 private extern (C) XErrorHandler XSetErrorHandler(XErrorHandler); | |
374 private extern (C) int PANGO_PIXELS( int v ); | |
242 private char* gdk_x11_screen_get_window_manager_name(GdkScreen*); | 375 private char* gdk_x11_screen_get_window_manager_name(GdkScreen*); |
243 private char XKeysymToKeycode(void *, uint); | 376 private char XKeysymToKeycode(void *, uint); |
244 private int XTestFakeKeyEvent(void *, uint, int, uint); | 377 private int XTestFakeKeyEvent(void *, uint, int, uint); |
245 int XTestFakeMotionEvent(void *, int, int, int, uint); | 378 int XTestFakeMotionEvent(void *, int, int, int, uint); |
246 int XTestFakeButtonEvent(void *, uint, int, uint); | 379 int XTestFakeButtonEvent(void *, uint, int, uint); |
247 uint XDefaultRootWindow(void *); | 380 uint XDefaultRootWindow(void *); |
248 int XWarpPointer(void *, uint, uint, int, int, uint, uint, int, int); | 381 int XWarpPointer(void *, uint, uint, int, int, uint, uint, int, int); |
249 int g_signal_connect( void* instance, char* sig, GCallback handle, void* ptr ){ | 382 ++++/ |
250 return g_signal_connect_data( instance, sig, handle, ptr, cast(GClosureNotify) 0, cast(GConnectFlags)0 ); | 383 |
251 } | |
252 template NameOfFunc(alias f) { | 384 template NameOfFunc(alias f) { |
253 // Note: highly dependent on the .stringof formatting | 385 // Note: highly dependent on the .stringof formatting |
254 // the value begins with "& " which is why the first two chars are cut off | 386 // the value begins with "& " which is why the first two chars are cut off |
255 const char[] NameOfFunc = (&f).stringof[2 .. $]; | 387 const char[] NameOfFunc = (&f).stringof[2 .. $]; |
256 } | 388 } |
273 mixin("public static Ret "~name~"( Params p ) { | 405 mixin("public static Ret "~name~"( Params p ) { |
274 return ."~name~"(p); | 406 return ."~name~"(p); |
275 }"); | 407 }"); |
276 } | 408 } |
277 +/ | 409 +/ |
278 | |
279 //import dwt.internal.*; | 410 //import dwt.internal.*; |
280 | 411 |
281 public class OS : Platform { | 412 public class OS : Platform { |
282 | 413 |
283 /** OS Constants */ | 414 /** OS Constants */ |