5 #include <caml/mlvalues.h>
6 #include <caml/alloc.h>
7 #include <caml/memory.h>
8 #include <caml/callback.h>
19 #define GtkButton_val(val) check_cast(GTK_BUTTON,val)
20 ML_0 (gtk_button_new, Val_GtkWidget_sink)
21 ML_1 (gtk_button_new_with_label, String_val, Val_GtkWidget_sink)
22 ML_1 (gtk_button_pressed, GtkButton_val, Unit)
23 ML_1 (gtk_button_released, GtkButton_val, Unit)
24 ML_1 (gtk_button_clicked, GtkButton_val, Unit)
25 ML_1 (gtk_button_enter, GtkButton_val, Unit)
26 ML_1 (gtk_button_leave, GtkButton_val, Unit)
28 /* gtktogglebutton.h */
30 #define GtkToggleButton_val(val) check_cast(GTK_TOGGLE_BUTTON,val)
31 ML_0 (gtk_toggle_button_new, Val_GtkWidget_sink)
32 ML_1 (gtk_toggle_button_new_with_label, String_val, Val_GtkWidget_sink)
33 ML_2 (gtk_toggle_button_set_mode, GtkToggleButton_val, Bool_val, Unit)
34 ML_2 (gtk_toggle_button_set_active, GtkToggleButton_val, Bool_val, Unit)
35 ML_1 (gtk_toggle_button_toggled, GtkToggleButton_val, Unit)
36 Make_Extractor (gtk_toggle_button_get, GtkToggleButton_val, active, Val_bool)
38 /* gtkcheckbutton.h */
40 #define GtkCheckButton_val(val) check_cast(GTK_CHECK_BUTTON,val)
41 ML_0 (gtk_check_button_new, Val_GtkWidget_sink)
42 ML_1 (gtk_check_button_new_with_label, String_val, Val_GtkWidget_sink)
44 /* gtkradiobutton.h */
46 #define GtkRadioButton_val(val) check_cast(GTK_RADIO_BUTTON,val)
47 static GSList* button_group_val(value val)
49 return (val == Val_unit ? NULL :
50 gtk_radio_button_group(GtkRadioButton_val(Field(val,0))));
52 ML_1 (gtk_radio_button_new, button_group_val,
54 ML_2 (gtk_radio_button_new_with_label, button_group_val,
55 String_val, Val_GtkWidget_sink)
56 ML_2 (gtk_radio_button_set_group, GtkRadioButton_val, button_group_val, Unit)
60 #define GtkToolbar_val(val) check_cast(GTK_TOOLBAR,val)
61 ML_2 (gtk_toolbar_new, Orientation_val, Toolbar_style_val, Val_GtkWidget_sink)
62 ML_2 (gtk_toolbar_insert_space, GtkToolbar_val, Int_val, Unit)
63 ML_7 (gtk_toolbar_insert_element, GtkToolbar_val, Toolbar_child_val,
64 Insert(NULL) Optstring_val, Optstring_val, Optstring_val, GtkWidget_val,
65 Insert(NULL) Insert(NULL) Int_val, Val_GtkWidget)
66 ML_bc7 (ml_gtk_toolbar_insert_element)
67 ML_5 (gtk_toolbar_insert_widget, GtkToolbar_val, GtkWidget_val,
68 Optstring_val, Optstring_val, Int_val, Unit)
69 ML_2 (gtk_toolbar_set_orientation, GtkToolbar_val, Orientation_val, Unit)
70 ML_2 (gtk_toolbar_set_style, GtkToolbar_val, Toolbar_style_val, Unit)
71 ML_2 (gtk_toolbar_set_space_size, GtkToolbar_val, Int_val, Unit)
72 ML_2 (gtk_toolbar_set_space_style, GtkToolbar_val, Toolbar_space_style_val, Unit)
73 ML_2 (gtk_toolbar_set_tooltips, GtkToolbar_val, Bool_val, Unit)
74 ML_2 (gtk_toolbar_set_button_relief, GtkToolbar_val, Relief_style_val, Unit)
75 ML_1 (gtk_toolbar_get_button_relief, GtkToolbar_val, Val_relief_style)