source: trunk/third/rep-gtk/README @ 18404

Revision 18404, 2.9 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18403, which included commits to RCS files with non-trunk default branches.
RevLine 
[15285]1-*- text -*-
2
3This is rep-gtk 0.0, a binding of GTK+/GNOME/libglade for the rep Lisp
4system. It is based on Marius Vollmer's guile-gtk binding (initially
5version 0.15, updated to 0.17), with a new glue-code generator.
6
7For more details see:
8
9        http://rep-gtk.sourceforge.net/
10
11Browse the CVS history at:
12
13        http://tizer.dcs.warwick.ac.uk:8080/cgi-bin/cvsweb/rep-gtk
14
15
16Installation
17============
18
19Basically, `./configure ; make ; make install'. If you're building from
20the CVS repository, execute `aclocal ; autoconf' first.
21
[18403]22It requires Gtk+ version 2.
[15285]23
[18403]24WARNING: The libglade and GNOME bindings are currently untested and
25probably broken since the port to Gtk2, use at your own risk.
[15285]26
[18403]27
[15285]28Usage
29=====
30
[18403]31Import the module gui.gtk-2.gtk to load the library, then call
32functions as in guile-gtk. The only difference is that Lisp conventions
33are used for booleans, i.e. nil for #f, and non-nil for #t.
[15285]34
[18403]35See the included *.defs files for the details of how the library maps
36to lisp functions.
[15285]37
38
39libglade
40========
41
42From the libglade README file:
43
44    This library allows you to load glade interface files in a program
45    at runtime. It doesn't require GLADE to be used, but GLADE is by
46    far the easiest way to create the interface files.
47
48So you can now use GLADE with rep! Here's an example from the
49examples/test-libglade script:
50
[18403]51    (require 'gui.gtk-2.libglade)
[15285]52
53    (let ((xml (or (glade-xml-new (car command-line-args))
54                   (error "something bad happened"))))
55      (glade-xml-signal-autoconnect xml)
56      (gtk-main))
57
58The glade-xml-new function takes a filename, and creates a widget
59hierarchy. glade-xml-signal-autoconnect connects all signal handlers to
60the lisp functions named in the GLADE file. You can also use the
61glade-xml-signal-connect function to connect individually named
62handlers. (see libglade.defs for the complete function list)
63
64
65GNOME
66=====
67
68There's also now reasonably complete bindings of gnome and gnomeui.
69These extra modules will get built and installed:
70
[18403]71        gui.gtk-2.gnome-lib     Non-UI GNOME functions, doesn't require GTK
72        gui.gtk-2.gnome-ui      GNOME UI widgets and utilities
73        gui.gtk-2.gnome-canvas  GNOME Canvas widgets and utilities
[15285]74
75see the .defs files for the gruesome details about what goes in what.
76The dependence tree is something like:
77
78        types -+- gtk -+- libglade
[18403]79                     \  \
80                      \   gnome-ui -+- gnome-canvas
81                       \
82                         gnome-lib
[15285]83
[18403]84gui.gtk-2.types provides conversions for the basic C types (and GLIB's
[15285]85GList and GSList types).
86
[18403]87When `gui.gtk-2.gnome-ui' is loaded the gnome-init function is called
[15285]88automatically. If the special variables `*gnome-app-id*' and
89`*gnome-app-version*' are bound to strings, then these values will be
90used, otherwise something will be fabricated.
91
[18403]92However, if using `gui.gtk-2.gnome-lib' without `gui.gtk-2.gnome-ui',
93you should call `gnomelib-init' manually.
[15285]94
95
96Caveats
97=======
98
99It's still too easy to crash the Lisp interpreter through invalid use
100of GTK..
[18403]101
Note: See TracBrowser for help on using the repository browser.