]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/lablgtk/lablgtk_20001129-0.1.0/ml_gtk.h
.cvsignore files missing
[helm.git] / helm / DEVEL / lablgtk / lablgtk_20001129-0.1.0 / ml_gtk.h
1 /* $Id$ */
2
3 #define GtkObject_val(obj) ((GtkObject*)Field(obj,1))
4 value Val_GtkObject (GtkObject *w);
5 value Val_GtkObject_sink (GtkObject *w);
6 #define GtkAccelGroup_val(val) ((GtkAccelGroup*)Pointer_val(val))
7 value Val_GtkAccelGroup (GtkAccelGroup *);
8 #define GtkStyle_val(val) ((GtkStyle*)Pointer_val(val))
9 value Val_GtkStyle (GtkStyle *);
10
11 #define Val_GtkAny(w) Val_GtkObject((GtkObject*)w)
12 #define Val_GtkAny_sink(w) Val_GtkObject_sink((GtkObject*)w)
13 #define Val_GtkWidget Val_GtkAny
14 #define Val_GtkWidget_sink Val_GtkAny_sink
15
16 #ifdef GTK_NO_CHECK_CASTS
17 #define check_cast(f,v) f(Pointer_val(v))
18 #else
19 #define check_cast(f,v) (Pointer_val(v) == NULL ? NULL : f(Pointer_val(v)))
20 #endif
21
22 #define GtkWidget_val(val) check_cast(GTK_WIDGET,val)
23 #define GtkAdjustment_val(val) check_cast(GTK_ADJUSTMENT,val)
24 #define GtkItem_val(val) check_cast(GTK_ITEM,val)