Typo
[cl-gtk2.git] / doc / gtk.texi
1 \input texinfo  @c -*-texinfo-*-
2 @c %**start of header (This is for running texinfo on a region.)
3 @setfilename gtk.info
4 @settitle CL-Gtk2
5 @c %**end of header (This is for running texinfo on a region.)
6
7 @c @documentencoding utf-8
8
9 @macro Function {name}
10 @defun \name\
11 @end defun
12 @end macro
13
14 @macro Macro {name}
15 @defmac \name\
16 @end defmac
17 @end macro
18
19 @macro Struct {name}
20 @deftp {Structure} \name\
21 @end deftp
22 @end macro
23
24 @macro Class {name}
25 @deftp {Class} \name\
26 @end deftp
27 @end macro
28
29 @macro Superclass {name}
30 Superclass: @ref{\name\}
31 @end macro
32
33 @macro Enum {name}
34 @deftp {Enum} \name\
35 @end deftp
36 @end macro
37
38 @macro Flags {name}
39 @deftp {Flags} \name\
40 @end deftp
41 @end macro
42
43 @macro Accessor {name}
44 @deffn {Accessor} \name\
45 @end deffn
46 @end macro
47
48 @macro TypedAccessor {name, class, type}
49 @deffn {Accessor} \name\ \class\
50 For class: @ref{\class\}
51
52 Type: \type\
53 @end deffn
54 @end macro
55
56 @macro GenericFunction {name}
57 @deffn {Generic Function} \name\
58 @end deffn
59 @end macro
60
61 @macro ForeignType {name}
62 @deftp {Foreign Type} \name\
63 @end deftp
64 @end macro
65
66 @macro Variable {name}
67 @defvr {Special Variable} \name\
68 @end defvr
69 @end macro
70
71 @macro Condition {name}
72 @deftp {Condition Type} \name\
73 @end deftp
74 @end macro
75
76 @macro Constant {name}
77 @defvr {Constant} \name\
78 @end defvr
79 @end macro
80
81 @macro RFunction {name}
82 @anchor{\name\}@defun \name\
83 @end defun
84 @end macro
85
86 @macro RMacro {name}
87 @anchor{\name\}@defmac \name\
88 @end defmac
89 @end macro
90
91 @macro RStruct {name}
92 @anchor{\name\}@deftp {Structure} \name\
93 @end deftp
94 @end macro
95
96 @macro RClass {name}
97 @anchor{\name\}@deftp {Class} \name\
98 @end deftp
99 @end macro
100
101 @macro RSuperclass {name}
102 @anchor{\name\}Superclass: @ref{\name\}
103 @end macro
104
105 @macro REnum {name}
106 @anchor{\name\}@deftp {Enum} \name\
107 @end deftp
108 @end macro
109
110 @macro RFlags {name}
111 @anchor{\name\}@deftp {Flags} \name\
112 @end deftp
113 @end macro
114
115 @macro RAccessor {name}
116 @anchor{\name\}@deffn {Accessor} \name\
117 @end deffn
118 @end macro
119
120 @macro RTypedAccessor {name, class, type}
121 @anchor{\name\}@deffn {Accessor} \name\ \class\
122 For class: @ref{\class\}
123
124 Type: \type\
125 @end deffn
126 @end macro
127
128 @macro RGenericFunction {name}
129 @anchor{\name\}@deffn {Generic Function} \name\
130 @end deffn
131 @end macro
132
133 @macro RForeignType {name}
134 @anchor{\name\}@deftp {Foreign Type} \name\
135 @end deftp
136 @end macro
137
138 @macro RVariable {name}
139 @anchor{\name\}@defvr {Special Variable} \name\
140 @end defvr
141 @end macro
142
143 @macro RCondition {name}
144 @anchor{\name\}@deftp {Condition Type} \name\
145 @end deftp
146 @end macro
147
148 @macro RConstant {name}
149 @anchor{\name\}@defvr {Constant} \name\
150 @end defvr
151 @end macro
152
153 @macro SlotRef {class, slot}
154 @ref{slot.\class\.\slot\,\class\-\slot\}
155 @end macro
156
157 @macro SignalRef {class, signal}
158 @ref{signal.\class\.\signal\,\class\::\signal\}
159 @end macro
160
161 @macro cffi
162 @acronym{CFFI}
163 @end macro
164
165 @macro impnote {text}
166 @quotation
167 @strong{Implementor's note:} @emph{\text\}
168 @end quotation
169 @end macro
170
171 @c Info "requires" that x-refs end in a period or comma, or ) in the
172 @c case of @pxref.  So the following implements that requirement for
173 @c the "See also" subheadings that permeate this manual, but only in
174 @c Info mode.
175 @ifinfo
176 @macro seealso {name}
177 @ref{\name\}.
178 @end macro
179 @end ifinfo
180
181 @c @ifnotinfo
182 @c @alias seealso = ref
183 @c @end ifnotinfo
184
185 @c Typeset comments in roman font for the TeX output.
186 @c @iftex
187 @c @alias lispcmt = r
188 @c @end iftex
189 @c @ifnottex
190 @c @alias lispcmt = asis
191 @c @end ifnottex
192
193 @c My copy of makeinfo is not generating any HTML for @result{} for
194 @c some odd reason. (It certainly used to...)
195 @ifhtml
196 @macro result
197 =>
198 @end macro
199 @end ifhtml
200
201 @c Similar macro to @result. Its purpose is to work around the fact
202 @c that ⇒ does not work properly inside @lisp.
203 @ifhtml
204 @macro res
205 @html
206 ⇒
207 @end html
208 @end macro
209 @end ifhtml
210
211 @ifnothtml
212 @alias res = result
213 @end ifnothtml
214
215 @c ============================= Macros =============================
216
217
218 @c Show types, functions, and concepts in the same index.
219 @syncodeindex tp cp
220 @syncodeindex fn cp
221
222 @titlepage
223 @title CL-GTK2
224 @subtitle A Common Lisp binding for Gtk+
225 @author Dmitry Kalyanov
226 @end titlepage
227
228 @contents
229
230 @ifnottex
231 @node Top
232 @top cl-gtk2-gtk
233 @end ifnottex
234
235 @menu
236 * Overview::
237 * Installation::
238 * GLib Reference::
239 * GObject Reference::
240 * Gdk Reference::
241 * Gtk Reference::
242 @end menu
243
244 @node Overview
245 @chapter Overview
246
247 @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.
248
249 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}.
250
251 @code{cl-gtk2} provides a thin wrapper around @code{Gtk+} functionality, mostly retaining the same set of classes, properties and methods.
252
253 The important parts of @code{Gtk+} are:
254 @itemize
255 @item GObject type system
256 @itemize
257 @item Classes
258 @item Objects
259 @item Signals
260 @end itemize
261 @item Events
262 @item Layout and composition of widgets
263 @item Widget set
264 @item Using Gtk+ with threads
265 @item Building stand-alone applications
266 @end itemize
267
268 @node Installation
269 @chapter Installation
270
271 @code{cl-gtk2} has the following dependencies. They all must be installed before installing @code{cl-gtk2}.
272
273 @itemize
274 @item @uref{http://common-lisp.net/project/cffi/,,CFFI} (version >= 0.10.4)
275 @item @uref{http://www.cliki.net/trivial-garbage,,Trivial-Garbage} (version >= 0.18)
276 @item @uref{http://common-lisp.net/project/iterate/,,Iterate} (version >= 1.4.3)
277 @item @uref{http://common-lisp.net/project/bordeaux-threads/,,Bordeaux-Threads} (version >= 0.6.0)
278 @item @uref{http://common-lisp.net/project/closer/closer-mop.html,,Closer-MOP} (version >= 0.55)
279 @end itemize
280
281 At first, source code of @code{cl-gtk2} needs to be downloaded. There are two options to download the sources: use @uref{http://git-scm.org/,,Git} or download @code{tar.gz} archive.
282
283 To get sources with Git, clone @code{cl-gtk2} repository:
284 @example
285 git clone git://repo.or.cz/cl-gtk2.git
286 @end example
287 or the mirror:
288 @example
289 git clone git://github.com/dmitryvk/cl-gtk2.git
290 @end example
291
292 Or download and unpack the @code{tar.gz}-archived @uref{http://repo.or.cz/w/cl-gtk2.git?a=snapshot;h=HEAD;sf=tgz,,snapshot} of @code{cl-gtk2}.
293
294 To be able to compile, load and use @code{cl-gtk2}, you should register the @code{ASDF} system definitions.
295
296 To do this, either add @code{glib}, @code{gdk} and @code{gtk} directories to @code{asdf:*central-registry*}:
297 @lisp
298 (push "/path/to/cl-gtk2/glib" asdf:*central-registry*)
299 (push "/path/to/cl-gtk2/gdk" asdf:*central-registry*)
300 (push "/path/to/cl-gtk2/gtk" asdf:*central-registry*)
301 @end lisp
302 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):
303 @example
304 cd ~/.sbcl/systems           # depends on your system
305 ln -s /path/to/cl-gtk2/glib/cl-gtk2-glib.asd .
306 ln -s /path/to/cl-gtk2/gdk/cl-gtk2-gdk.asd .
307 ln -s /path/to/cl-gtk2/gtk/cl-gtk2-gtk.asd .
308 @end example
309
310 @node GLib Reference
311 @chapter GLib Reference
312
313 @lowersections
314 @include glib.ref.texi
315 @raisesections
316
317 @node GObject Reference
318 @chapter GObject Reference
319
320 @lowersections
321
322 @include gobject.ref.texi
323
324 @raisesections
325
326 @node Gdk Reference
327 @chapter Gdk Reference
328
329 @include gdk.ref.texi
330
331 @node Gtk Reference
332 @chapter Gtk Reference
333
334 @lowersections
335 @include gtk.ref.texi
336 @raisesections
337
338 @bye