The Gtk.* modules provide wrappers for most of the functions in the GTK+ api. They try to apply a Wrapl/Riva style to the functions, for example:
For the most part, writing GTK+ apps using Wrapl is quite similar to writing them in C.
Since there is a one-to-one mapping of GTK+ objects to Riva objects, and since the riva module loader is extensible at runtime, the module Gtk.Glader.Loader registers a loader for .glade files. A .glade loaded in this fashion behaves like a Riva module, exporting widgets as Riva objects using their names in the .glade file. In addition, they can be set to automatically connect to Wrapl/Riva functions to handle signals. Callbacks are specified as Module.Export where Module is the path of the module separated by /'s. To denote a module relative to the directory containing the .glade file, Module should start with a /.
The following code combined with the proceeding .glade file will produce the same result as the code above. There is one caveat: the module must be loaded using riva -PGtk/Glade/Loader -L. Gtk2, in order to preload Gtk.Glade.Loader, and so that the module Gtk2 is loaded within the module system and not as an anonymous module.