3 (defcstruct g-type-interface
5 (instance-type g-type))
7 (defcstruct g-type-class
10 (defcstruct g-type-instance
11 (class (:pointer g-type-class)))
13 (defcstruct g-type-info
15 (base-init-fn :pointer)
16 (base-finalize-fn :pointer)
17 (class-init-fn :pointer)
18 (class-finalize-fn :pointer)
20 (instance-size :uint16)
22 (instance-init-fn :pointer)
23 (value-table :pointer))
25 (defcstruct g-type-query
27 (type-name (:string :free-from-foreign nil))
29 (instance-size :uint))
31 (defbitfield g-type-fundamental-flags
37 (defcstruct g-type-fundamental-info
38 (type-flags g-type-fundamental-flags))
40 (defcstruct g-interface-info
41 (interface-init :pointer)
42 (interface-finalize :pointer)
43 (interface-data :pointer))
45 (defcstruct g-type-value-table
49 (value-peek-pointer :pointer)
50 (collect-format (:string :free-from-foreign nil :free-to-foreign nil))
51 (collect-value :pointer)
52 (lcopy-format (:string :free-from-foreign nil :free-to-foreign nil))
53 (lcopy-value :pointer))
55 (defbitfield g-type-flags
56 (:abstract #. (ash 1 4))
60 (type-instance g-type-instance)
64 (defctype %g-initially-unowned %g-object)
66 (defcstruct g-object-class
67 (type-class g-type-class)
68 (construct-properties :pointer)
69 (constructor :pointer)
70 (set-property :pointer)
71 (get-property :pointer)
74 (dispatch-properties-changed :pointer)
76 (constructed :pointer)
77 (pdummy :pointer :count 7))
79 (defbitfield g-param-flags
89 (defcstruct g-param-spec
90 (type-instance g-type-instance)
91 (name (:string :free-from-foreign nil :free-to-foreign nil))
96 (defcunion g-value-data
109 (data g-value-data :count 2))
111 (defcstruct g-object-construct-param
112 (param-spec (:pointer g-param-spec))
113 (value (:pointer g-value)))
115 (defcstruct g-parameter
116 (name (:string :free-from-foreign nil :free-to-foreign nil))
119 (defcstruct g-enum-value
121 (name (:string :free-from-foreign nil :free-to-foreign nil))
122 (nick (:string :free-from-foreign nil :free-to-foreign nil)))
124 (defcstruct g-enum-class
125 (type-class g-type-class)
129 (values (:pointer g-enum-value)))
131 (defcstruct g-flags-value
133 (name (:string :free-from-foreign nil :free-to-foreign nil))
134 (nick (:string :free-from-foreign nil :free-to-foreign nil)))
136 (defcstruct g-flags-class
137 (type-class g-type-class)
140 (values (:pointer g-flags-value)))
142 (defcstruct g-param-spec-boolean
143 (parent-instance g-param-spec)
144 (default-value :boolean))
146 (defcstruct g-param-spec-char
147 (parent-instance g-param-spec)
150 (default-value :int8))
152 (defcstruct g-param-spec-uchar
153 (parent-instance g-param-spec)
156 (default-value :uint8))
158 (defcstruct g-param-spec-int
159 (parent-instance g-param-spec)
162 (default-value :int))
164 (defcstruct g-param-spec-uint
165 (parent-instance g-param-spec)
168 (default-value :uint))
170 (defcstruct g-param-spec-long
171 (parent-instance g-param-spec)
174 (default-value :ulong))
176 (defcstruct g-param-spec-ulong
177 (parent-instance g-param-spec)
180 (default-value :ulong))
182 (defcstruct g-param-spec-int64
183 (parent-instance g-param-spec)
186 (default-value :uint64))
188 (defcstruct g-param-spec-uint64
189 (parent-instance g-param-spec)
192 (default-value :uint64))
194 (defcstruct g-param-spec-float
195 (parent-instance g-param-spec)
198 (default-value :float)
201 (defcstruct g-param-spec-double
202 (parent-instance g-param-spec)
205 (default-value :double)
208 (defcstruct g-param-spec-enum
209 (parent-instance g-param-spec)
210 (enum-class (:pointer g-enum-class))
211 (default-value :int))
213 (defcstruct g-param-spec-flags
214 (parent-instance g-param-spec)
215 (flags-class (:pointer g-flags-class))
216 (default-value :uint))
218 (defcstruct g-param-spec-string
219 (parent-instance g-param-spec)
220 (default-value (:string :free-to-foreign nil :free-from-foreign nil))
221 (cset-first (:string :free-to-foreign nil :free-from-foreign nil))
222 (cset-nth (:string :free-to-foreign nil :free-from-foreign nil))
224 (flags-for-null :uint))
226 (defcstruct g-param-spec-param
227 (parent-instance g-param-spec))
229 (defcstruct g-param-spec-boxed
230 (parent-instance g-param-spec))
232 (defcstruct g-param-spec-pointer
233 (parent-instance g-param-spec))
235 (defcstruct g-param-spec-object
236 (parent-instance g-param-spec))
238 (defcstruct g-param-spec-value-array
239 (parent-instance g-param-spec)
240 (element-spec (:pointer g-param-spec))
241 (fixed-n-elements :uint))
243 (defcstruct g-param-spec-g-type
244 (parent-instance g-param-spec)
247 (defcstruct g-param-spec-class
248 (type-class g-type-class)
251 (value-set-default :pointer)
252 (value-validate :pointer)
253 (values-cmp :pointer))
255 (defcstruct g-closure
256 (private-data :uint32)
259 (notifiers :pointer))
261 (defcfun g-type-class-ref (:pointer g-type-class)
262 (type g-type-designator))
264 (defcfun g-type-class-unref :void
265 (class (:pointer g-type-class)))
267 (defcfun g-type-class-add-private :void
268 (class (:pointer g-type-class))
269 (private-size gsize))
271 (defcfun g-type-register-static g-type-designator
272 (parent-type g-type-designator)
274 (info (:pointer g-type-info))
275 (flags g-type-flags))
277 (defcfun g-type-register-static-simple g-type-designator
278 (parent-type g-type-designator)
281 (class-init :pointer)
282 (instance-size :uint)
283 (instance-init :pointer)
284 (flags g-type-flags))
286 (defcfun g-type-add-interface-static :void
287 (instance-type g-type-designator)
288 (interface-type g-type-designator)
289 (info (:pointer g-interface-info)))
291 (defcfun g-type-interface-add-prerequisite :void
292 (interface-type g-type-designator)
293 (prerequisite-type g-type-designator))
295 (defun g-type-from-object (object)
296 "Returns the GType of an @code{object}
298 @arg[object]{C pointer to an object}
299 @return{GType designator (see @class{g-type-designator})}"
300 (g-type-from-instance object))
302 (defun g-type-from-class (g-class)
303 (g-type-name (foreign-slot-value g-class 'g-type-class 'type)))
305 (defun g-type-from-instance (type-instance)
306 (g-type-from-class (foreign-slot-value type-instance 'g-type-instance 'class)))
308 (defun g-type-from-interface (type-interface)
309 (g-type-name (foreign-slot-value type-interface 'g-type-interface 'type)))
311 (defcfun g-type-query :void
312 (type g-type-designator)
313 (query (:pointer g-type-query)))
315 (defcfun g-type-default-interface-ref :pointer
316 (type g-type-designator))
318 (defcfun g-type-default-interface-unref :void
319 (interface :pointer))