• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

debian/H26-May-2016-11988

examples/H26-May-2016-474368

widgets/H26-May-2016-1,158900

AUTHORSH A D26-May-2016102 42

COPYINGH A D26-May-201617.6 KiB341281

ChangeLogH A D26-May-201669.8 KiB2,2861,757

INSTALLH A D26-May-20167.5 KiB182141

Makefile.inH A D03-May-20222.9 KiB10774

NEWSH A D26-May-201626 KiB853799

READMEH A D26-May-20161.3 KiB5738

README.gtk-defsH A D26-May-20162.8 KiB13185

README.guile-gtkH A D26-May-201619.2 KiB537387

TODOH A D26-May-2016374 2312

autogen.shH A D26-May-2016790 3830

build-gtk.jlH A D26-May-201642.4 KiB1,3511,183

config.guessH A D26-May-201642.5 KiB1,4421,249

config.subH A D26-May-201635.3 KiB1,8141,676

configure.acH A D26-May-20163.6 KiB158120

gdk-pixbuf.defsH A D26-May-20164.7 KiB244205

gdk.defsH A D26-May-201614 KiB682560

glib.defsH A D26-May-2016555 3222

gtk-compat.cH A D26-May-20165.8 KiB255203

gtk-support.cH A D26-May-20168.5 KiB487422

gtk.defsH A D26-May-201693.9 KiB4,9883,878

gtkbuilder.defsH A D26-May-2016410 2418

gtkfilechooser.defsH A D26-May-20167.3 KiB326250

gtktext.defsH A D26-May-201618.4 KiB958760

gtktree.defsH A D26-May-201624.6 KiB1,198940

gtkuimanager.defsH A D26-May-20162.3 KiB11187

install-shH A D26-May-201613.7 KiB528351

mkinstalldirsH A D26-May-2016676 4123

rep-gtk.cH A D26-May-201663 KiB2,6312,027

rep-gtk.doapH A D26-May-2016761 2017

rep-gtk.ebuild.inH A D26-May-2016838 3022

rep-gtk.hH A D26-May-201611.4 KiB352258

rep-gtk.pc.inH A D26-May-2016180 108

rep-gtk.spec.inH A D26-May-20162.7 KiB10578

rep-types.cH A D26-May-201610 KiB589492

README

