signature GLIB structure GLib : GLIB
The GLib structure provides access to core library of GTK. As most of the facilities offered by GLib are already provided by the Alice System only a very small part of GLib is wrapped.
See the overview page for a general introduction to the GTK library binding.
See also: Pango Atk Gdk, Gtk, Canvas
import signature GLIB from "x-alice:/lib/gtk/GLIB-sig" import structure GLib from "x-alice:/lib/gtk/GLib"
signature GLIB = sig type object = Core.object type gtype = Core.gtype type gvalue = Core.gvalue type prop = Core.prop type prop_initializer = Core.prop_initializer (* begin of CORE-sig.aml *) datatype event = EVENT_NOTHING | EVENT_DELETE | EVENT_DESTROY | EVENT_EXPOSE of {window:object, send:bool, area_x:int, area_y:int, area_height:int, area_width:int, region:object, count:int} | EVENT_MOTION_NOTIFY of {window:object, send:bool, time:int, x:real, y:real, state:int, is_hint:int, device: object, x_root:real, y_root:real} | EVENT_BUTTON_PRESS of {window:object, send:bool, time:int, x:real, y:real, state:int, button:int, device: object, x_root:real, y_root:real} | EVENT_2BUTTON_PRESS of {window:object, send:bool, time:int, x:real, y:real, state:int, button:int, device: object, x_root:real, y_root:real} | EVENT_3BUTTON_PRESS of {window:object, send:bool, time:int, x:real, y:real, state:int, button:int, device: object, x_root:real, y_root:real} | EVENT_BUTTON_RELEASE of {window:object, send:bool, time:int, x:real, y:real, state:int, button:int, device: object, x_root:real, y_root:real} | EVENT_KEY_PRESS of {window:object, send:bool, time:int, state:int, keyval:int, length:int, string:string, hardware_keycode:int, group:int} | EVENT_KEY_RELEASE of {window:object, send:bool, time:int, state:int, keyval:int, length:int, string:string, hardware_keycode:int, group:int} | EVENT_ENTER_NOTIFY of {window:object, send:bool, subwindow:object, time:int, x:real, y:real, x_root:real, y_root:real, mode:int, detail:int, focus:bool, state:int} | EVENT_LEAVE_NOTIFY of {window:object, send:bool, subwindow:object, time:int, x:real, y:real, x_root:real, y_root:real, mode:int, detail:int, focus:bool, state:int} | EVENT_FOCUS_CHANGE of {window:object, send:bool, hasFocus:bool} | EVENT_CONFIGURE of {window:object, send:bool, x:int, y:int, width:int, height:int} | EVENT_MAP | EVENT_UNMAP | EVENT_PROPERTY_NOTIFY | EVENT_SELECTION_CLEAR | EVENT_SELECTION_REQUEST | EVENT_SELECTION_NOTIFY | EVENT_PROXIMITY_IN | EVENT_PROXIMITY_OUT | EVENT_DRAG_ENTER | EVENT_DRAG_LEAVE | EVENT_DRAG_MOTION | EVENT_DRAG_STATUS | EVENT_DROP_START | EVENT_DROP_FINISHED | EVENT_CLIENT_EVENT | EVENT_VISIBILITY_NOTIFY of {window:object, send:bool, state:int} | EVENT_NO_EXPOSE of {window:object, send:bool} | EVENT_SCROLL of {window:object, send:bool, time:int, x:real, y:real, state:int, direction:int, device:object, x_root:real, y_root:real} | EVENT_WINDOW_STATE | EVENT_SETTING | EVENT_UNSUPPORTED of object datatype arg = BOOL of bool | INT of int | REAL of real | STRING of string | OBJECT of object | LIST of object list | EVENT of event val NULL : object val TRUE : int val FALSE : int type callback_function = object * arg list -> unit val signalConnect : object * string * callback_function -> int val signalConnectAfter : object * string * callback_function -> int val signalDisconnect : object * int -> unit val signalHandlerBlock : object * int -> unit val signalHandlerUnblock : object * int -> unit val latin1ToUtf8 : string -> string val utf8ToLatin1 : string -> string val lock : Lock.lock structure Types : sig val string : gtype val int : gtype val float : gtype val double : gtype val pixbuf : gtype end structure Value : sig (* exception TypeError *) val undefined : unit -> gvalue val int : int -> gvalue val enum : int * gtype -> gvalue val string : string -> gvalue val float : real -> gvalue val double : real -> gvalue val bool : bool -> gvalue val object : object -> gvalue val toInt : gvalue -> int val toString : gvalue -> string val toReal : gvalue -> real val toBool : gvalue -> bool val toObject : gvalue -> object val getType : gvalue -> gtype end structure Prop : sig val setL : object -> prop_initializer list -> unit val set : 'a prop -> object * 'a -> unit val get : 'a prop -> object -> 'a val rawSet : object * string * gvalue -> unit val rawGet : object * string -> gvalue val name : 'a prop -> string val prop : 'a prop * 'a -> prop_initializer (* creation *) val newProp : string * ('a -> gvalue) * (gvalue -> 'a) -> 'a prop end (* end of CORE-sig.aml *) structure TimeVal : sig (* constructors *) val new : { tv_sec : int, tv_usec : int } -> object (* methods *) val getFieldTvUsec : object -> int val setFieldTvUsec : object * int -> unit val getFieldTvSec : object -> int val setFieldTvSec : object * int -> unit end structure PtrArray : sig (* constructors *) val new : unit -> object (* methods *) val index : object * int -> object val getFieldLen : object -> int val setFieldLen : object * int -> unit end structure Object : sig (* constructors *) (* methods *) val getProperty : object * string -> gvalue val setProperty : object * string * gvalue -> unit (* properties *) end end
We do not give a full documentation here. We rather recommend
to read the Porting Guide. It
gives a comprehensive overview on what has been made available.