[plt-scheme] Gnome/GTK bindings

From: Neil W. Van Dyke (neil at neilvandyke.org)
Date: Thu Dec 19 08:44:38 EST 2002

I actually already have the majority of GTK+ 2 (and GDK, Pango, and some
of GLib) API working from MzScheme, and have ported and run a couple
small demos.  Tentatively called "HoG".

I used my own S-expression syntax for representing the API as alluded to
in the header files, since the de facto ".defs" files had PyGtk-isms,
and it was easier to re-encode the header files than to manually verify
thousands of definitions.  Also, I needed to work through the API as a
learning exercise, since many of the important points of how to do
bindings for GTK 2 are not documented.

I've not yet released HoG because there are numerous gotchas that you
only discover once you've implemented all the ".defs"-based generation,
marshalling, GClosure, GObject, enums, etc.  Most of the gotchas are
artifacts of an incomplete move of the API to `bindings-friendly'
GObject/GClosure.  Unfortunately, many of these incomplete API pieces
are used by the "gtk-demo" app, and would likely be needed for
real-world applications.  I also need to inspect for potential GC and
memory-traipsing problems.

I might do some more work on it over the holiday, while professors are
away.  I put status updates in my weblog.  Feel free to email me.

P.S., Be skeptical of unproven GTK bindings projects.  Last time I
      looked, most GTK bindings sets (with JH's own PyGtk2 a notable
      exception) don't actually work and have not been used to write
      apps.  The Java bindings I looked at were hopeless, for example,
      although I understand that Sun has recently decided to make good
      bindings.

-- 
                                             http://www.neilvandyke.org/


Posted on the users mailing list.