6 #include <gdk/win32/gdkwin32.h>
10 #include <caml/mlvalues.h>
11 #include <caml/alloc.h>
12 #include <caml/memory.h>
13 #include <caml/callback.h>
20 void ml_raise_gdk (const char *errmsg)
22 static value * exn = NULL;
24 exn = caml_named_value ("gdkerror");
25 raise_with_string (*exn, (char*)errmsg);
30 Make_OptFlags_val (GdkModifier_val)
31 Make_Flags_val (Event_mask_val)
33 #define Make_test(conv) \
34 value ml_test_##conv (value mask, value test) \
35 { return Val_bool (conv(mask) & Int_val(test)); }
37 Make_test(GdkModifier_val)
41 Make_Val_final_pointer (GdkColormap, gdk_colormap_ref, gdk_colormap_unref, 0)
42 ML_0 (gdk_colormap_get_system, Val_GdkColormap)
45 ML_0 (gdk_screen_width, Val_int)
46 ML_0 (gdk_screen_height, Val_int)
49 value ml_gdk_visual_get_best (value depth, value type)
53 if (depth == Val_unit) vis = gdk_visual_get_best ();
54 else vis = gdk_visual_get_best_with_depth (Int_val(Field(depth,0)));
56 if (depth == Val_unit)
57 vis = gdk_visual_get_best_with_type
58 (GdkVisualType_val(Field(type,0)));
59 else vis = gdk_visual_get_best_with_both
60 (Int_val(Field(depth,0)),GdkVisualType_val(Field(type,0)));
61 if (!vis) ml_raise_gdk("Gdk.Visual.get_best");
62 return Val_GdkVisual(vis);
65 Make_Extractor (GdkVisual,GdkVisual_val,type,Val_gdkVisualType)
66 Make_Extractor (GdkVisual,GdkVisual_val,depth,Val_int)
67 Make_Extractor (GdkVisual,GdkVisual_val,red_mask,Val_int)
68 Make_Extractor (GdkVisual,GdkVisual_val,red_shift,Val_int)
69 Make_Extractor (GdkVisual,GdkVisual_val,red_prec,Val_int)
70 Make_Extractor (GdkVisual,GdkVisual_val,green_mask,Val_int)
71 Make_Extractor (GdkVisual,GdkVisual_val,green_shift,Val_int)
72 Make_Extractor (GdkVisual,GdkVisual_val,green_prec,Val_int)
73 Make_Extractor (GdkVisual,GdkVisual_val,blue_mask,Val_int)
74 Make_Extractor (GdkVisual,GdkVisual_val,blue_shift,Val_int)
75 Make_Extractor (GdkVisual,GdkVisual_val,blue_prec,Val_int)
79 Make_Val_final_pointer (GdkImage, Ignore, gdk_image_destroy, 0)
80 GdkImage *GdkImage_val(value val)
82 if (!Field(val,1)) ml_raise_gdk ("attempt to use destroyed GdkImage");
83 return (GdkImage*)(Field(val,1));
85 value ml_gdk_image_destroy (value val)
87 if (Field(val,1)) gdk_image_destroy((GdkImage*)(Field(val,1)));
91 ML_4 (gdk_image_new_bitmap, GdkVisual_val, String_val, Int_val, Int_val,
93 ML_4 (gdk_image_new, GdkImageType_val, GdkVisual_val, Int_val, Int_val,
95 ML_5 (gdk_image_get, GdkWindow_val, Int_val, Int_val, Int_val, Int_val,
97 ML_4 (gdk_image_put_pixel, GdkImage_val, Int_val, Int_val, Int_val, Unit)
98 ML_3 (gdk_image_get_pixel, GdkImage_val, Int_val, Int_val, Val_int)
102 ML_2 (gdk_colormap_new, GdkVisual_val, Bool_val, Val_GdkColormap)
104 value ml_gdk_color_white (value cmap)
107 gdk_color_white (GdkColormap_val(cmap), &color);
108 return Val_copy(color);
111 value ml_gdk_color_black (value cmap)
114 gdk_color_black (GdkColormap_val(cmap), &color);
115 return Val_copy(color);
118 value ml_gdk_color_parse (char *spec)
121 if (!gdk_color_parse (spec, &color))
122 ml_raise_gdk ("color_parse");
123 return Val_copy(color);
126 ML_2 (gdk_color_alloc, GdkColormap_val, GdkColor_val, Val_bool)
128 value ml_GdkColor (value red, value green, value blue)
131 color.red = Int_val(red);
132 color.green = Int_val(green);
133 color.blue = Int_val(blue);
135 return Val_copy(color);
138 Make_Extractor (GdkColor, GdkColor_val, red, Val_int)
139 Make_Extractor (GdkColor, GdkColor_val, green, Val_int)
140 Make_Extractor (GdkColor, GdkColor_val, blue, Val_int)
141 Make_Extractor (GdkColor, GdkColor_val, pixel, Val_int)
145 value ml_GdkRectangle (value x, value y, value width, value height)
147 GdkRectangle rectangle;
148 rectangle.x = Int_val(x);
149 rectangle.y = Int_val(y);
150 rectangle.width = Int_val(width);
151 rectangle.height = Int_val(height);
152 return Val_copy(rectangle);
155 Make_Extractor (GdkRectangle, GdkRectangle_val, x, Val_int)
156 Make_Extractor (GdkRectangle, GdkRectangle_val, y, Val_int)
157 Make_Extractor (GdkRectangle, GdkRectangle_val, width, Val_int)
158 Make_Extractor (GdkRectangle, GdkRectangle_val, height, Val_int)
162 Make_Val_final_pointer (GdkWindow, gdk_window_ref, gdk_window_unref, 0)
163 Make_Extractor (gdk_visual_get, GdkVisual_val, depth, Val_int)
164 ML_1 (gdk_window_get_visual, GdkWindow_val, Val_GdkVisual)
165 ML_3 (gdk_window_set_back_pixmap, GdkWindow_val, GdkPixmap_val, Int_val, Unit)
166 ML_1 (gdk_window_clear, GdkWindow_val, Unit)
167 ML_0 (GDK_ROOT_PARENT, Val_GdkWindow)
168 ML_1 (gdk_window_get_parent, GdkWindow_val, Val_GdkWindow)
169 ML_1 (GDK_WINDOW_XWINDOW, GdkWindow_val, Val_XID)
170 value ml_gdk_window_get_position (value window)
175 gdk_window_get_position (GdkWindow_val(window), &x, &y);
177 ret = alloc_small (2,0);
178 Field(ret,0) = Val_int(x);
179 Field(ret,1) = Val_int(y);
183 value ml_gdk_window_get_size (value window)
188 gdk_window_get_size (GdkWindow_val(window), &x, &y);
190 ret = alloc_small (2,0);
191 Field(ret,0) = Val_int(x);
192 Field(ret,1) = Val_int(y);
198 ML_1 (gdk_cursor_new, GdkCursorType_val, Val_GdkCursor)
199 ML_6 (gdk_cursor_new_from_pixmap, GdkPixmap_val, GdkPixmap_val,
200 GdkColor_val, GdkColor_val, Int_val, Int_val, Val_GdkCursor)
201 ML_bc6 (ml_gdk_cursor_new_from_pixmap)
202 ML_1 (gdk_cursor_destroy, GdkCursor_val, Unit)
206 Make_Val_final_pointer (GdkPixmap, gdk_pixmap_ref, gdk_pixmap_unref, 0)
207 Make_Val_final_pointer (GdkBitmap, gdk_bitmap_ref, gdk_bitmap_unref, 0)
208 Make_Val_final_pointer_ext (GdkPixmap, _no_ref, Ignore, gdk_pixmap_unref, 20)
209 Make_Val_final_pointer_ext (GdkBitmap, _no_ref, Ignore, gdk_bitmap_unref, 20)
210 ML_4 (gdk_pixmap_new, GdkWindow_val, Int_val, Int_val, Int_val,
211 Val_GdkPixmap_no_ref)
212 ML_4 (gdk_bitmap_create_from_data, GdkWindow_val,
213 String_val, Int_val, Int_val, Val_GdkBitmap_no_ref)
214 ML_7 (gdk_pixmap_create_from_data, GdkWindow_val, String_val,
215 Int_val, Int_val, Int_val, GdkColor_val, GdkColor_val,
216 Val_GdkPixmap_no_ref)
217 ML_bc7 (ml_gdk_pixmap_create_from_data)
219 value ml_gdk_pixmap_colormap_create_from_xpm
220 (value window, value colormap, value transparent, char *filename)
224 CAMLlocal2(vpixmap, vmask);
227 vpixmap = Val_GdkPixmap_no_ref
228 (gdk_pixmap_colormap_create_from_xpm
229 (GdkWindow_val(window), Option_val(colormap,GdkColormap_val,NULL),
230 &mask, Option_val(transparent,GdkColor_val,NULL), filename));
231 vmask = Val_GdkBitmap_no_ref (mask);
233 ret = alloc_small (2,0);
234 Field(ret,0) = vpixmap;
235 Field(ret,1) = vmask;
239 value ml_gdk_pixmap_colormap_create_from_xpm_d
240 (value window, value colormap, value transparent, char **data)
244 CAMLlocal2(vpixmap, vmask);
247 vpixmap = Val_GdkPixmap_no_ref
248 (gdk_pixmap_colormap_create_from_xpm_d
249 (GdkWindow_val(window), Option_val(colormap,GdkColormap_val,NULL),
250 &mask, Option_val(transparent,GdkColor_val,NULL), data));
251 vmask = Val_GdkBitmap_no_ref (mask);
253 ret = alloc_small (2, 0);
254 Field(ret,0) = vpixmap;
255 Field(ret,1) = vmask;
261 Make_Val_final_pointer (GdkFont, gdk_font_ref, gdk_font_unref, 0)
262 Make_Val_final_pointer_ext (GdkFont, _no_ref, Ignore, gdk_font_unref, 20)
263 ML_1 (gdk_font_load, String_val, Val_GdkFont_no_ref)
264 ML_1 (gdk_fontset_load, String_val, Val_GdkFont_no_ref)
265 ML_2 (gdk_string_width, GdkFont_val, String_val, Val_int)
266 ML_2 (gdk_char_width, GdkFont_val, (gchar)Long_val, Val_int)
267 ML_2 (gdk_string_height, GdkFont_val, String_val, Val_int)
268 ML_2 (gdk_char_height, GdkFont_val, (gchar)Long_val, Val_int)
269 ML_2 (gdk_string_measure, GdkFont_val, String_val, Val_int)
270 ML_2 (gdk_char_measure, GdkFont_val, (char)Long_val, Val_int)
271 Make_Extractor (GdkFont, GdkFont_val, type, Val_gdkFontType)
272 Make_Extractor (GdkFont, GdkFont_val, ascent, Val_int)
273 Make_Extractor (GdkFont, GdkFont_val, descent, Val_int)
277 #define PointArray_val(val) ((GdkPoint*)&Field(val,1))
278 #define PointArrayLen_val(val) Int_val(Field(val,0))
279 Make_Val_final_pointer (GdkRegion, Ignore, gdk_region_destroy, 0)
280 GdkRegion *GdkRegion_val(value val)
282 if (!Field(val,1)) ml_raise_gdk ("attempt to use destroyed GdkRegion");
283 return (GdkRegion*)(Field(val,1));
285 value ml_gdk_region_destroy (value val)
287 if (Field(val,1)) gdk_region_destroy((GdkRegion*)(Field(val,1)));
291 ML_0 (gdk_region_new, Val_GdkRegion)
292 ML_2 (gdk_region_polygon, Insert(PointArray_val(arg1)) PointArrayLen_val,
293 GdkFillRule_val, Val_GdkRegion)
294 ML_2 (gdk_regions_intersect, GdkRegion_val, GdkRegion_val, Val_GdkRegion)
295 ML_2 (gdk_regions_union, GdkRegion_val, GdkRegion_val, Val_GdkRegion)
296 ML_2 (gdk_regions_subtract, GdkRegion_val, GdkRegion_val, Val_GdkRegion)
297 ML_2 (gdk_regions_xor, GdkRegion_val, GdkRegion_val, Val_GdkRegion)
298 ML_2 (gdk_region_union_with_rect, GdkRegion_val, GdkRectangle_val,
300 ML_3 (gdk_region_offset, GdkRegion_val, Int_val, Int_val, Unit)
301 ML_3 (gdk_region_shrink, GdkRegion_val, Int_val, Int_val, Unit)
302 ML_1 (gdk_region_empty, GdkRegion_val, Val_bool)
303 ML_2 (gdk_region_equal, GdkRegion_val, GdkRegion_val, Val_bool)
304 ML_3 (gdk_region_point_in, GdkRegion_val, Int_val, Int_val, Val_bool)
305 ML_2 (gdk_region_rect_in, GdkRegion_val, GdkRectangle_val, Val_gdkOverlapType)
306 ML_2 (gdk_region_get_clipbox, GdkRegion_val, GdkRectangle_val, Unit)
311 Make_Val_final_pointer (GdkGC, gdk_gc_ref, gdk_gc_unref, 0)
312 Make_Val_final_pointer_ext (GdkGC, _no_ref, Ignore, gdk_gc_unref, 20)
313 ML_1 (gdk_gc_new, GdkWindow_val, Val_GdkGC_no_ref)
314 ML_2 (gdk_gc_set_foreground, GdkGC_val, GdkColor_val, Unit)
315 ML_2 (gdk_gc_set_background, GdkGC_val, GdkColor_val, Unit)
316 ML_2 (gdk_gc_set_font, GdkGC_val, GdkFont_val, Unit)
317 ML_2 (gdk_gc_set_function, GdkGC_val, GdkFunction_val, Unit)
318 ML_2 (gdk_gc_set_fill, GdkGC_val, GdkFill_val, Unit)
319 ML_2 (gdk_gc_set_tile, GdkGC_val, GdkPixmap_val, Unit)
320 ML_2 (gdk_gc_set_stipple, GdkGC_val, GdkPixmap_val, Unit)
321 ML_3 (gdk_gc_set_ts_origin, GdkGC_val, Int_val, Int_val, Unit)
322 ML_3 (gdk_gc_set_clip_origin, GdkGC_val, Int_val, Int_val, Unit)
323 ML_2 (gdk_gc_set_clip_mask, GdkGC_val, GdkBitmap_val, Unit)
324 ML_2 (gdk_gc_set_clip_rectangle, GdkGC_val, GdkRectangle_val, Unit)
325 ML_2 (gdk_gc_set_clip_region, GdkGC_val, GdkRegion_val, Unit)
326 ML_2 (gdk_gc_set_subwindow, GdkGC_val, GdkSubwindowMode_val, Unit)
327 ML_2 (gdk_gc_set_exposures, GdkGC_val, Bool_val, Unit)
328 ML_5 (gdk_gc_set_line_attributes, GdkGC_val, Int_val, GdkLineStyle_val,
329 GdkCapStyle_val, GdkJoinStyle_val, Unit)
330 ML_2 (gdk_gc_copy, GdkGC_val, GdkGC_val, Unit)
331 value ml_gdk_gc_get_values (value gc)
336 CAMLlocal2(ret, tmp);
338 gdk_gc_get_values (GdkGC_val(gc), &values);
340 tmp = Val_copy(values.foreground); Store_field(ret, 0, tmp);
341 tmp = Val_copy(values.background); Store_field(ret, 1, tmp);
343 tmp = ml_some(Val_GdkFont(values.font));
344 Store_field(ret, 2, tmp);
346 Field(ret,3) = Val_gdkFunction(values.function);
347 Field(ret,4) = Val_gdkFill(values.fill);
349 tmp = ml_some(Val_GdkPixmap(values.tile));
350 Store_field(ret, 5, tmp);
353 tmp = ml_some(Val_GdkPixmap(values.stipple));
354 Store_field(ret, 6, tmp);
357 tmp = ml_some(Val_GdkPixmap(values.clip_mask));
358 Store_field(ret, 7, tmp);
360 Field(ret,8) = Val_gdkSubwindowMode(values.subwindow_mode);
361 Field(ret,9) = Val_int(values.ts_x_origin);
362 Field(ret,10) = Val_int(values.ts_y_origin);
363 Field(ret,11) = Val_int(values.clip_x_origin);
364 Field(ret,12) = Val_int(values.clip_y_origin);
365 Field(ret,13) = Val_bool(values.graphics_exposures);
366 Field(ret,14) = Val_int(values.line_width);
367 Field(ret,15) = Val_gdkLineStyle(values.line_style);
368 Field(ret,16) = Val_gdkCapStyle(values.cap_style);
369 Field(ret,17) = Val_gdkJoinStyle(values.join_style);
375 value ml_point_array_new (value len)
377 value ret = alloc (1 + Wosize_asize(Int_val(len)*sizeof(GdkPoint)),
382 value ml_point_array_set (value arr, value pos, value x, value y)
384 GdkPoint *pt = PointArray_val(arr) + Int_val(pos);
390 ML_4 (gdk_draw_point, GdkDrawable_val, GdkGC_val, Int_val, Int_val, Unit)
391 ML_6 (gdk_draw_line, GdkDrawable_val, GdkGC_val, Int_val, Int_val,
392 Int_val, Int_val, Unit)
393 ML_bc6 (ml_gdk_draw_line)
394 ML_7 (gdk_draw_rectangle, GdkDrawable_val, GdkGC_val, Bool_val,
395 Int_val, Int_val, Int_val, Int_val, Unit)
396 ML_bc7 (ml_gdk_draw_rectangle)
397 ML_9 (gdk_draw_arc, GdkDrawable_val, GdkGC_val, Bool_val, Int_val, Int_val,
398 Int_val, Int_val, Int_val, Int_val, Unit)
399 ML_bc9 (ml_gdk_draw_arc)
400 ML_4 (gdk_draw_polygon, GdkDrawable_val, GdkGC_val, Bool_val,
401 Insert(PointArray_val(arg4)) PointArrayLen_val, Unit)
402 ML_6 (gdk_draw_string, GdkDrawable_val, GdkFont_val, GdkGC_val, Int_val, Int_val, String_val, Unit)
403 ML_bc6 (ml_gdk_draw_string)
405 ML_9 (gdk_draw_image, GdkDrawable_val, GdkGC_val, GdkImage_val, Int_val, Int_val, Int_val, Int_val, Int_val, Int_val, Unit)
406 ML_bc9 (ml_gdk_draw_image)
410 ML_0 (gdk_rgb_init, Unit)
411 ML_0 (gdk_rgb_get_visual, Val_GdkVisual)
412 ML_0 (gdk_rgb_get_cmap, Val_GdkColormap)
416 /* Have a major collection every 1000 events */
417 Make_Val_final_pointer (GdkEvent, Ignore, gdk_event_free, 1)
418 ML_1 (gdk_event_copy, GdkEvent_val, Val_GdkEvent)
420 value ml_gdk_event_new (value event_type)
423 memset (&event, 0, sizeof(GdkEvent));
424 event.type = GdkEventType_val(event_type);
425 event.any.send_event = TRUE;
426 return Val_copy(event);
429 #define GdkEvent_arg(type) (GdkEvent##type*)GdkEvent_val
431 Make_Extractor (GdkEventAny, GdkEvent_arg(Any), type, Val_gdkEventType)
432 Make_Extractor (GdkEventAny, GdkEvent_arg(Any), window, Val_GdkWindow)
433 Make_Extractor (GdkEventAny, GdkEvent_arg(Any), send_event, Val_bool)
434 Make_Setter (gdk_event_set, GdkEvent_arg(Any), GdkEventType_val, type)
435 Make_Setter (gdk_event_set, GdkEvent_arg(Any), GdkWindow_val, window)
437 Make_Extractor (GdkEventExpose, GdkEvent_arg(Expose), area, Val_copy)
438 Make_Extractor (GdkEventExpose, GdkEvent_arg(Expose), count, Val_int)
440 Make_Extractor (GdkEventVisibility, GdkEvent_arg(Visibility), state,
441 Val_gdkVisibilityState)
443 Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), time, Val_int)
444 Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), x, copy_double)
445 Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), y, copy_double)
446 Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), pressure, copy_double)
447 Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), xtilt, copy_double)
448 Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), ytilt, copy_double)
449 Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), state, Val_int)
450 Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), is_hint, Val_int)
451 Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), source, Val_gdkInputSource)
452 Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), deviceid, Val_int)
453 Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), x_root, copy_double)
454 Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), y_root, copy_double)
456 Make_Extractor (GdkEventButton, GdkEvent_arg(Button), time, Val_int)
457 Make_Extractor (GdkEventButton, GdkEvent_arg(Button), x, copy_double)
458 Make_Extractor (GdkEventButton, GdkEvent_arg(Button), y, copy_double)
459 Make_Extractor (GdkEventButton, GdkEvent_arg(Button), pressure, copy_double)
460 Make_Extractor (GdkEventButton, GdkEvent_arg(Button), xtilt, copy_double)
461 Make_Extractor (GdkEventButton, GdkEvent_arg(Button), ytilt, copy_double)
462 Make_Extractor (GdkEventButton, GdkEvent_arg(Button), state, Val_int)
463 Make_Extractor (GdkEventButton, GdkEvent_arg(Button), button, Val_int)
464 Make_Extractor (GdkEventButton, GdkEvent_arg(Button), source, Val_gdkInputSource)
465 Make_Extractor (GdkEventButton, GdkEvent_arg(Button), deviceid, Val_int)
466 Make_Extractor (GdkEventButton, GdkEvent_arg(Button), x_root, copy_double)
467 Make_Extractor (GdkEventButton, GdkEvent_arg(Button), y_root, copy_double)
469 Make_Setter (gdk_event_button_set, GdkEvent_arg(Button), Int_val, button)
471 Make_Extractor (GdkEventKey, GdkEvent_arg(Key), time, Val_int)
472 Make_Extractor (GdkEventKey, GdkEvent_arg(Key), state, Val_int)
473 Make_Extractor (GdkEventKey, GdkEvent_arg(Key), keyval, Val_int)
474 Make_Extractor (GdkEventKey, GdkEvent_arg(Key), string, Val_string)
476 Make_Extractor (GdkEventCrossing, GdkEvent_arg(Crossing), subwindow,
478 Make_Extractor (GdkEventCrossing, GdkEvent_arg(Crossing), detail,
481 Make_Extractor (GdkEventFocus, GdkEvent_arg(Focus), in, Val_int)
483 Make_Extractor (GdkEventConfigure, GdkEvent_arg(Configure), x, Val_int)
484 Make_Extractor (GdkEventConfigure, GdkEvent_arg(Configure), y, Val_int)
485 Make_Extractor (GdkEventConfigure, GdkEvent_arg(Configure), width, Val_int)
486 Make_Extractor (GdkEventConfigure, GdkEvent_arg(Configure), height, Val_int)
488 Make_Extractor (GdkEventProperty, GdkEvent_arg(Property), atom, Val_int)
489 Make_Extractor (GdkEventProperty, GdkEvent_arg(Property), time, Val_int)
490 Make_Extractor (GdkEventProperty, GdkEvent_arg(Property), state, Val_int)
492 Make_Extractor (GdkEventSelection, GdkEvent_arg(Selection), selection, Val_int)
493 Make_Extractor (GdkEventSelection, GdkEvent_arg(Selection), target, Val_int)
494 Make_Extractor (GdkEventSelection, GdkEvent_arg(Selection), property, Val_int)
495 Make_Extractor (GdkEventSelection, GdkEvent_arg(Selection), requestor, Val_int)
496 Make_Extractor (GdkEventSelection, GdkEvent_arg(Selection), time, Val_int)
498 Make_Extractor (GdkEventProximity, GdkEvent_arg(Proximity), time, Val_int)
499 Make_Extractor (GdkEventProximity, GdkEvent_arg(Proximity), source,
501 Make_Extractor (GdkEventProximity, GdkEvent_arg(Proximity), deviceid, Val_int)
504 Make_Val_final_pointer (GdkDragContext, gdk_drag_context_ref, gdk_drag_context_unref, 0)
505 Make_Flags_val (GdkDragAction_val)
506 ML_3 (gdk_drag_status, GdkDragContext_val, Flags_GdkDragAction_val, Int_val, Unit)
507 Make_Extractor (GdkDragContext, GdkDragContext_val, suggested_action, Val_gdkDragAction)
508 value val_int(gpointer i)
510 return Val_int (GPOINTER_TO_INT(i));
512 value ml_GdkDragContext_targets (value c)
516 t = (GdkDragContext_val(c))->targets;
517 return Val_GList (t, val_int);
521 ML_0 (gdk_flush, Unit)
522 ML_0 (gdk_beep, Unit)