2 (:use :cl :glib :cffi :tg :bordeaux-threads :iter :closer-mop :gobject.ffi)
12 #:g-type-interface-prerequisites
15 #:g-class-property-definition
16 #:g-class-property-definition-name
17 #:g-class-property-definition-type
18 #:g-class-property-definition-readable
19 #:g-class-property-definition-writable
20 #:g-class-property-definition-constructor
21 #:g-class-property-definition-constructor-only
22 #:g-class-property-definition-owner-type
25 #:interface-properties
39 #:signal-info-owner-type
41 #:signal-info-return-type
42 #:signal-info-param-types
75 #:define-g-object-class
79 #:define-g-boxed-class
90 #:allocate-stable-pointer
92 #:get-stable-pointer-value
98 #:register-object-type-implementation
114 #:registered-object-type-by-name
119 #:boxed-c-structure-name
126 #:g-type-interface-prerequisites
138 #:g-type-interface-prerequisites
141 #:g-class-property-definition
142 #:g-class-property-definition-name
143 #:g-class-property-definition-type
144 #:g-class-property-definition-readable
145 #:g-class-property-definition-writable
146 #:g-class-property-definition-constructor
147 #:g-class-property-definition-constructor-only
148 #:g-class-property-definition-owner-type
151 #:interface-properties
162 #:stable-pointer-value)
164 "CL-GTK2-GOBJECT is a binding to GObject type system.
165 For information on GObject, see its @a[http://library.gnome.org/devel/gobject/stable/]{documentation}.
167 CL-GTK2-GOBJECT is structured as follows:
169 @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.}
170 @item{GObject wrapper that bridges Lisp language with GObject API.}
173 @begin[GObject instrospection API]{section}
174 The base of GObject type system is GType. GType is a numerical value that is the unique identifier of a registered type.
175 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}.
177 There are several predefined GType values that correspond to fundamental or base types.
179 @item{@variable{+g-type-invalid+}}
180 @item{@variable{+g-type-void+}}
181 @item{@variable{+g-type-interface+}}
182 @item{@variable{+g-type-char+}}
183 @item{@variable{+g-type-uchar+}}
184 @item{@variable{+g-type-boolean+}}
185 @item{@variable{+g-type-int+}}
186 @item{@variable{+g-type-uint+}}
187 @item{@variable{+g-type-long+}}
188 @item{@variable{+g-type-ulong+}}
189 @item{@variable{+g-type-int64+}}
190 @item{@variable{+g-type-uint64+}}
191 @item{@variable{+g-type-enum+}}
192 @item{@variable{+g-type-flags+}}
193 @item{@variable{+g-type-float+}}
194 @item{@variable{+g-type-double+}}
195 @item{@variable{+g-type-string+}}
196 @item{@variable{+g-type-pointer+}}
197 @item{@variable{+g-type-boxed+}}
198 @item{@variable{+g-type-param+}}
199 @item{@variable{+g-type-object+}}
202 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.
204 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.
206 //TODO: document and refactor signals
210 @begin[GValue]{section}
211 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.
214 (in-package :gobject)
216 (defvar *gobject-debug* nil)
218 (defun debugf (&rest args)
219 (when *gobject-debug*
220 (apply 'format t args)))