X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/clg/blobdiff_plain/4cbcd094279ede76a76d653cebcef9cb1dd49dee..c0bc39e53c16a7e408b7bb0ecb13dc605f0b8ea4:/README diff --git a/README b/README index 5b6d55b..494dcc1 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ This package contains Common Lisp bindings to GTK+ v2.x. It currently -only works with CMUCL 19a and SBCL (0.8.21), but ports to other CL +works with CMUCL 19, SBCL 0.9 and CLISP. Ports to other CL implementations may be added later. @@ -14,10 +14,10 @@ http://sourceforge.net/projects/clg. Build instructions ------------------ -1. When building for SBCL you first need to add callback support, - since SBCL does not yet has a native callback facility. The - following instructions are borrowed from the Common Music - installation guide: +1. If you are using a version of SBCL without native callback support + you need to upgrade or add third party callback code. The following + instructions of how to add callback support, are borrowed + from the Common Music installation guide: 1. Download Thomas Burdick's Alien Function package¹ and restore it to a directory on your machine. @@ -31,8 +31,9 @@ Build instructions $ mv /tmp/sbcl.core . - ¹ A slightly modified version which works with SBCL 0.8.21 could be - found at http://jupiter.td.org.uit.no/lisp/sbcl-0.8.21-af.tar.gz + ¹ A slightly modified version which works with SBCL 0.8.21 or newer + could be found at + http://jupiter.td.org.uit.no/lisp/sbcl-0.8.21-af.tar.gz 2. Set up paths to match your system: @@ -51,10 +52,10 @@ Build instructions - Make sure ASDF finds the system definition files: - (push - #+sbcl(truename #p"clg:systems") - #+cmu(concatenate 'string (unix-namestring #p"clg:systems") "/") - asdf:*central-registry*) + (push + (translate-logical-pathname "clg:systems;") + asdf:*central-registry*) + When checking out of CVS also do the following: $ cd @@ -66,15 +67,15 @@ Build instructions (asdf:oos 'asdf:load-op :gtk) - In CMUCL this will currently fail with: + In CMUCL 19a this will fail with: Error in function KERNEL::%REDEFINE-DEFSTRUCT: Redefining class PCL::SLOT-INFO incompatibly with the current definition. Just accept the redefinition (restart 1) to continue building or - loading. To avoid doing this every time clg is loaded, one may - compile and load glib/pcl.lisp in newly started CMUCL process and - save an new core image. + loading. To avoid doing this every time clg is loaded, compile + and load glib/pcl.lisp in newly started CMUCL process and save a + new core image. If you are running SBCL with Slime you need to put the following in ~/.swank.lisp to prevent Slime from spawning multiple @@ -82,6 +83,9 @@ Build instructions #+sbcl(setq swank:*communication-style* :fd-handler) + CLISP needs to be started with the option '-ansi' for clg to + compile and load. + 4. If everything worked, try (load "hello-world") to see a small window pop up, and then run testgtk.lisp in the example directory. @@ -97,6 +101,11 @@ so it is also wise to check the source code. - library prefixes are stripped from all symbols +- object properties should be available as virtual slots. A lot of + "missing" properties are manually defined as slots. Slots may be read + only or write only, but there later type are generally only + defined automatically through introspection + - the get/set part are removed from regular accessors, but retained in functions which set or retrieve multiple values @@ -109,9 +118,6 @@ so it is also wise to check the source code. - there are no gtk_*_new functions, use MAKE-INSTANCE to create widgets -- all object properties are available as virtual slots. A lot of - "missing" properties are manually defined as slots - - use CHILD-PROPERTY-VALUE or automatically defined accessors to access child properties @@ -119,6 +125,35 @@ so it is also wise to check the source code. - the only function used to connect signals is SIGNAL-CONNECT +- some additional initargs to make-instance: + + - gtk:container + + child -- adds a child to a container widget. This argument could + be a widget or a list who's first element is a widget and the rest + child properties. Multiple :child initargs may be specified + + children -- list of children to be added + + child-args -- default child properties used when adding children (during + construction only) + + show-children -- automatically make children (and grandchildren) + visible. May be overridden in a child by explicit specifying :visible or + another :show-children + + + - gtk:button + + stock -- equivalent to ":label stock :use-stock t :use-underline t" + + + - gtk:dialog + + button -- button specification applied to dialog-add-button. Multiple + :button initargs may be specified + + buttons -- list of button specifications