1 \input texinfo @c -*-texinfo-*-
2 @c %**start of header (This is for running texinfo on a region.)
5 @c %**end of header (This is for running texinfo on a region.)
7 @c @documentencoding utf-8
20 @deftp {Structure} \name\
29 @macro Superclass {name}
30 Superclass: @ref{\name\}
38 @macro EnumVRef {name,value}
39 @ref{enum.\name\.\value\,@code{:\value\}}
47 @macro FlagsVRef {name,value}
48 @ref{flags.\name\.\value\,@code{:\value\}}
51 @macro Accessor {name}
52 @deffn {Accessor} \name\
56 @macro TypedAccessor {name, class, type}
57 @deffn {Accessor} \name\ \class\
58 For class: @ref{\class\}
64 @macro GenericFunction {name}
65 @deffn {Generic Function} \name\
70 @deffn {Method} \name\
74 @macro ForeignType {name}
75 @deftp {Foreign Type} \name\
79 @macro Variable {name}
80 @defvr {Special Variable} \name\
84 @macro Condition {name}
85 @deftp {Condition Type} \name\
89 @macro Constant {name}
90 @defvr {Constant} \name\
94 @macro RFunction {name}
95 @anchor{\name\}@defun \name\
100 @anchor{\name\}@defmac \name\
104 @macro RStruct {name}
105 @anchor{\name\}@deftp {Structure} \name\
110 @anchor{\name\}@deftp {Class} \name\
114 @macro RSuperclass {name}
115 @anchor{\name\}Superclass: @ref{\name\}
119 @anchor{\name\}@deftp {Enum} \name\
124 @anchor{\name\}@deftp {Flags} \name\
128 @macro RAccessor {name}
129 @anchor{\name\}@deffn {Accessor} \name\
133 @macro RTypedAccessor {name, class, type}
134 @anchor{\name\}@deffn {Accessor} \name\ \class\
135 For class: @ref{\class\}
141 @macro RGenericFunction {name}
142 @anchor{\name\}@deffn {Generic Function} \name\
146 @macro RMethod {name}
147 @anchor{\name\}@deffn {Method} \name\
151 @macro RForeignType {name}
152 @anchor{\name\}@deftp {Foreign Type} \name\
156 @macro RVariable {name}
157 @anchor{\name\}@defvr {Special Variable} \name\
161 @macro RCondition {name}
162 @anchor{\name\}@deftp {Condition Type} \name\
166 @macro RConstant {name}
167 @anchor{\name\}@defvr {Constant} \name\
171 @macro SlotRef {class, slot}
172 @ref{slot.\class\.\slot\,\class\-\slot\}
175 @macro SignalRef {class, signal}
176 @ref{signal.\class\.\signal\,\class\::\signal\}
183 @macro impnote {text}
185 @strong{Implementor's note:} @emph{\text\}
189 @c Info "requires" that x-refs end in a period or comma, or ) in the
190 @c case of @pxref. So the following implements that requirement for
191 @c the "See also" subheadings that permeate this manual, but only in
194 @macro seealso {name}
200 @c @alias seealso = ref
203 @c Typeset comments in roman font for the TeX output.
205 @c @alias lispcmt = r
208 @c @alias lispcmt = asis
211 @c My copy of makeinfo is not generating any HTML for @result{} for
212 @c some odd reason. (It certainly used to...)
219 @c Similar macro to @result. Its purpose is to work around the fact
220 @c that ⇒ does not work properly inside @lisp.
233 @c ============================= Macros =============================
236 @c Show types, functions, and concepts in the same index.
242 @subtitle A Common Lisp binding for Gtk+
243 @author Dmitry Kalyanov
257 * GObject Reference::
265 @code{cl-gtk2} is the GUI library for Common Lisp. @code{cl-gtk2} is based on @uref{http://www.gtk.org/,,Gtk+} GUI library and is Common Lisp binding for it. @code{cl-gtk2} allows you to create graphical user interfaces for Common Lisp applications.
267 As @code{Gtk+} is based on object system GObject, @code{cl-gtk2} is based on a binding to this object system called @code{cl-gtk2-gobject}.
269 @code{cl-gtk2} provides a thin wrapper around @code{Gtk+} functionality, mostly retaining the same set of classes, properties and methods.
271 The important parts of @code{Gtk+} are:
273 @item GObject type system
280 @item Layout and composition of widgets
282 @item Using Gtk+ with threads
283 @item Building stand-alone applications
287 @chapter Installation
289 @code{cl-gtk2} has the following dependencies. They all must be installed before installing @code{cl-gtk2}.
292 @item @uref{http://common-lisp.net/project/cffi/,,CFFI} (version >= 0.10.4)
293 @item @uref{http://www.cliki.net/trivial-garbage,,Trivial-Garbage} (version >= 0.18)
294 @item @uref{http://common-lisp.net/project/iterate/,,Iterate} (version >= 1.4.3)
295 @item @uref{http://common-lisp.net/project/bordeaux-threads/,,Bordeaux-Threads} (version >= 0.6.0)
296 @item @uref{http://common-lisp.net/project/closer/closer-mop.html,,Closer-MOP} (version >= 0.55)
297 @item @uref{http://common-lisp.net/project/cl-opengl/,,cl-opengl} (if you intend to use <code>cl-gtk2-cairo</code>)
298 @item @uref{http://common-lisp.net/project/cl-cairo2/,,cl-cairo2} (if you intend to use <code>cl-gtk2-gtkglext</code>)
301 At first, source code should be downloded. Current version of CL-GTK2 can be downloaded from @uref{http://common-lisp.net/project/cl-gtk2/files/cl-gtk2-0.1.tar.gz}.
303 Development tree of CL-GTK2 can be cloned with @uref{http://git-scm.org/,,Git}:
305 git clone git://repo.or.cz/cl-gtk2.git
307 or, using the mirror:
309 git clone git://github.com/dmitryvk/cl-gtk2.git
312 To be able to compile, load and use @code{cl-gtk2}, you should register the @code{ASDF} system definitions.
314 To do this, either add @code{glib}, @code{gdk} and @code{gtk} directories to @code{asdf:*central-registry*}:
316 (push "/path/to/cl-gtk2/glib" asdf:*central-registry*)
317 (push "/path/to/cl-gtk2/pango/" asdf:*central-registry*)
318 (push "/path/to/cl-gtk2/gdk" asdf:*central-registry*)
319 (push "/path/to/cl-gtk2/gtk" asdf:*central-registry*)
320 (push "/path/to/cl-gtk2/gtk-glext/" asdf:*central-registry*)
321 (push "/path/to/cl-gtk2/cairo/" asdf:*central-registry*)
323 or create symlinks to @code{cl-gtk2-glib.asd}, @code{cl-gtk2-gdk.asd} and @code{cl-gtk2-gtk.asd} files in a directory where @code{ASDF} systems are located (it might be @code{/usr/share/common-lisp/systems/} for system-wide installation in Gentoo Linux and Debian Linux, @code{~/.sbcl/systems/} for user installation for SBCL compiler):
325 cd ~/.sbcl/systems # depends on your system
326 ln -s /path/to/cl-gtk2/glib/cl-gtk2-glib.asd .
327 ln -s /path/to/cl-gtk2/pango/cl-gtk2-pango.asd .
328 ln -s /path/to/cl-gtk2/gdk/cl-gtk2-gdk.asd .
329 ln -s /path/to/cl-gtk2/gtk/cl-gtk2-gtk.asd .
330 ln -s /path/to/cl-gtk2/gtkglext/cl-gtk2-gtkglext.asd .
331 ln -s /path/to/cl-gtk2/cairo/cl-gtk2-cairo.asd .
334 In Gentoo Linux, it is possible to use layman (see @uref{http://www.gentoo.org/proj/en/overlays/userguide.xml,,Gentoo Overlays Users' Guide}) to add @code{lisp} and @code{cl-gtk2} overlays that contains neccessary ebuilds:
337 layman --overlays=http://github.com/dmitryvk/cl-gtk2-overlay/raw/master/layman-list.xml -a cl-gtk2
343 @chapter GLib Reference
346 @include glib.ref.texi
349 @node GObject Reference
350 @chapter GObject Reference
354 @include gobject.ref.texi
359 @chapter Gdk Reference
361 @include gdk.ref.texi
364 @chapter Gtk Reference
367 @include gtk.ref.texi