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

Revision 15286, 3.1 KB checked in by ghudson, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r15285, which included commits to RCS files with non-trunk default branches.
Line 
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
22Currently it only works with GTK 1.2.
23
24
25Usage
26=====
27
28Do `(require 'gui.gtk.gtk)' to load the library, then call functions as
29in guile-gtk. The only difference is that Lisp conventions are used for
30booleans, i.e. nil for #f, and non-nil for #t.
31
32I changed the names of three functions:
33
34        gtk-idle-add-full => gtk-idle-add
35        gtk-container-foreach-full => gtk-container-foreach
36        gtk-signal-set-class-function-full => gtk-signal-set-class-function
37
38
39libglade
40========
41
42Also included is a binding of James Henstridge's excellent libglade
43(http://www.daa.com.au/~james/gnome/)
44
45From the libglade README file:
46
47    This library allows you to load glade interface files in a program
48    at runtime. It doesn't require GLADE to be used, but GLADE is by
49    far the easiest way to create the interface files.
50
51So you can now use GLADE with rep! Here's an example from the
52examples/test-libglade script:
53
54    (require 'gui.gtk.libglade)
55
56    (let ((xml (or (glade-xml-new (car command-line-args))
57                   (error "something bad happened"))))
58      (glade-xml-signal-autoconnect xml)
59      (gtk-main))
60
61The glade-xml-new function takes a filename, and creates a widget
62hierarchy. glade-xml-signal-autoconnect connects all signal handlers to
63the lisp functions named in the GLADE file. You can also use the
64glade-xml-signal-connect function to connect individually named
65handlers. (see libglade.defs for the complete function list)
66
67
68GNOME
69=====
70
71There's also now reasonably complete bindings of gnome and gnomeui.
72These extra modules will get built and installed:
73
74        gui.gnome.lib           Non-UI GNOME functions, doesn't require GTK
75        gui.gnome.ui            GNOME UI widgets and utilities
76        gui.gnome.canvas        GNOME Canvas widgets and utilities
77        gui.gtk.gdk-pixbuf      Image loading and rendering
78        gui.gnome.canvas-pixbuf CanvasItem for displaying GdkPixbuf's
79
80see the .defs files for the gruesome details about what goes in what.
81The dependence tree is something like:
82
83                           gdk-pixbuf
84                         /
85        types -+- gtk -+- libglade
86                     \   \
87                      \    ui -+- canvas
88                       \        \
89                         lib      canvas-pixbuf
90
91gui.gtk.types provides conversions for the basic C types (and GLIB's
92GList and GSList types).
93
94When `gui.gnome.ui' is loaded the gnome-init function is called
95automatically. If the special variables `*gnome-app-id*' and
96`*gnome-app-version*' are bound to strings, then these values will be
97used, otherwise something will be fabricated.
98
99However, if using `gui.gnome.lib' without `gui.gnome.ui', you should
100call `gnomelib-init' manually.
101
102To use libglade with the GNOME widgets, load the `gui.gnome.libglade'
103module instead of `gui.gtk.libglade'
104
105
106Caveats
107=======
108
109It's still too easy to crash the Lisp interpreter through invalid use
110of GTK..
Note: See TracBrowser for help on using the repository browser.