-*- text -*- This is rep-gtk 0.18.2, a binding of GTK+/GNOME/libglade for the rep Lisp system. It is based on Marius Vollmer's guile-gtk binding (initially version 0.15, updated to 0.17), with a new glue-code generator. For more details see: http://rep-gtk.sourceforge.net/ Browse the SVN tree at: http://svn.gnome.org/viewvc/rep-gtk/ Installation ============ Basically, `./configure ; make ; make install'. If you're building from the SVN repository, use ./autogen.sh instead of ./configure. It requires Gtk+ version 2. WARNING: The GNOME bindings are currently untested and probably broken since the port to Gtk2, use at your own risk. The libglade binding is definitively broken Usage ===== Import the module gui.gtk-2.gtk to load the library, then call functions as in guile-gtk. The only difference is that Lisp conventions are used for booleans, i.e. nil for #f, and non-nil for #t. See the included *.defs files for the details of how the library maps to lisp functions. libglade ======== From the libglade README file: This library allows you to load glade interface files in a program at runtime. It doesn't require GLADE to be used, but GLADE is by far the easiest way to create the interface files. So you can now use GLADE with rep! Here's an example from the examples/test-libglade script: (require 'gui.gtk-2.libglade) (let ((xml (or (glade-xml-new (car command-line-args)) (error "something bad happened")))) (glade-xml-signal-autoconnect xml) (gtk-main)) The glade-xml-new function takes a filename, and creates a widget hierarchy. glade-xml-signal-autoconnect connects all signal handlers to the lisp functions named in the GLADE file. You can also use the glade-xml-signal-connect function to connect individually named handlers. (see libglade.defs for the complete function list) GNOME ===== There's also now reasonably complete bindings of gnome and gnomeui. These extra modules will get built and installed: gui.gtk-2.gnome-lib Non-UI GNOME functions, doesn't require GTK gui.gtk-2.gnome-ui GNOME UI widgets and utilities gui.gtk-2.gnome-canvas GNOME Canvas widgets and utilities see the .defs files for the gruesome details about what goes in what. The dependence tree is something like: types -+- gtk -+- libglade \ \ \ gnome-ui -+- gnome-canvas \ gnome-lib gui.gtk-2.types provides conversions for the basic C types (and GLIB's GList and GSList types). When `gui.gtk-2.gnome-ui' is loaded the gnome-init function is called automatically. If the special variables `*gnome-app-id*' and `*gnome-app-version*' are bound to strings, then these values will be used, otherwise something will be fabricated. However, if using `gui.gtk-2.gnome-lib' without `gui.gtk-2.gnome-ui', you should call `gnomelib-init' manually. Caveats ======= It's still too easy to crash the Lisp interpreter through invalid use of GTK..