The GTK addon supports the GNU GTK+ 2.0 library for creating graphical user interfaces, see GTK+ Reference Manual. Amongst other things, this will allow J console to provide a GUI without requiring a Sun Java installation.
The addon has only been tested under Linux32 and Linux64. GTK+ 2.0 is also available under Windows and Mac, and the code should work on those platforms with little or no change.
To download and install the latest binaries from www.jsoftware.com, start a J session and execute
Restart J after you have updated the binaries.
The initial release of the addon has definitions and cover verbs needed for Plot, and there is a new gtk output type. The cover verbs include replacements for the glxxx verbs in gl2.ijs. Since the GTK libraries are likely available in any Linux installation, the default output for Plot in Linux console has been set to gtk.
The gui/gtk/source/demo directory has several demos. Those named tutX.ijs are based on examples from the GTK+ 2.0 Tutorial.
The addon has API definitions in scripts cd.ijs and noun.ijs. These are a very small fraction of the total GTK+ 2.0 API. An almost complete api set is in corresponding scripts allapi.ijs and alldef.ijs.
The reason for including only the small subset of API definitions is that it should be much easier to learn how the API works by studying definitions needed for J. As more use is made of the addon, additional definitions can be copied from the allxxx scripts.
- calls to GTK hand over event handling to the gtk_main loop. In this case, the J session waits until GTK signals an event to a J event handler. It may be possible for J to poll the gtk events so that the J session remains active, but this has not been tested.
- using GTK in Jwdp causes the session to become unstable. This is likely a problem with the Jwdp interface, rather than GTK, but it means that GTK testing is best done in J console.