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