5 #include <caml/mlvalues.h>
6 #include <caml/alloc.h>
7 #include <caml/memory.h>
8 #include <caml/callback.h>
19 #define GtkAlignment_val(val) check_cast(GTK_ALIGNMENT,val)
20 ML_4 (gtk_alignment_new, Float_val, Float_val, Float_val, Float_val,
22 value ml_gtk_alignment_set (value x, value y,
23 value xscale, value yscale, value val)
25 GtkAlignment *alignment = GtkAlignment_val(val);
26 gtk_alignment_set (alignment,
27 Option_val(x, Float_val, alignment->xalign),
28 Option_val(y, Float_val, alignment->yalign),
29 Option_val(xscale, Float_val, alignment->xscale),
30 Option_val(yscale, Float_val, alignment->xscale));
36 ML_0 (gtk_event_box_new, Val_GtkWidget_sink)
40 #define GtkFrame_val(val) check_cast(GTK_FRAME,val)
41 ML_1 (gtk_frame_new, Optstring_val, Val_GtkWidget_sink)
42 ML_2 (gtk_frame_set_label, GtkFrame_val, Optstring_val, Unit)
43 ML_3 (gtk_frame_set_label_align, GtkFrame_val, Float_val, Float_val, Unit)
44 ML_2 (gtk_frame_set_shadow_type, GtkFrame_val, Shadow_type_val, Unit)
45 Make_Extractor (gtk_frame_get, GtkFrame_val, label_xalign, copy_double)
46 Make_Extractor (gtk_frame_get, GtkFrame_val, label_yalign, copy_double)
48 /* gtkaspectframe.h */
50 #define GtkAspectFrame_val(val) check_cast(GTK_ASPECT_FRAME,val)
51 ML_5 (gtk_aspect_frame_new, Optstring_val,
52 Float_val, Float_val, Float_val, Bool_val, Val_GtkWidget_sink)
53 ML_5 (gtk_aspect_frame_set, GtkAspectFrame_val, Float_val, Float_val,
54 Float_val, Bool_val, Unit)
55 Make_Extractor (gtk_aspect_frame_get, GtkAspectFrame_val, xalign, copy_double)
56 Make_Extractor (gtk_aspect_frame_get, GtkAspectFrame_val, yalign, copy_double)
57 Make_Extractor (gtk_aspect_frame_get, GtkAspectFrame_val, ratio, copy_double)
58 Make_Extractor (gtk_aspect_frame_get, GtkAspectFrame_val, obey_child, Val_bool)
62 #define GtkHandleBox_val(val) check_cast(GTK_HANDLE_BOX,val)
63 ML_0 (gtk_handle_box_new, Val_GtkWidget_sink)
64 ML_2 (gtk_handle_box_set_shadow_type, GtkHandleBox_val, Shadow_type_val, Unit)
65 ML_2 (gtk_handle_box_set_handle_position, GtkHandleBox_val, Position_val, Unit)
66 ML_2 (gtk_handle_box_set_snap_edge, GtkHandleBox_val, Position_val, Unit)
70 ML_0 (gtk_invisible_new, Val_GtkWidget_sink)
75 ML_1 (gtk_item_select, GtkItem_val, Unit)
76 ML_1 (gtk_item_deselect, GtkItem_val, Unit)
77 ML_1 (gtk_item_toggle, GtkItem_val, Unit)
81 #define GtkViewport_val(val) check_cast(GTK_VIEWPORT,val)
82 ML_2 (gtk_viewport_new, GtkAdjustment_val, GtkAdjustment_val,
84 ML_1 (gtk_viewport_get_hadjustment, GtkViewport_val, Val_GtkWidget_sink)
85 ML_1 (gtk_viewport_get_vadjustment, GtkViewport_val, Val_GtkWidget)
86 ML_2 (gtk_viewport_set_hadjustment, GtkViewport_val, GtkAdjustment_val, Unit)
87 ML_2 (gtk_viewport_set_vadjustment, GtkViewport_val, GtkAdjustment_val, Unit)
88 ML_2 (gtk_viewport_set_shadow_type, GtkViewport_val, Shadow_type_val, Unit)
90 /* gtkscrolledwindow.h */
92 #define GtkScrolledWindow_val(val) check_cast(GTK_SCROLLED_WINDOW,val)
93 ML_2 (gtk_scrolled_window_new, GtkAdjustment_val ,GtkAdjustment_val,
95 ML_2 (gtk_scrolled_window_set_hadjustment, GtkScrolledWindow_val ,
96 GtkAdjustment_val, Unit)
97 ML_2 (gtk_scrolled_window_set_vadjustment, GtkScrolledWindow_val ,
98 GtkAdjustment_val, Unit)
99 ML_1 (gtk_scrolled_window_get_hadjustment, GtkScrolledWindow_val,
101 ML_1 (gtk_scrolled_window_get_vadjustment, GtkScrolledWindow_val,
103 ML_3 (gtk_scrolled_window_set_policy, GtkScrolledWindow_val,
104 Policy_type_val, Policy_type_val, Unit)
105 Make_Extractor (gtk_scrolled_window_get, GtkScrolledWindow_val,
106 hscrollbar_policy, Val_policy_type)
107 Make_Extractor (gtk_scrolled_window_get, GtkScrolledWindow_val,
108 vscrollbar_policy, Val_policy_type)
109 ML_2 (gtk_scrolled_window_set_placement, GtkScrolledWindow_val,
110 Corner_type_val, Unit)
111 ML_2 (gtk_scrolled_window_add_with_viewport, GtkScrolledWindow_val,
116 #define GtkSocket_val(val) check_cast(GTK_SOCKET,val)
117 ML_0 (gtk_socket_new, Val_GtkWidget_sink)
118 ML_2 (gtk_socket_steal, GtkSocket_val, XID_val, Unit)