2 (:use :cl :glib :cffi :tg :bordeaux-threads :iter :closer-mop :gobject.ffi)
14 #:g-type-interface-prerequisites
17 #:g-class-property-definition
18 #:g-class-property-definition-name
19 #:g-class-property-definition-type
20 #:g-class-property-definition-readable
21 #:g-class-property-definition-writable
22 #:g-class-property-definition-constructor
23 #:g-class-property-definition-constructor-only
24 #:g-class-property-definition-owner-type
27 #:interface-properties
41 #:signal-info-owner-type
43 #:signal-info-return-type
44 #:signal-info-param-types
77 #:define-g-object-class
81 #:define-g-boxed-class
92 #:allocate-stable-pointer
94 #:get-stable-pointer-value
100 #:register-object-type-implementation
116 #:registered-object-type-by-name
121 #:boxed-c-structure-name
128 #:g-type-interface-prerequisites
140 #:g-type-interface-prerequisites
143 #:g-class-property-definition
144 #:g-class-property-definition-name
145 #:g-class-property-definition-type
146 #:g-class-property-definition-readable
147 #:g-class-property-definition-writable
148 #:g-class-property-definition-constructor
149 #:g-class-property-definition-constructor-only
150 #:g-class-property-definition-owner-type
153 #:interface-properties
164 #:stable-pointer-value
167 #:g-object-call-constructor
168 #:g-object-call-get-property
169 #:g-object-call-set-property
171 #:register-flags-type
172 #:register-object-type
173 #:generate-types-hierarchy-to-file
174 #:get-g-flags-definition
175 #:get-g-enum-definition
176 #:get-g-interface-definition
177 #:get-g-class-definition
179 #:*lisp-name-exceptions*
180 #:*additional-properties*
183 #:define-g-boxed-cstruct
184 #:define-g-boxed-opaque
186 #:g-boxed-opaque-pointer
187 #:define-g-boxed-variant-cstruct
189 #:boxed-related-symbols
190 #:define-boxed-opaque-accessor)
192 "CL-GTK2-GOBJECT is a binding to GObject type system.
193 For information on GObject, see its @a[http://library.gnome.org/devel/gobject/stable/]{documentation}.
195 CL-GTK2-GOBJECT is structured as follows:
197 @item{Binding to GObject API, providing low-level means to use functionality of GObject. This includes introspection facilities and means to invoke functionality of GObject.}
198 @item{GObject wrapper that bridges Lisp language with GObject API.}
201 @begin[GObject instrospection API]{section}
202 The base of GObject type system is GType. GType is a numerical value that is the unique identifier of a registered type.
203 Each GType has a name that is retrieved with @fun{g-type-name}. Conversely, GType can be retrieved from its name via @fun{g-type-from-name}.
205 There are several predefined GType values that correspond to fundamental or base types.
207 @item{@variable{+g-type-invalid+}}
208 @item{@variable{+g-type-void+}}
209 @item{@variable{+g-type-interface+}}
210 @item{@variable{+g-type-char+}}
211 @item{@variable{+g-type-uchar+}}
212 @item{@variable{+g-type-boolean+}}
213 @item{@variable{+g-type-int+}}
214 @item{@variable{+g-type-uint+}}
215 @item{@variable{+g-type-long+}}
216 @item{@variable{+g-type-ulong+}}
217 @item{@variable{+g-type-int64+}}
218 @item{@variable{+g-type-uint64+}}
219 @item{@variable{+g-type-enum+}}
220 @item{@variable{+g-type-flags+}}
221 @item{@variable{+g-type-float+}}
222 @item{@variable{+g-type-double+}}
223 @item{@variable{+g-type-string+}}
224 @item{@variable{+g-type-pointer+}}
225 @item{@variable{+g-type-boxed+}}
226 @item{@variable{+g-type-param+}}
227 @item{@variable{+g-type-object+}}
230 GType values form type hierarchies via signle inheritance. Functions @fun{g-type-parent} and @fun{g-type-children} enable to traverse through the type hierarchy.
232 For some types, additional information is available. Functions @fun{class-properties} and @fun{interface-properties} return properties of classes and interfaces. Functions @fun{get-enum-items} and @fun{get-flags-items} return members of enum and flags types.
234 //TODO: document and refactor signals
238 @begin[GValue]{section}
239 GObject uses GValues as a generic way to pass values. It is used when calling closures, emitting signals, setting and getting properties' values, passing values to object constructors. @class{g-value} foreign structure is used for holding GValue. It used like all foreign structures: either with @code{cffi:foreign-alloc} or with @code{cffi:with-foreign-object}. Before first use, @class{g-value} should be zeroed with @fun{g-value-zero}. Zeroed @class{g-value} may be configured to hold a GValue of a given type with @fun{g-value-init}. @fun{parse-g-value} retrieves the Lisp object corresponding to the value stored in GValue. @fun{set-g-value} sets the GValue from Lisp object.
242 (in-package :gobject)
244 (defvar *gobject-debug* nil)
246 (defun debugf (&rest args)
247 (when *gobject-debug*
248 (apply 'format t args)))