chiark / gitweb /
New function CLG-VERSION
[clg] / README
CommitLineData
560af5c5 1This package contains Common Lisp bindings to GTK+ v2.0. It currently
792ab9c7 2only works with CMUCL 19a and SBCL. Ports to other CL implementations
3may be added later.
560af5c5 4
5
6New versions
7------------
8
f00b458d 9The most recent version of this package can be found: in CVS
560af5c5 10
11
12
13Build instructions
14------------------
15
792ab9c7 161. When building for SBCL (at least 0.8.19 or earlier) you first need
17 to add callback support, since SBCL does not yet has a native
18 callback facility. The following instructions are borrowed from the
19 Common Music installation guide:
20
21 1. Download Thomas Burdick's Alien Function package╣ and restore it
22 to a directory on your machine.
23 2. Compile the Alien Function package and save a new sbcl.core image:
24
25 $ cd sbcl-af
26 $ sbcl --load "system"
27 * (sb-ext:save-lisp-and-die "/tmp/sbcl.core")
28 $ cd /usr/local/lib/sbcl
29 $ cp sbcl.core sbcl.core.orig
30 $ mv /tmp/sbcl.core .
31
32
33 ╣ http://pinhead.music.uiuc.edu/~hkt/sbcl-af-2004-10-22.tgz
560af5c5 34
af2d02f4 35
f00b458d 362. Set up paths to reflect your system:
af2d02f4 37
792ab9c7 38 - Add a logical-pathname-translation to the clg root directory in
39 ~/.cmucl-init.lisp, ~/.sbclrc or some other startup file. Example:
af2d02f4 40
f00b458d 41 (setf
42 (logical-pathname-translations "clg")
43 '(("**;*.*.*" "/home/espen/src/clg/**/")))
44
792ab9c7 45 - Set the correct pkg-config search path if your Gtk+ installation
f00b458d 46 is in an unusual place, by adding it to the PKG_CONFIG_PATH
47 environment variable before starting lisp.
48
792ab9c7 49 - Make sure ASDF finds the system definition files:
50 $ cd ~/.clc/systems
51 $ find <path to clg> -name '*.asd' -exec ln -s {} . \;
f00b458d 52
53
543. Compile and load the system:
55
56 (asdf:oos 'asdf:load-op :gtk)
57
792ab9c7 58 In CMUCL this will currently fail with:
f00b458d 59
60 Error in function KERNEL::%REDEFINE-DEFSTRUCT:
61 Redefining class PCL::SLOT-INFO incompatibly with the current definition.
62
792ab9c7 63 Just accept the redefinition (restart 1) to continue building or
64 loading. To avoid doing this every time clg is loaded, one may
65 compile and load glib/pcl.lisp in newly started CMUCL process and
66 save an new core image.
67
68 If you are running SBCL with Slime you need to put the following
69 line in ~/.swank.lisp to prevent Slime from spawning multiple
70 threads, since Gtk+ is not thread safe:
71
72 #+sbcl(setq swank:*communication-style* :fd-handler)
af2d02f4 73
af2d02f4 74
754. If everything worked, try (load "hello-world") to see a small
f00b458d 76 window pop up, and then run testgtk.lisp in the example directory.
77
af2d02f4 78
af2d02f4 79
792ab9c7 80Guidelines for using the GTK+ API documentation
81-----------------------------------------------
82
83Here are some brief guidelines for using the GTK+ API documentation. A
84lot of (both intentionally and unintentionally) inconsistencies
85exists, so it is also wise to check the source code.
86
87- library prefixes are stripped from all symbols
88
89- the get/set part are removed from regular accessors, but retained
90 in functions which set or retrieve multiple values
560af5c5 91
792ab9c7 92- predicate functions follow the normal convention of ending
93 with '-P'
560af5c5 94
792ab9c7 95- if there are multiple similar named functions which only differ in
96 the type of argument they accept, only one function accepting any
97 kind of valid argument types is provided
560af5c5 98
792ab9c7 99- there are no gtk_*_new functions, use MAKE-INSTANCE to create widgets
100
101- all object properties are available as virtual slots. A lot of
102 "missing" properties are manually defined as slots
103
104- use CHILD-PROPERTY-VALUE or automatically defined accessors to
105 access child properties
106
107- use STYLE-PROPERTY-VALUE to access style properties
108
109- the only function used to connect signals is SIGNAL-CONNECT
110
111
112
113
114
115Send comments and patches to clg-devel@lists.sourceforge.net or
116espen@users.sourceforge.net.