As you have already seen this in action with the nGui library, you can jump straight into this, now, with
the help of an example. An image of this is shown in Figure 17 - 8 .
import gtk.Gtk;
class Basic
{
public static function main()
{
Gtk.init();
var win = Gtk.call.windowNew( [TOPLEVEL] );
Gtk.call.windowSetTitle( [win, ???Basic Example???] );
Gtk.call.windowPresent( [win] );
Gtk.run();
}
}
Table 17-11
hxGtk Type haXe Type Description
gunichar, gchar String Unicode and standard character strings.
gboolean Bool A standard Boolean. Either true, or false.
gulong, guint32,
guint16, guint, gint
Int Various sized integers. These will be converted to a
haXe Int, though under some circumstances, data
truncation may occur.
gfloat,gdouble Float Various sized floating-point values. Unlike
integers, no truncation will occur.
[other] Void All other values are expected to be pointers to
complex data structures, though on occasion, an
array may be returned.
502
Part III: Extending the Possibilities
hxGtk Events
In such a short space, you ??™ ve already covered a great deal.
Pages:
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932