doc/Makefile: do not run makeinfo when only style.css changes
[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 cffi
154 @acronym{CFFI}
155 @end macro
156
157 @macro impnote {text}
158 @quotation
159 @strong{Implementor's note:} @emph{\text\}
160 @end quotation
161 @end macro
162
163 @c Info "requires" that x-refs end in a period or comma, or ) in the
164 @c case of @pxref.  So the following implements that requirement for
165 @c the "See also" subheadings that permeate this manual, but only in
166 @c Info mode.
167 @ifinfo
168 @macro seealso {name}
169 @ref{\name\}.
170 @end macro
171 @end ifinfo
172
173 @c @ifnotinfo
174 @c @alias seealso = ref
175 @c @end ifnotinfo
176
177 @c Typeset comments in roman font for the TeX output.
178 @c @iftex
179 @c @alias lispcmt = r
180 @c @end iftex
181 @c @ifnottex
182 @c @alias lispcmt = asis
183 @c @end ifnottex
184
185 @c My copy of makeinfo is not generating any HTML for @result{} for
186 @c some odd reason. (It certainly used to...)
187 @ifhtml
188 @macro result
189 =>
190 @end macro
191 @end ifhtml
192
193 @c Similar macro to @result. Its purpose is to work around the fact
194 @c that ⇒ does not work properly inside @lisp.
195 @ifhtml
196 @macro res
197 @html
198 ⇒
199 @end html
200 @end macro
201 @end ifhtml
202
203 @ifnothtml
204 @alias res = result
205 @end ifnothtml
206
207 @c ============================= Macros =============================
208
209
210 @c Show types, functions, and concepts in the same index.
211 @syncodeindex tp cp
212 @syncodeindex fn cp
213
214 @titlepage
215 @title CL-GTK2
216 @subtitle A Common Lisp binding for Gtk+
217 @author Dmitry Kalyanov
218 @end titlepage
219
220 @contents
221
222 @ifnottex
223 @node Top
224 @top cl-gtk2-gtk
225 @end ifnottex
226
227 @menu
228 * Overview::
229 * Installation::
230 * GLib Reference::
231 * GObject Reference::
232 * Gdk Reference::
233 * Gtk Reference::
234 @end menu
235
236 @node Overview
237 @chapter Overview
238
239 @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.
240
241 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}.
242
243 @code{cl-gtk2} provides a thin wrapper around @code{Gtk+} functionality, mostly retaining the same set of classes, properties and methods.
244
245 The important parts of @code{Gtk+} are:
246 @itemize
247 @item GObject type system
248 @itemize
249 @item Classes
250 @item Objects
251 @item Signals
252 @end itemize
253 @item Events
254 @item Layout and composition of widgets
255 @item Widget set
256 @item Using Gtk+ with threads
257 @item Building stand-alone applications
258 @end itemize
259
260 @node Installation
261 @chapter Installation
262
263 @code{cl-gtk2} has the following dependencies. They all must be installed before installing @code{cl-gtk2}.
264
265 @itemize
266 @item @uref{http://common-lisp.net/project/cffi/,,CFFI} (version >= 0.10.4)
267 @item @uref{http://www.cliki.net/trivial-garbage,,Trivial-Garbage} (version >= 0.18)
268 @item @uref{http://common-lisp.net/project/iterate/,,Iterate} (version >= 1.4.3)
269 @item @uref{http://common-lisp.net/project/bordeaux-threads/,,Bordeaux-Threads} (version >= 0.6.0)
270 @item @uref{http://common-lisp.net/project/closer/closer-mop.html,,Closer-MOP} (version >= 0.55)
271 @end itemize
272
273 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.
274
275 To get sources with Git, clone @code{cl-gtk2} repository:
276 @example
277 git clone git://repo.or.cz/cl-gtk2.git
278 @end example
279 or the mirror:
280 @example
281 git clone git://github.com/dmitryvk/cl-gtk2.git
282 @end example
283
284 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}.
285
286 To be able to compile, load and use @code{cl-gtk2}, you should register the @code{ASDF} system definitions.
287
288 To do this, either add @code{glib}, @code{gdk} and @code{gtk} directories to @code{asdf:*central-registry*}:
289 @lisp
290 (push "/path/to/cl-gtk2/glib" asdf:*central-registry*)
291 (push "/path/to/cl-gtk2/gdk" asdf:*central-registry*)
292 (push "/path/to/cl-gtk2/gtk" asdf:*central-registry*)
293 @end lisp
294 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):
295 @example
296 cd ~/.sbcl/systems           # depends on your system
297 ln -s /path/to/cl-gtk2/glib/cl-gtk2-glib.asd .
298 ln -s /path/to/cl-gtk2/gdk/cl-gtk2-gdk.asd .
299 ln -s /path/to/cl-gtk2/gtk/cl-gtk2-gtk.asd .
300 @end example
301
302 @node GLib Reference
303 @chapter GLib Reference
304
305 @lowersections
306 @include glib.ref.texi
307 @raisesections
308
309 @node GObject Reference
310 @chapter GObject Reference
311
312 @lowersections
313
314 @include gobject.ref.texi
315
316 @raisesections
317
318 @node Gdk Reference
319 @chapter Gdk Reference
320
321 @include gdk.ref.texi
322
323 @node Gtk Reference
324 @chapter Gtk Reference
325
326 @lowersections
327 @include gtk.ref.texi
328 @raisesections
329
330 @bye