Bigloo GTK-Server Bindings
So frikkin' alpha, you wouldn't believe it (v.4/Inf)
Overview
Do you like forms? I do. Buttons, textboxes, and shiny
scrollbars...
Do you like Scheme? I do. Macros, continuations, closures, and tail
recursion...
Not long ago, someone was complaining on a mailing list that GUI's were
hard to build with Bigloo. Well, this should make it considerably
easier. The files below are the library (gtk-server.sch), and
the example program pictured above (test.scm), which shows some
useage of the library.
Installation
-
Get Bigloo
(http://www.bigloo.org)
and install it somewhere. (Silently thank Manuel Serrano for making
this a possibility.)
-
Get GTK-Server
(http://www.gtk-server.org)
and stick the binary and config file in your path somewhere.
(Silently thank Peter van Eerten for making this a possibility.)
-
Download these files, and compile the example test.scm like
bigloo -o test test.scm
-
Run the resultant test program: it should look like the
screenshot above.
Documentation
May the source be with you.
-
You can get Scheme predicates to test for any GTK-Server events ala
the distributed example, test.scm. No callback machinery is
necessary because of GTK-Server's design. This makes programs
Bigloo-backend agnostic.
-
GTK-Server functions that take NULL arguments don't need those NULL
arguments specified in the use of their corresponding Scheme functions.
Skip right over them.
-
Widget types should be considered opaque. Don't go messing with the
contents. (They are kept as a string, should you want to store them
in a hashtable).
-
Communication with the GTK-Server via the
(with-gtk-server ...) macro should be "safe". If it's not,
now, eventually it will be.
ChangeLog
v.4/Inf
-
This release relaxes the Bigloo 2.7A Beta (July 7th+) requirement in
favor of using new features in GTK-Server v.2.0.3. This release no
longer has a 2K limit on data returned from the user interface, as well
as being able to read multiline strings. Also, users can use BOOL in
function arguments, now, as opposed to only having BOOL available as
a return type. Peter also upgraded his release to be based upon GTK
2.6.8, meaning fewer Windows bugs.
- v.3/Inf
-
This release includes a major fix that relies on the latest Bigloo,
2.7A Beta (July 7th+), only available in source form via the
Bigloo FTP server. You can now safely read multiline strings
from GTK-Server, no matter what platform you are on. Also added the
ability to use enums from their scheme name.
- v.2/Inf
-
This release cleaned up the namespace pollution significantly.
Everything GTK-Server related is in the (with-gtk-server ...)
macro (which means if you want to override function definitions,
you must do it within the lexical contour introduced in that macro).
- v.1/Inf
-
This initial release suffered from namespace pollution issues and a
horrible bug disallowing use of functions with a string return type.
Bugs
Warning: I've done very little testing, specifically on the Unices.
Bugs? shutej@crazilocks.com
|