The code can be improved as follows:
' Glade Hello World
' GTK Interface
include gtk.bas
' Initialize GTK & Glade
gtk_init("NULL", "NULL")
glade_init
' Load and show Glade defined window
xml = glade_xml_new("hello.glade")
glade_xml_signal_autoconnect(xml)
' Get window ID and define window close event
win = glade_xml_get_widget(xml, "window1")
gtk_server_connect(win, "delete-event", "window")
' Event Handler
REPEAT
this_event = gtk_server_callback("WAIT")
UNTIL this_event = "window"
END
The 'gtk.bas' file in the Scriptbasic include directory already contains individual wrappers for the GTK and GLADE functions mentioned in the GTK-server configfile. This way you can program GTK as if you are using the original API.
Regards