[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mon, 12 Feb 2007 05:47:36 +0000
$ svn co https://galinha.ucpel.tche.br/svn/chicken-eggs/gtk2
(login anonymous, leave the password response empty)
This may be of interest to GUI enthusiasts.
The interesting part of the code, to me, is what is built on top of
the wrapped library. g+ is a very clean, Scheme-like GUI library that
keeps the fussiness of the underlying C implementation well away from
the Chicken code.
Here for instance, in g+, is a GTK OptionMenu object containing an
embedded button and a nested menu, with the signal handlers embedded
in the menu structure.
(lambda (i) (print "Chose 1"))))
(lambda _ (print "Why, hello!"))))
(lambda (i) (print "Chose 2"))))
(lambda (i) (print "Chose 3"))))))
This is an egg from code originally produced by Tony Garnock-Jones
(tonyg) in 2002. The code rotted a bit over the years, and I spent a
few days in January cleaning it up so it builds and runs on my Ubuntu
system. Tony G responded to my licensing request yesterday and
permitted me to upload the updated code. I've packaged it as an egg.
The main part of the code is a pretty straightforward wrap of libgtk2
and libglade. The only unusual thing is that a bespoke wrap program
is used instead of SWIG, and relies on "defs" files that are published
by the (Python) PyGTK project.
This egg is NOT related to the gtk egg produced by Alejandro Forero
Cuervo and Manuel Alejandro Cerón Estrada. That other project was
based on SWIG bindings and seems to have stalled.
There are issues with this egg as it stands at present. It is
definitely not usable for anything serious yet.
Firstly, libgtk+ is absolutely huge and this is an attempt to wrap it
all. The build process is an absolute beast and takes ages to run on
my system. It should probably be split up into bite-sized chunks.
There are UNIX dependencies in the build process, most notably the
shell script "extract-all-types" which really should be converted to
There are also probably some strong gtk-2.0 version dependencies. It
builds on my Ubuntu system with Ubuntu's stock gtk 2.8.20 build. It
also expects libglade. I cannot make promises about which other
versions of GTK it will run on, and if you want to build it without
libglade support you'll have to tweak the code a bit.
The wrapping system doesn't correctly handle variable argument lists
with a NULL sentinel, despite the gtk headers signalling the usage
Some of the demo programs fail mysteriously. Tony G and I think it's
a pointer wrapping problem, and I'll be working on fixing that.
Further bug reports would be most welcome. Please include details of
your system and the version of libgtk you're using.
- [Chicken-users] gtk2.egg,
Tony Sidaway <=