Gtk+-2.0 bindings for GNU Smalltalk 

MISSION

The aim of these bindings is to give a convenient set of bindings for Gtk. They aren't intended to be a set of Blox bindings, because it's enough to do to get them working without trying to conform to an unfamiliar API. OTOH, I suspect that it would be quite easy to adapt them - witness the CodeBuffer example, which is only slightly modified from the Blox Browser. I don't think it would be appropriate to try and force rubber-sheet geometry on Gtk, though.

All of the C bindings have been lovingly hand-crafted, so they are a long way from being complete. However, the Gtk API contains a lot of duplication and convenience functions, and the bindings implemented cover most functionality (see tests/examples). The major grey areas are Text and Trees, because they are substantially more complex than your average widget.



BUILDING AND INSTALLING

Automake is in use, so with a bit of luck you can 

./configure
make

THIS ASSUMES that Gtk is installed in prefix /usr. 'fraid I haven't yet looked up how to use pkgconfig with automake to work this out automatically.

You need to copy the resulting library to the smalltalk library directory, which on my setup is /usr/local/share/smalltalk (ie. GST installed in prefix /usr/local).



TESTS / EXAMPLES

The tests/examples assume that you've copied gst.im to the current directory so that it will pick up the packages.xml there. You can then run them with:

cd tests
gst -I ../gst.im TestCodeBuffer.st



MAJOR OMISSIONS / APOLOGIES

* Signals need reworking. You can only currently only bind one callback to any given signal.

* Not reconciled with Norman Jordan's work on the pre-existing Gtk bindings. 
This is basically because I was already working on these at the time that Norman announced them, and I have little enough time as it is.
Also, I have an aesthetic objection to leaving control in Gtk's main loop, rather than with Smalltalk. Actually, that's not just an aesthetic objection - I would want to be able to use multiple Smalltalk processes, which you couldn't do if you were using the Gtk main loop.

* Reloading of Text and Tree widgets not yet implemented.

* Commenting / documentation is largely absent.



I hope this is of some interest to somebody. Any feedback which is not too hostile will be gratefully received.

Mike Anderson 14 July 2003.