1-*- text -*-
2
3This is rep-gtk, a binding of GTK+ for the librep Lisp system. It is
4based on Marius Vollmer's guile-gtk binding (initially version 0.15,
5updated to 0.17), with a new glue-code generator.
6
7For more details see:
8
9	http://sawfish.wikia.com
10
11Installation
12============
13
14Basically, `./configure ; make ; make install'. If you're building from
15the git repository, use ./autogen.sh instead of ./configure.
16
17It requires Gtk+ version 2.
18
19Feedbacks
20=========
21Please report Bugs and all patches to the mailing list
22<sawfish-list@gnome.org>.
23
24When possible, please make patches in unified diff format
25(i.e. 'diff -u' or use 'git diff').
26
27Usage
28=====
29
30Import the module gui.gtk-2.gtk to load the library, then call
31functions as in guile-gtk. The only difference is that Lisp conventions
32are used for booleans, i.e. nil for #f, and non-nil for #t.
33
34See the included *.defs files for the details of how the library maps
35to lisp functions. See also examples.
36
37*** Don't test it from sawfish-client, but use the bare rep. Otherwise,
38Sawfish will crash. ***
39
40Caveats
41=======
42
43It's still too easy to crash the Lisp interpreter through invalid use
44of GTK..
45
46Copyright
47=========
48
49Rep-gtk is released under GPLv2.
50
51Maintainer
52==========
53
54Rep-gtk was originally written by John Harper. The current maintainer
55is Christopher Roy Bratusek.
56E-mail: nano@jpberlin.de
57

README.gtk-defs

1-*-Indented-Text-*-
2
3These notes describe the format of the .defs files
4
5(import "DEFS-FILE")
6(include "DEFS-FILE")
7
8
9(define-enum ENUM-TYPEDEF-NAME
10  (LISP-SYM CPP-MACRO)
11  ...)
12
13
14(define-flags FLAGS-TYPEDEF-NAME
15  (LISP-SYM CPP-MACRO)
16  ...)
17
18
19(define-boxed BOXED-TYPEDEF-NAME
20  ATTR ...)
21
22where each ATTR is one of:
23
24      (copy C-COPY-FUN)
25      (free C-FREE-FUN)
26      (size "C sizeof expression")
27      (fields FIELD ...)
28
29      where each FIELD is (TYPE-SYM NAME-SYM OPTIONS...)
30      each OPTION may be `(setter t)' denoting that the field
31      is settable. Also `(getter FUNCTION-NAME)' defining a custom
32      method of retrieving the value
33
34
35(define-object OBJECT-TYPEDEF-NAME (SUPER-CLASS-TYPEDEF)
36  ATTR ...)
37
38where each ATTR is one of:
39
40      (fields FIELD ...)		[as above]
41
42
43(define-func C-FUNC-NAME
44  RETURN-VALUE [RET-OPTIONS...]
45  (ARG ...)
46  OPTIONS...)
47
48where each ARG is (TYPE NAME-SYM [ARG-OPTIONS...)
49and each OPTION may be one of:
50
51  (scm-name ACTUAL-NAME-STRING)
52  (protection ARG)			; gc protect callback for life of ARG
53  (protection t)			; gc protect callback always
54  (protection *result*)			; gc protect for life of RETURN-VALUE
55  (undeferred t)			; no scm interrupt protection?
56  (rest-arg t)				; last arg is &rest
57  (gerror-arg t)				; last arg is GError arg
58
59and each ARG-OPTION may be one of:
60
61  (= "default expression")
62  (null-ok)				; allow nil
63  (protect-during)
64
65and each RET-OPTION may be one of:
66
67  (copy nil)				; unimplemented?
68
69
70(options OPTION ...)
71
72where each OPTION can be:
73
74      (includes "#include expression")
75      (init-func "name of C function")
76      (other-inits "name of C function" ... )
77      (extra-init-code "code string")
78      (provide FEATURE)
79
80the `provide' option generates the rep dl stub required to provide
81FEATURE and call the init-func when loaded
82
83
84GTK fundamental types seem to include:
85
86	invalid, none, char, bool, int, uint, long, ulong, float,
87	string, enum, flags, boxed, foreign, callback, args, pointer,
88	signal, c-callback, object
89
90static_string:
91  a static string returned from a function
92
93full_callback:
94  a callback function used by the _full function variants (i.e.
95  gtk_signal_connect_full).
96
97file-descriptor:
98  an integer file descriptor
99
100double:
101  a double-precision float
102
103SCM:
104  a scheme object
105
106(list TYPE [MODE]):
107  a glib GList* (doubly-linked)
108
109(slist TYPE [MODE]):
110  a glib GSList* (singly-linked)
111
112(cvec TYPE [MODE]):
113  a counted-vector, stored in sgtk_cvec struct, in gtk_ function calls,
114  it expands ``cvec.data, cvec.len''
115
116(cvecr TYPE [MODE]):
117  similar to cvec but expands ``cvec.len, cvec.data''
118
119(fvec TYPE LEN [MODE]):
120  similar to cvec but fixed length
121
122(ret TYPE):
123  similar to fvec but length is always one. used to mimic the C ``&foo''
124  idiom of returning multiple values
125
126(tvec TYPE [MODE]):
127  zero-terminated vector
128
129[ in the above, MODE is one of `in', `out' or `inout'. Defaults to `in' ]
130
131

README.guile-gtk

1README for guile-gtk preliminary version 0.17
2*********************************************
3
4This is some glue code to make Gtk accessible from Guile so it provides
5a convenient interface for Scheme programmers to develop visual
6applications. It can optionally integrate with GNOME via the Gnome-guile
7module.
8
9Guile-gtk was started by Marius Vollmer <mvo@zagadka.ping.de> and is
10currently maintained by Ariel Rios<jarios@usa.net> and other intrepid Guile
11hackers around the world.
12
13Guile-gtk is free software licensed under the GPL.
14
15New versions of this package will be available from
16
17    http://www.ping.de/sites/zagadka/guile-gtk/
18or in one of the mirrors:
19    http://erin.netpedia.net/guile-gtk/       		(USA)
20    http://erin.linuxbox.com/guile-gtk/       		(USA)
21    http://linux.cem.itesm.mx/~jarios/guile-gtk/        (MEXICO)
22
23You can also get at the most recent development sources through the Gnome
24CVS repository.  Guile-gtk is contained in the gnome-guile module.
25See www.gnome.org for details.
26
27Guile-gtk was made with the idea of making it as generic as possible.
28As a result, it should be easy to extend it to new widgets and other Gtk
29extensions.
30
31It might even be possible to use some of this code for wrapping
32completely different C libraries, but that was not the goal.
33
34To somewhat unify the different high-level language bindings (such as
35the ones for Perl, Python, Objective C, maybe Java, etc.) Marius
36Vollmer tried to collect the salient bits of the Gtk API into a formal
37description.
38
39You should be able to generate large parts of the language specific
40glue code from it.  Unfortunately, this formal description hasn't
41stabilized yet and we are currently more interested in completeness than
42in generality.
43
44   Table of Contents
45
46   - Acknowledgements
47   - Bugs
48   - Mailing List
49   - Gtk versions
50   - Related stuff
51   - Package contents
52   - Installing
53   - Testing
54   - Dynamic Linking
55   - Wrapping Your Own Widgets
56   - Composite Types and `call-by-reference'
57   - Documentation
58
59
60Acknowledgements
61----------------
62
63Many people have contributed to guile-gtk by now.  Many thanks to all
64of them!  Please refer to the ChangeLog for details.
65
66
67Bugs
68----
69
70The main aim still is robustness, with an eye towards completeness.  It
71should not be possible to crash your program from Scheme.  Guile-gtk
72has to cope with anything.  So if you find that your program crashes
73and you think it is due to a bug in your Scheme code, you have
74actually found a bug in guile-gtk or Gtk.
75
76Please report these bugs to the current maintainer,Ariel Rios,
77<jarios@usa.net> or to the mailing list <guile-gtk@sourceware.cygnus.com>
78
79Mailing List
80------------
81To subscribe to the list send mail to:
82<guile-gtk-subscribe@sourceware.cygnus.com>
83
84To post messages please write to:
85<guile-gtk@sourceware.cygnus.com>
86
87Gtk Versions
88------------
89
90[ Whoa, can anyone put this into more simple words?  Seems like I can't
91  see the forest for all the trees. ]
92
93There are two lines of Gtk versions in active development, modeled
94after the Linux kernel scheme, I think.  One is the stable branch that
95will maintain binary compatibility, and the other is the development
96branch, where new features are tried out.  The stable branch has
97version numbers like 1.2.x; the development branch is labeled 1.3.x
98and the absolutely latest version is made available through CVS.
99
100Guile-gtk can be built for both gtk-1.2 and gtk-1.3.  It is possible
101to have these two versions of guile-gtk installed and in use
102simultaneously, but the sources can only be configured for one of them
103at any one time.  That is, when you want to switch between Gtk
104versions, be sure to make distclean and re-configure.
105
106The version number of gtk that guile-gtk has been built for will be
107reflected in the names of the installed programs and libraries.  When
108you are building for gtk-1.2, for example, you will get guile-gtk-1.2
109and libguilegtk-1.2.
110
111Likewise, the guile modules include the version of gtk in their
112prefix.  The modules for gtk-1.2 are named `(gtk-1.2 <suffix>)', for
113example.  When you want to use a specific version of gtk, you thus
114just have to use the right module names.  You can't mix gtk-1.2 and
115gtk-1.3 modules and you will receive an error when you try to do so.
116
117This package will also install generic aliases for both the modules
118and the guile-gtk programs that refer to the gtk version that has been
119used while building it.  In addition to "guile-gtk-1.2" or
120"guile-gtk-1.3" there will also be a symlink from plain "guile-gtk" to
121one of them.  There will also be modules called `(gtk <suffix>)' that
122will dispatch to the `appropriate' version of gtk.  What is
123`appropriate' is determined in two steps: when one of the specific
124modules has already been activated, the generic modules will just
125refer to them.  When no specific gtk module has been used before, they
126will refer to the version of gtk that has been used for building the
127package.
128
129Both guile-gtk-1.2 and guile-gtk-1.3 will activate their specific
130versions of the gtk modules at startup.  Thus, the generic modules
131`(gtk <suffix>)' always refer to gtk version used by the guile-gtk
132executable used to run them.
133
134Guile-gtk should always target the latest released versions of Gtk in
135both lines of development.  There is no reason to use anything else
136than the latest `bug-fixing' gtk-1.2, and everybody who is using the
137unstable gtk-1.3 series can be expected to be up-to-date, right?
138
139
140Related Stuff
141-------------
142
143Jeff Dike is writing a layer of macros/functions on top of guile-gtk
144that makes it simpler and fairly uniform to create widgets within
145Guile.  It is available here
146
147     http://www.mv.com/ipusers/karaya/simple-gtk/simple-gtk.scm
148
149David Lutterkort is writing a tool that makes it easy to give command
150line programs with too many options a nice GUI.  Available here
151
152     http://www.cs.purdue.edu/homes/lutterdc/software/wickel.html
153
154There is also a list of applications developed using guile-gtk in:
155     http://erin.netpedia.net/guile-gtk/apps.html
156
157Package Contents
158----------------
159
160 guile-gtk.c
161 guile-gtk.h     Support for converting between Scheme types and Gtk types
162                 and the basic machine for making it all happen.
163
164 gtk-support.c   Some handwritten glue code.
165 guile-compat.c  Code to adapt to different versions of Guile.
166 gtk-compat.c    Code to adapt to different versions of Gtk.
167
168 gdk-1.2.defs    The formal description of the Gdk API for gtk-1.2.
169 gtk-1.2.defs    The formal description of the Gtk API for gtk-1.2.
170
171 gdk-1.3.defs    The formal description of the Gdk API for gtk-1.3.
172 gtk-1.3.defs    The formal description of the Gtk API for gtk-1.3.
173
174 build-guile-gtk A Scheme program to generate much of the glue code.
175
176 gtk/gtk.scm     The Scheme part of the (gtk gtk) module.
177 gtk/gdk.scm     The Scheme part of the (gtk gdk) module.
178 gtk/dynlink.scm Alternative dlopening that works better than the
179                 one in Guile.
180 gtk/event-repl.scm
181                 Support for event driven read-eval-print loops.
182 gtk-1.2/        Scheme modules for Gtk-1.2
183 gtk-1.3/        Scheme modules for Gtk-1.3
184
185 examples/       Some example programs.
186
187The rest is the usual configuration and building cruft.
188
189
190Installing
191----------
192
193See INSTALL for generic installation instructions.
194
195This package will build a new program, "guile-gtk" that is a regular
196Guile interpreter with the Gtk support already linked in.  It accepts
197the usual "guile" command line options and in addition to that, it
198also understands the Gtk options.
199
200On a few systems, this package is also able to arrange things so that
201you can just use the (gtk gtk) module from a vanilla "guile".  In
202fact, "guile-gtk" is only a kludge until dynamic linking works well
203enough.
204
205The package will also install "build-guile-gtk", a program for
206generating glue code for arbitrary *.defs files.  It can also produce
207new executables that are variants of guile-gtk, with a different set
208of glue code pre-linked.
209
210NOTE: This package installs its Scheme code in a location determined
211by the prefix given to the configure script.  It does not pay
212attention to where your Guile is installed.  When Guile and this
213package are installed under the same prefix, everything is fine.  When
214you use a different prefix for this package, you need to make sure
215that Guile knows about this location.  For example, when you install
216this package under /usr/local/stuff/guile-gtk, you may want to add
217GUILE_LOAD_PATH=/usr/local/stuff/guile-gtk/share/guile to your
218environment.  Or you might want to make some symlinks.  This package
219does not try to be clever about these issues, as there are too many
220variations and potential solutions.
221
222Testing
223-------
224
225    % cd examples/
226    % ../guile-gtk -s test-gtk.scm
227
228should pop up a familiar pile of buttons.  Not every test has been
229implemented, tho.  All unexpected behaviour is probably a bug and I
230would be glad if you would tell me about it.
231
232
233Dynamic Linking
234---------------
235
236Guile-gtk uses its own approach to dynamic linking of compiled code
237modules.  The experimental mechanism provided by Guile itself proved
238to be troublesome in the real world.
239
240As long as you build your shared libraries with libtool, and you have
241the dlopen function, everything should just work.  At least in theory.
242Please refer to gtk/dynlink.scm for the implementation and gtk/gdk.scm
243for a simple application.
244
245The code in gtk/dynlink.scm parses the *.la files installed by libtool
246and uses the information contained therein to resolve inter-library
247dependencies on its own.  When a library is requested that has no
248associated *.la file, it simply calls dlopen with a ".so" suffix.
249When this ".so" library can't be opened it is simply ignored (with a
250warning).
251
252So the rule is: you must make sure that you have correct inter-library
253dependencies.  Either use libtool, which will put these dependencies
254into its *.la files where we can find them; or build your shared
255libraries `by hand', so that dlopen can resolve the dependencies.  In
256either case, do not include static libraries in the inter-library
257dependencies.
258
259As an exception, you do not need to include the Guile libraries
260(-lguile, -lqthreads, etc) in your dependencies, because they are
261always there.  You *do* need -lguilegtk and the Gtk libraries, tho.
262
263We need to use the RTLD_GLOBAL flag to make all this happen, but
264unfortunately, Guile calls dlopen without this flag.  This is why we
265have a very simple libguiledlopenhelper.
266
267The code in gtk/dynlink.scm tries to emulate the way the linker
268searches for libraries: First, each directory in LD_LIBRARY_PATH is
269tried, then "/usr/local/lib", "/usr/lib", "/lib", in that order.
270
271I expect things to change for the better in the future, of course, but
272shared libraries and dlopening are a very effective time-sink, it
273seems.
274
275UPDATE: when configure detects a recent version of libtool that looks
276like it can handle inter-library dependencies on its own,
277gtk/dynlink.scm just opens the library and does not try to be clever
278about *.la files.  Libtool 1.2e works for me in this way.
279
280
281Wrapping Your Own Widgets
282-------------------------
283
284There is a complete autoconfed/automade example for this.
285
286After installing the guile-gtk package, change to the examples/
287directory:
288
289  % cd examples
290  % ./configure
291  % make
292
293Again: you need to have guile-gtk installed for this to work!
294
295Now you should have a new executable `guile-foo' that has glue code
296for the function `foo-new' in the `(gtk foo)' module.  You can test it
297thus:
298
299  % ./guile-foo -s test-foo.scm
300
301Here is the general procedure:
302
303When you have some Gtk widgets that are not described in gtk.defs or
304gdk.defs, you can use build-guile-gtk to automatically generate glue
305code for them.  Here is how to wrap the hypothetical GtkFoo widget and
306its related function gtk-foo-new.  They are assumed to live in gtkfoo.h
307and libfoo.
308
309- Write the foo.defs file
310
311  ;; We use the types defined in gtk-1.2.defs
312
313  (import "gtk-1.2.defs")
314
315  (define-object GtkFoo (GtkWidget))
316
317  (define-func gtk_foo_new
318    GtkFoo
319    ())
320
321  (options
322    ;; Includes needed to compile code that uses GtkFoo.
323    (includes "#include <gtkfoo.h>")
324    ;; The name of the generated initialization function.
325    (init-func "foo_init_glue")
326    ;; Libraries needed to link. libguilefoo will contain
327    ;; the glue code and libfoo contains the widget itself.
328    (libs "-lguilefoo -lfoo"))
329
330- Write the foo.scm file
331
332  (define-module (gtk foo)
333    :use-module (gtk dynlink))
334
335  ;; Call the init function, either using a pre-linked -lguilefoo or
336  ;; dynamically linking it.
337  (merge-compiled-code "foo_init_glue" "libguilefoo")
338
339- Generate the glue code
340
341  % build-guile-gtk glue foo.defs >foo-glue.c
342
343- Compile the glue code into a shared library, using libtool
344
345  [This will be simplified and then explained.  Right now, keep in
346   mind to use gtk-config and build-guile to get all necessary flags and
347   libraries.]
348
349  % libtool --mode=link ... -o libguilefoo.la ...
350
351- Install the shared library, again using libtool.
352
353  % libtool --mode=install cp libguilefoo.la <exec_prefix>/lib/
354
355- Install the foo.scm file
356
357  % cp foo.scm <prefix>/share/guile/gtk/foo.scm
358
359- Install the *.defs files for other people to use.
360
361  % cp foo.defs foo.defs.guile <prefix>/share/guile-gtk/
362
363Now you should be able to just (use-modules (gtk foo)).  When dynamic
364linking does not work for you, you might want to try
365
366  % build-guile-gtk link foo.defs -o guile-foo
367
368This will link a new executable named guile-foo that will have the
369libguilefoo library pre-linked into it so that you do not need
370dynamic-link.  This will work with any number of *.defs files.
371
372
373Composite Types and `call-by-reference'
374---------------------------------------
375
376Guile-gtk has (still experimental) support for composite types like
377lists and vectors.  On the Gtk+ side, the types GSList (singly linked
378list), GList (doubly linked list), and counted and fixed length
379vectors are supported.  On the Scheme side, you can use Scheme lists
380and Scheme vectors.  You can mix these types freely.  That is you can
381use a list on the Scheme side to represent a vector on the Gtk+ side,
382and vice versa.
383
384Composite types have modes associated with them.  They can be `in',
385`out', or `inout'.  When a composite type is marked with a `in' mode,
386the Gtk+ side is not allowed to make changes to the contents of the
387composite.  When it is `out', it must initialize the contents before
388it returns and is not allowed to read it prior to initialization.
389Consequently, mode `inout' indicates that the Gtk+ side may both read
390and write the composite freely, and that the contents has been
391initialized by the caller.  On the Scheme side, mode `out' turns off
392type checking for the contents of composites and the initial values of
393the composite passed to Gtk+ will be undefined.
394
395The default mode is `in'.
396
397The available variations are:
398
399  [ *.defs file syntax ]             [ C side function arguments ]
400  [ Comment ]
401
402  (slist <type> [<mode>])            GSList *lst
403  For singly linked lists.  Scheme owns the memory of the list nodes.
404
405  (list <type> [<mode>])             GList *lst
406  For doubly linked lists.  Scheme owns the memory of the list nodes.
407
408  (cvec <type> [<mode>])             int len, <type>* vec
409  For counted vectors.  The length of the Scheme composite is passed
410  to the Gtk+ function.  Scheme owns the memory of the vector.
411
412  (cvecr <type> [<mode>])            <type>* vec, int len
413  For counted vectors, reverse order of arguments.  Scheme owns the
414  memory of the vector.
415
416  (fvec <type> <len> [<mode>])       <type>* vec
417  For fixed length vectors.  The Scheme composite must be of length <len>.
418  Scheme owns the memory of the vector.
419
420  (ret <type>)                       <type>* vec
421  Abbreviation for (fvec <type> 1 out)
422
423These composite types are also intended to be used for
424call-by-reference arguments.  Neither Scheme nor C really has these
425call-by-reference arguments, so guile-gtk won't either.  In C, you
426would pass a pointer to the desired object; in Scheme you use a
427one-element list or a vector of length one.  For guile-gtk, these
428types are modelled with a `fvec' composite type of length one and mode
429out, or equivalently but shorter with the `ret' type.
430
431For example, when you have a Gtk+ function with a prototype like
432
433    void gtk_foo (char **strptr);
434
435that deposits some string in *STRPTR (whose memory should be taken
436over by the caller), you can wrap it like this:
437
438     (define-func gtk_foo
439       none
440       ((ret string) strptr))
441
442Usage is a little cumbersome from Scheme.  This code snippet
443
444     (let ((strptr (list #f)))
445       (gtk-foo strptr)
446       (car strptr))
447
448would yield the returned string.
449
450
451Documentation
452-------------
453
454Nothing available yet, but the Scheme interface to Gtk is very similar
455to the C one.  Almost all functions take the same arguments as their C
456counterparts.  Exceptions are:
457
458- To access the Gtk functions, you need to use the `(gtk gtk)'
459  module.  You can do this with
460
461    (use-modules (gtk gtk))
462
463  or
464
465    (define-module (your module)
466      :use-modules (gtk gtk))
467
468  Likewise, you need to use the `(gtk gdk)' module if you want to use
469  functions from Gdk.
470
471- Booleans are expressed with Scheme's real boolean values #f and #t.
472
473- Enumerations are expressed with symbols.  For example
474  GTK_WINDOW_TOPLEVEL is written as 'toplevel.  The symbols should be
475  easy to guess from their C counterparts, but they are not completely
476  systematic.  See gtk.defs for the definite details.
477
478- Flags (or bitmasks) are expressed as lists of symbols.  For example
479  GTK_EXPAND|GTK_FILL is '(expand fill).
480
481- Callbacks don't take a client-data argument, so you don't have to
482  specify one to gtk_signal_connect, or gtk_timeout_add, etc.
483
484- Signal handlers don't get the Object as their first argument.  In my
485  view, this would be more often annoying than helpful.
486
487- NULL pointers are expressed as #f.
488
489- Some parameters are optional and get a default value when left
490  unspecified.
491
492- Each type that is derived from GtkObject has an associated predicate
493  function to test whether a Scheme value is of that type.  The
494  predicate for GtkObject is called `gtk-object?', the one for
495  GtkRadioButton `gtk-radio-button?', etc.
496
497- gtk-radio-button-new and gtk-radio-button-new-with-label don't take
498  a list as their group argument but a GtkWidget whose group is used
499  instead.
500
501- Likewise for gtk-radio-menu-item.
502
503- Colors and fonts can be specified with strings, like "red" or
504  "fixed".  If you want to convert from these strings to the real
505  values (for efficiency reasons, say) you can use the functions
506  `gdk-color-intern' and `gdk-font-intern'.
507
508- It might be that your code is loaded into an application that
509  already has an event loop running (or will run one after
510  initialization is complete).  You should then restrain from calling
511  `gtk-main' yourself (except maybe for modal dialog boxes) and you
512  should not terminate the program.
513
514  You can use the function `gtk-standalone?' to find out whether your
515  code is `standalone', i.e. whether you should call `gtk-main'
516  yourself.
517
518  For convenience you can also use
519
520     gtk-standalone-main TOPLEVEL
521
522  This will arrange things so that the program is terminated with
523  `gtk-exit' when the TOPLEVEL widget is destroyed and will call
524  `gtk-main'.  All these things will only happen when
525  `gtk-standalone?' returns true.
526
527
528And all the things I forgot about.  Be sure to read the NEWS file as
529it is currently the only place that documents most details.
530"examples/calc.scm" is quite heavily commented, but does not explain
531Gtk programming.  It is more an example about extensibility.
532
533Have fun!
534
535Marius Vollmer
536Ariel Rios
537