Typo.
[cl-gtk2.git] / glib / gobject.ffi.lisp
1 (in-package :gobject.ffi)
2
3 (defcfun (g-type-fundamental "g_type_fundamental") g-type-designator
4   "Returns the fundamental type which is the ancestor of @code{type}.
5
6 Example:
7 @pre{
8 \(g-type-fundamental \"GtkWindowType\")
9 => \"GEnum\"
10 \(g-type-fundamental \"GtkLabel\")
11 => \"GObject\"
12 }
13 @arg[type]{GType designator (see @class{g-type-designator})}
14 @return{GType designator}"
15   (type g-type-designator))
16
17 (defcfun (%g-type-init "g_type_init") :void)
18
19 (at-init () (%g-type-init))
20
21 (defcfun g-type-parent g-type-designator
22   "Returns the parent of a GType. @see{g-type-chilren}
23
24 Example:
25 @pre{
26 \(g-type-parent \"GtkLabel\")
27 => \"GtkMisc\"
28 }
29 @arg[type]{GType designator (see @class{g-type-designator})}
30 @return{GType designator}"
31   (type g-type-designator))
32
33 (defcfun g-type-depth :uint
34   "Returns the length of the ancestry of @code{type}. This includes the @code{type} itself, so that e.g. a fundamental type has depth 1.
35
36 Example:
37 @pre{
38 \(g-type-depth \"GtkLabel\")
39 => 6
40 }
41 @arg[type]{GType designator (see @class{g-type-designator})}
42 @return{an integer}"
43   (type g-type-designator))
44
45 (defcfun g-type-next-base g-type-designator
46   "Determines the type that is derived directly from @code{root-type} which is also a base class of @code{leaf-type}.
47
48 Example:
49 @pre{
50 \(g-type-next-base \"GtkButton\" \"GtkWidget\")
51 => \"GtkContainer\"
52 }
53 @arg[leaf-type]{GType designator (see @class{g-type-designator})}
54 @arg[root-type]{GType designator}
55 @return{GType designator}"
56   (leaf-type g-type-designator)
57   (root-type g-type-designator))
58
59 (defcfun g-type-is-a :boolean
60   "If @code{is-a-type} is a derivable type, check whether type is a descendant of @code{is-a-type}. If @code{is-a-type} is an interface, check whether type conforms to it.
61
62 Example:
63 @pre{
64 \(g-type-is-a \"GtkButton\" \"GtkWidget\")
65 => T
66 \(g-type-is-a \"GtkButton\" \"AtkImplementorIface\")
67 => T
68 \(g-type-is-a \"GtkButton\" \"GtkLabel\")
69 => NIL
70 }
71 @arg[type]{GType designator (see @class{g-type-designator})}
72 @arg[is-a-type]{GType designator}
73 @return{boolean}"
74   (type g-type-designator)
75   (is-a-type g-type-designator))
76
77 (defcfun (%g-type-children "g_type_children") (:pointer g-type)
78   (type g-type-designator)
79   (n-children (:pointer :uint)))
80
81 (defcfun (%g-type-interface-prerequisites "g_type_interface_prerequisites") (:pointer g-type)
82   (type g-type-designator)
83   (n-interface-prerequisites (:pointer :uint)))
84
85 (defcfun g-strv-get-type g-type-designator
86   "Returns the type designator (see @class{g-type-designator}) for GStrv type. As a side effect, ensures that the type is registered.")
87
88 (at-init nil (g-strv-get-type))
89
90 (defcfun g-closure-get-type g-type-designator
91   "Returns the type designator (see @class{g-type-designator}) for GClosure type. As a side effect, ensure that the type is registered.")
92
93 (at-init nil (g-closure-get-type))
94
95 (defcfun (%g-type-interfaces "g_type_interfaces") (:pointer g-type)
96   (type g-type-designator)
97   (n-interfaces (:pointer :uint)))
98
99 (defcstruct g-type-interface
100   (:type g-type-designator)
101   (:instance-type g-type-designator))
102 (defctype g-type-interface (:struct g-type-interface))
103
104 (defcstruct g-type-class
105   (:type g-type-designator))
106 (defctype g-type-class (:struct g-type-class))
107
108 (defcstruct g-type-instance
109   (:class (:pointer g-type-class)))
110 (defctype g-type-instance (:struct g-type-instance))
111
112 (defcstruct g-type-info
113   (:class-size :uint16)
114   (:base-init-fn :pointer)
115   (:base-finalize-fn :pointer)
116   (:class-init-fn :pointer)
117   (:class-finalize-fn :pointer)
118   (:class-data :pointer)
119   (:instance-size :uint16)
120   (:n-preallocs :uint16)
121   (:instance-init-fn :pointer)
122   (:value-table :pointer))
123 (defctype g-type-info (:struct g-type-info))
124
125 (defcstruct g-type-query
126   (:type g-type-designator)
127   (:type-name (:string :free-from-foreign nil))
128   (:class-size :uint)
129   (:instance-size :uint))
130 (defctype g-type-query (:struct g-type-query))
131
132 (defbitfield g-type-fundamental-flags
133   :classed
134   :instantiatable
135   :derivable
136   :deep-derivable)
137
138 (defcstruct g-type-fundamental-info
139   (:type-flags g-type-fundamental-flags))
140 (defctype g-type-fundamental-info (:struct g-type-fundamental-info))
141
142 (defcstruct g-interface-info
143   (:interface-init :pointer)
144   (:interface-finalize :pointer)
145   (:interface-data :pointer))
146 (defctype g-interface-info (:struct g-interface-info))
147
148 (defcstruct g-type-value-table
149   (:value-init :pointer)
150   (:value-free :pointer)
151   (:value-copy :pointer)
152   (:value-peek-pointer :pointer)
153   (:collect-format (:string :free-from-foreign nil :free-to-foreign nil))
154   (:collect-value :pointer)
155   (:lcopy-format (:string :free-from-foreign nil :free-to-foreign nil))
156   (:lcopy-value :pointer))
157 (defctype g-type-value-table (:struct g-type-value-table))
158
159 (defbitfield g-type-flags
160   (:abstract #. (ash 1 4))
161   :value-abstract)
162
163 (defcstruct %g-object
164   (:type-instance g-type-instance)
165   (:ref-count :uint)
166   (:data :pointer))
167 (defctype %g-object (:struct %g-object))
168
169 (defctype %g-initially-unowned (:struct %g-object))
170
171 (defcstruct g-object-class
172   (:type-class g-type-class)
173   (:construct-properties :pointer)
174   (:constructor :pointer)
175   (:set-property :pointer)
176   (:get-property :pointer)
177   (:dispose :pointer)
178   (:finalize :pointer)
179   (:dispatch-properties-changed :pointer)
180   (:notify :pointer)
181   (:constructed :pointer)
182   (:pdummy :pointer :count 7))
183 (defctype g-object-class (:struct g-object-class))
184
185 (defbitfield g-param-flags
186   :readable
187   :writable
188   :construct
189   :construct-only
190   :lax-validation
191   :static-name
192   :nick
193   :blurb)
194
195 (defcstruct g-param-spec
196   (:type-instance g-type-instance)
197   (:name (:string :free-from-foreign nil :free-to-foreign nil))
198   (:flags g-param-flags)
199   (:value-type g-type-designator)
200   (:owner-type g-type-designator))
201 (defctype g-param-spec (:struct g-param-spec))
202
203 (defcunion g-value-data
204   (:int :int)
205   (:uint :uint)
206   (:long :long)
207   (:ulong :ulong)
208   (:int64 :int64)
209   (:uint64 :uint64)
210   (:float :float)
211   (:double :double)
212   (:pointer :pointer))
213 (defctype g-value-data (:union g-value-data))
214
215 (defcstruct g-value
216   (:type g-type-designator)
217   (:data g-value-data :count 2))
218 (defctype g-value (:struct g-value))
219
220 (defcstruct g-object-construct-param
221   (:param-spec (:pointer g-param-spec))
222   (:value (:pointer g-value)))
223 (defctype g-object-construct-param (:struct g-object-construct-param))
224
225 (defcstruct g-parameter
226   (:name (:string :free-from-foreign nil :free-to-foreign nil))
227   (:value g-value))
228 (defctype g-parameter (:struct g-parameter))
229
230 (defcstruct g-enum-value
231   (:value :int)
232   (:name (:string :free-from-foreign nil :free-to-foreign nil))
233   (:nick (:string :free-from-foreign nil :free-to-foreign nil)))
234 (defctype g-enum-value (:struct g-enum-value))
235
236 (defcstruct g-enum-class
237   (:type-class g-type-class)
238   (:minimum :int)
239   (:maximum :int)
240   (:n-values :uint)
241   (:values (:pointer g-enum-value)))
242 (defctype g-enum-class (:struct g-enum-class))
243
244 (defcstruct g-flags-value
245   (:value :uint)
246   (:name (:string :free-from-foreign nil :free-to-foreign nil))
247   (:nick (:string :free-from-foreign nil :free-to-foreign nil)))
248 (defctype g-flags-value (:struct g-flags-value))
249
250 (defcstruct g-flags-class
251   (:type-class g-type-class)
252   (:mask :uint)
253   (:n-values :uint)
254   (:values (:pointer g-flags-value)))
255 (defctype g-flags-class (:struct g-flags-class))
256
257 (defcstruct g-param-spec-boolean
258   (:parent-instance g-param-spec)
259   (:default-value :boolean))
260 (defctype g-param-spec-boolean (:struct g-param-spec-boolean))
261
262 (defcstruct g-param-spec-char
263   (:parent-instance g-param-spec)
264   (:minimum :int8)
265   (:maximum :int8)
266   (:default-value :int8))
267 (defctype g-param-spec-char (:struct g-param-spec-char))
268
269 (defcstruct g-param-spec-uchar
270   (:parent-instance g-param-spec)
271   (:minimum :uint8)
272   (:maximum :uint8)
273   (:default-value :uint8))
274 (defctype g-param-spec-uchar (:struct g-param-spec-uchar))
275
276 (defcstruct g-param-spec-int
277   (:parent-instance g-param-spec)
278   (:minimum :int)
279   (:maximum :int)
280   (:default-value :int))
281 (defctype g-param-spec-int (:struct g-param-spec-int))
282
283 (defcstruct g-param-spec-uint
284   (:parent-instance g-param-spec)
285   (:minimum :uint)
286   (:maximum :uint)
287   (:default-value :uint))
288 (defctype g-param-spec-uint (:struct g-param-spec-uint))
289
290 (defcstruct g-param-spec-long
291   (:parent-instance g-param-spec)
292   (:minimum :long)
293   (:maximum :long)
294   (:default-value :ulong))
295 (defctype g-param-spec-long (:struct g-param-spec-long))
296
297 (defcstruct g-param-spec-ulong
298   (:parent-instance g-param-spec)
299   (:minimum :ulong)
300   (:maximum :ulong)
301   (:default-value :ulong))
302 (defctype g-param-spec-ulong (:struct g-param-spec-ulong))
303
304 (defcstruct g-param-spec-int64
305   (:parent-instance g-param-spec)
306   (:minimum :uint64)
307   (:maximum :uint64)
308   (:default-value :uint64))
309 (defctype g-param-spec-int64 (:struct g-param-spec-int64))
310
311 (defcstruct g-param-spec-uint64
312   (:parent-instance g-param-spec)
313   (:minimum :uint64)
314   (:maximum :uint64)
315   (:default-value :uint64))
316 (defctype g-param-spec-uint64 (:struct g-param-spec-uint64))
317
318 (defcstruct g-param-spec-float
319   (:parent-instance g-param-spec)
320   (:minimum :float)
321   (:maximum :float)
322   (:default-value :float)
323   (:epsilon :float))
324 (defctype g-param-spec-float (:struct g-param-spec-float))
325
326 (defcstruct g-param-spec-double
327   (:parent-instance g-param-spec)
328   (:minimum :double)
329   (:maximum :double)
330   (:default-value :double)
331   (:epsilon :double))
332 (defctype g-param-spec-double (:struct g-param-spec-double))
333
334 (defcstruct g-param-spec-enum
335   (:parent-instance g-param-spec)
336   (:enum-class (:pointer g-enum-class))
337   (:default-value :int))
338 (defctype g-param-spec-enum (:struct g-param-spec-enum))
339
340 (defcstruct g-param-spec-flags
341   (:parent-instance g-param-spec)
342   (:flags-class (:pointer g-flags-class))
343   (:default-value :uint))
344 (defctype g-param-spec-flags (:struct g-param-spec-flags))
345
346 (defcstruct g-param-spec-string
347   (:parent-instance g-param-spec)
348   (:default-value (:string :free-to-foreign nil :free-from-foreign nil))
349   (:cset-first (:string :free-to-foreign nil :free-from-foreign nil))
350   (:cset-nth (:string :free-to-foreign nil :free-from-foreign nil))
351   (:substitutor :char)
352   (:flags-for-null :uint))
353 (defctype g-param-spec-string (:struct g-param-spec-string))
354
355 (defcstruct g-param-spec-param
356   (:parent-instance g-param-spec))
357 (defctype g-param-spec-param (:struct g-param-spec-param))
358
359 (defcstruct g-param-spec-boxed
360   (:parent-instance g-param-spec))
361 (defctype g-param-spec-boxed (:struct g-param-spec-boxed))
362
363 (defcstruct g-param-spec-pointer
364   (:parent-instance g-param-spec))
365 (defctype g-param-spec-pointer (:struct g-param-spec-pointer))
366
367 (defcstruct g-param-spec-object
368   (:parent-instance g-param-spec))
369 (defctype g-param-spec-object (:struct g-param-spec-object))
370
371 (defcstruct g-param-spec-value-array
372   (:parent-instance g-param-spec)
373   (:element-spec (:pointer g-param-spec))
374   (:fixed-n-elements :uint))
375 (defctype g-param-spec-value-array (:struct g-param-spec-value-array))
376
377 (defcstruct g-param-spec-g-type
378   (:parent-instance g-param-spec)
379   (:types-root g-type-designator))
380 (defctype g-param-spec-g-type (:struct g-param-spec-g-type))
381
382 (defcstruct g-param-spec-class
383   (:type-class g-type-class)
384   (:value-type g-type-designator)
385   (:finalize :pointer)
386   (:value-set-default :pointer)
387   (:value-validate :pointer)
388   (:values-cmp :pointer))
389 (defctype g-param-spec-class (:struct g-param-spec-class))
390
391 (defcstruct g-closure
392   (:private-data :uint32)
393   (:marshal :pointer)
394   (:data :pointer)
395   (:notifiers :pointer))
396 (defctype g-closure (:struct g-closure))
397
398 (defcfun g-type-class-ref (:pointer g-type-class)
399   (type g-type-designator))
400
401 (defcfun g-type-class-unref :void
402   (class (:pointer g-type-class)))
403
404 (defcfun g-type-class-add-private :void
405   (class (:pointer g-type-class))
406   (private-size gsize))
407
408 (defcfun g-type-register-static g-type-designator
409   (parent-type g-type-designator)
410   (type-name :string)
411   (info (:pointer g-type-info))
412   (flags g-type-flags))
413
414 (defcfun g-type-register-static-simple g-type-designator
415   (parent-type g-type-designator)
416   (type-name :string)
417   (class-size :uint)
418   (class-init :pointer)
419   (instance-size :uint)
420   (instance-init :pointer)
421   (flags g-type-flags))
422
423 (defcfun g-type-add-interface-static :void
424   (instance-type g-type-designator)
425   (interface-type g-type-designator)
426   (info (:pointer g-interface-info)))
427
428 (defcfun g-type-interface-add-prerequisite :void
429   (interface-type g-type-designator)
430   (prerequisite-type g-type-designator))
431
432 (defcfun g-type-query :void
433   (type g-type-designator)
434   (query (:pointer g-type-query)))
435
436 (defcfun g-type-default-interface-ref :pointer
437   (type g-type-designator))
438
439 (defcfun g-type-default-interface-unref :void
440   (interface :pointer))
441
442 (defcfun g-boxed-copy :pointer
443   (boxed-type g-type-designator)
444   (src-boxed :pointer))
445
446 (defcfun g-boxed-free :void
447   (boxed-type g-type-designator)
448   (boxed :pointer))
449
450 (defcfun g-boxed-type-register-static g-type-designator
451   (name :string)
452   (copy-fn :pointer)
453   (free-fn :pointer))
454
455 (defcfun g-pointer-type-register-static g-type-designator
456   (name :string))
457
458 (defcfun g-closure-ref (:pointer g-closure)
459   (closure (:pointer g-closure)))
460
461 (defcfun g-closure-sink :void
462   (closure (:pointer g-closure)))
463
464 (defcfun g-closure-unref :void
465   (closure (:pointer g-closure)))
466
467 (defcfun g-closure-invalidate :void
468   (closure (:pointer g-closure)))
469
470 (defcfun g-closure-add-finalize-notifier :void
471   (closure (:pointer g-closure))
472   (notify-data :pointer)
473   (notify-func :pointer))
474
475 (defcfun g-closure-add-invalidate-notifier :void
476   (closure (:pointer g-closure))
477   (notify-data :pointer)
478   (notify-func :pointer))
479
480 (defcfun g-closure-new-simple (:pointer g-closure)
481   (sizeof-closure :uint)
482   (data :pointer))
483
484 (defcfun g-closure-set-marshal :void
485   (closure (:pointer g-closure))
486   (marshal :pointer))
487
488 (defcfun g-enum-register-static g-type-designator
489   (name :string)
490   (static-values (:pointer g-enum-value)))
491
492 (defcfun g-flags-register-static g-type-designator
493   (name :string)
494   (static-values (:pointer g-flags-value)))
495
496 (defcfun g-param-spec-boolean (:pointer g-param-spec-boolean)
497   (name :string)
498   (nick :string)
499   (blurb :string)
500   (default-value :boolean)
501   (flags g-param-flags))
502
503 (defcfun g-value-set-boolean :void
504   (g-value (:pointer g-value))
505   (new-value :boolean))
506
507 (defcfun g-value-get-boolean :boolean
508   (g-value (:pointer g-value)))
509
510 (defcfun g-param-spec-char (:pointer g-param-spec-char)
511   (name :string)
512   (nick :string)
513   (blurb :string)
514   (minimum :int8)
515   (maximum :int8)
516   (default-value :int8)
517   (flags g-param-flags))
518
519 (defcfun g-value-set-char :void
520   (g-value (:pointer g-value))
521   (new-value :char))
522
523 (defcfun g-value-get-char :char
524   (g-value (:pointer g-value)))
525
526 (defcfun g-param-spec-uchar (:pointer g-param-spec-uchar)
527   (name :string)
528   (nick :string)
529   (blurb :string)
530   (minimum :uint8)
531   (maximum :uint8)
532   (default-value :uint8)
533   (flags g-param-flags))
534
535 (defcfun g-value-set-uchar :void
536   (g-value (:pointer g-value))
537   (new-value :uchar))
538
539 (defcfun g-value-get-uchar :uchar
540   (g-value (:pointer g-value)))
541
542 (defcfun g-param-spec-int (:pointer g-param-spec-int)
543   (name :string)
544   (nick :string)
545   (blurb :string)
546   (minimum :int)
547   (maximum :int)
548   (default-value :int)
549   (flags g-param-flags))
550
551 (defcfun g-value-set-int :void
552   (g-value (:pointer g-value))
553   (new-value :int))
554
555 (defcfun g-value-get-int :int
556   (g-value (:pointer g-value)))
557
558 (defcfun g-param-spec-uint (:pointer g-param-spec-uint)
559   (name :string)
560   (nick :string)
561   (blurb :string)
562   (minimum :uint)
563   (maximum :uint)
564   (default-value :uint)
565   (flags g-param-flags))
566
567 (defcfun g-value-set-uint :void
568   (g-value (:pointer g-value))
569   (new-value :uint))
570
571 (defcfun g-value-get-uint :uint
572   (g-value (:pointer g-value)))
573
574 (defcfun g-param-spec-long (:pointer g-param-spec-long)
575   (name :string)
576   (nick :string)
577   (blurb :string)
578   (minimum :long)
579   (maximum :long)
580   (default-value :long)
581   (flags g-param-flags))
582
583 (defcfun g-value-set-long :void
584   (g-value (:pointer g-value))
585   (new-value :long))
586
587 (defcfun g-value-get-long :long
588   (g-value (:pointer g-value)))
589
590 (defcfun g-param-spec-ulong (:pointer g-param-spec-ulong)
591   (name :string)
592   (nick :string)
593   (blurb :string)
594   (minimum :ulong)
595   (maximum :ulong)
596   (default-value :ulong)
597   (flags g-param-flags))
598
599 (defcfun g-value-set-ulong :void
600   (g-value (:pointer g-value))
601   (new-value :ulong))
602
603 (defcfun g-value-get-ulong :ulong
604   (g-value (:pointer g-value)))
605
606 (defcfun g-param-spec-int64 (:pointer g-param-spec-int64)
607   (name :string)
608   (nick :string)
609   (blurb :string)
610   (minimum :int64)
611   (maximum :int64)
612   (default-value :int64)
613   (flags g-param-flags))
614
615 (defcfun g-value-set-int64 :void
616   (g-value (:pointer g-value))
617   (new-value :int64))
618
619 (defcfun g-value-get-int64 :int64
620   (g-value (:pointer g-value)))
621
622 (defcfun g-param-spec-uint64 (:pointer g-param-spec-uint64)
623   (name :string)
624   (nick :string)
625   (blurb :string)
626   (minimum :uint64)
627   (maximum :uint64)
628   (default-value :uint64)
629   (flags g-param-flags))
630
631 (defcfun g-value-set-uint64 :void
632   (g-value (:pointer g-value))
633   (new-value :uint64))
634
635 (defcfun g-value-get-uint64 :uint64
636   (g-value (:pointer g-value)))
637
638 (defcfun g-param-spec-float (:pointer g-param-spec-float)
639   (name :string)
640   (nick :string)
641   (blurb :string)
642   (minimum :float)
643   (maximum :float)
644   (default-value :float)
645   (flags g-param-flags))
646
647 (defcfun g-value-set-float :void
648   (g-value (:pointer g-value))
649   (new-value :float))
650
651 (defcfun g-value-get-float :float
652   (g-value (:pointer g-value)))
653
654 (defcfun g-param-spec-double (:pointer g-param-spec-double)
655   (name :string)
656   (nick :string)
657   (blurb :string)
658   (minimum :double)
659   (maximum :double)
660   (default-value :double)
661   (flags g-param-flags))
662
663 (defcfun g-value-set-double :void
664   (g-value (:pointer g-value))
665   (new-value :double))
666
667 (defcfun g-value-get-double :double
668   (g-value (:pointer g-value)))
669
670 (defcfun g-param-spec-enum (:pointer g-param-spec-enum)
671   (name :string)
672   (nick :string)
673   (blurb :string)
674   (enum-type g-type-designator)
675   (default-value :int)
676   (flags g-param-flags))
677
678 (defcfun g-value-set-enum :void
679   (g-value (:pointer g-value))
680   (new-value :int))
681
682 (defcfun g-value-get-enum :int
683   (g-value (:pointer g-value)))
684
685 (defcfun g-param-spec-flags (:pointer g-param-spec-flags)
686   (name :string)
687   (nick :string)
688   (blurb :string)
689   (flags-type g-type-designator)
690   (default-value :int)
691   (flags g-param-flags))
692
693 (defcfun g-value-set-flags :void
694   (g-value (:pointer g-value))
695   (new-value :int))
696
697 (defcfun g-value-get-flags :int
698   (g-value (:pointer g-value)))
699
700 (defcfun g-param-spec-string (:pointer g-param-spec-string)
701   (name :string)
702   (nick :string)
703   (blurb :string)
704   (default-value :string)
705   (flags g-param-flags))
706
707 (defcfun g-value-set-string :void
708   (g-value (:pointer g-value))
709   (new-value :string))
710
711 (defcfun g-value-get-string (:string :free-from-foreign nil)
712   (g-value (:pointer g-value)))
713
714 (defcfun g-param-spec-param (:pointer g-param-spec-param)
715   (name :string)
716   (nick :string)
717   (blurb :string)
718   (param-type g-type-designator)
719   (flags g-param-flags))
720
721 (defcfun g-value-set-param :void
722   (g-value (:pointer g-value))
723   (new-value (:pointer g-param-spec)))
724
725 (defcfun g-value-get-param (:pointer g-param-spec)
726   (g-value (:pointer g-value)))
727
728 (defcfun g-param-spec-boxed (:pointer g-param-spec-boxed)
729   (name :string)
730   (nick :string)
731   (blurb :string)
732   (boxed-type g-type-designator)
733   (flags g-param-flags))
734
735 (defcfun g-value-set-boxed :void
736   (g-value (:pointer g-value))
737   (new-value :pointer))
738
739 (defcfun g-value-take-boxed :void
740   (g-value (:pointer g-value))
741   (new-value :pointer))
742
743 (defcfun g-value-get-boxed :pointer
744   (g-value (:pointer g-value)))
745
746 (defcfun g-param-spec-pointer (:pointer g-param-spec-pointer)
747   (name :string)
748   (nick :string)
749   (blurb :string)
750   (flags g-param-flags))
751
752 (defcfun g-value-set-pointer :void
753   (g-value (:pointer g-value))
754   (new-value :pointer))
755
756 (defcfun g-value-get-pointer :pointer
757   (g-value (:pointer g-value)))
758
759 (defcfun g-param-spec-object (:pointer g-param-spec-object)
760   (name :string)
761   (nick :string)
762   (blurb :string)
763   (object-type g-type-designator)
764   (flags g-param-flags))
765
766 (defcfun g-value-set-object :void
767   (g-value (:pointer g-value))
768   (new-value :pointer))
769
770 (defcfun g-value-get-object :pointer
771   (g-value (:pointer g-value)))
772
773 (defcfun g-param-spec-value-array (:pointer g-param-spec-value-array)
774   (name :string)
775   (nick :string)
776   (blurb :string)
777   (element-spec (:pointer g-param-spec))
778   (flags g-param-flags))
779
780 (defcfun (g-param-spec-g-type "g_param_spec_gtype") (:pointer g-param-spec-g-type)
781   (name :string)
782   (nick :string)
783   (blurb :string)
784   (types-root g-type-designator)
785   (flags g-param-flags))
786
787 (defcfun (g-value-set-g-type "g_value_set_gtype") :void
788   (g-value (:pointer g-value))
789   (new-value g-type-designator))
790
791 (defcfun (g-value-get-g-type "g_value_get_gtype") g-type-designator
792   (g-value (:pointer g-value)))
793
794 (defcfun g-param-spec-ref-sink (:pointer g-param-spec)
795   (param-spec (:pointer g-param-spec)))
796
797 (defcfun g-param-spec-unref :void
798   (param-spec (:pointer g-param-spec)))
799
800 (defcfun g-param-value-set-default :void
801   (param-spec (:pointer g-param-spec))
802   (value (:pointer g-value)))
803
804 (defcfun g-param-value-defaults :boolean
805   (param-spec (:pointer g-param-spec))
806   (value (:pointer g-value)))
807
808 (defcfun g-param-value-validate :boolean
809   (param-spec (:pointer g-param-spec))
810   (value (:pointer g-value)))
811
812 (defcfun g-param-spec-get-name :string
813   (param-spec (:pointer g-param-spec)))
814
815 (defcfun g-param-spec-get-nick :string
816   (param-spec (:pointer g-param-spec)))
817
818 (defcfun g-param-spec-get-blurb :string
819   (param-spec (:pointer g-param-spec)))
820
821 (defcfun g-value-init (:pointer g-value)
822   "Initializes the GValue @code{value} with the default value of @code{type}
823
824 @arg[value]{a C pointer to the GValue structure}
825 @arg[type]{an integer specifying the GType}"
826   (value (:pointer g-value))
827   (type g-type-designator))
828
829 (defcfun g-value-copy :void
830   (src-value (:pointer g-value))
831   (dst-value (:pointer g-value)))
832
833 (defcfun g-value-reset (:pointer g-value)
834   (value (:pointer g-value)))
835
836 (defcfun g-value-unset (:pointer g-value)
837   "Clears the current value in @code{value} and \"unsets\" the type, releasing all resources associated with this GValue. An unset value is the same as an unitialized GValue.
838
839 @arg[value]{a C pointer to the GValue structure}"
840   (value (:pointer g-value)))
841
842 (defcfun g-value-set-instance :void
843   (value (:pointer g-value))
844   (instance :pointer))
845
846 (defcfun g-strdup-value-contents :string
847   (value (:pointer g-value)))
848
849 (defcfun g-object-class-install-property :void
850   (class (:pointer g-object-class))
851   (property-id :uint)
852   (param-spec (:pointer g-param-spec)))
853
854 (defcfun g-object-class-find-property (:pointer g-param-spec)
855   (class (:pointer g-object-class))
856   (property-name :string))
857
858 (defcfun g-object-class-list-properties (:pointer (:pointer g-param-spec))
859   (class (:pointer g-object-class))
860   (n-properties (:pointer :uint)))
861
862 (defcfun g-object-class-override-property :void
863   (class (:pointer g-object-class))
864   (property-id :uint)
865   (name :string))
866
867 (defcfun g-object-interface-install-property :void
868   (interface :pointer)
869   (param-spec (:pointer g-param-spec)))
870
871 (defcfun g-object-interface-find-property (:pointer g-param-spec)
872   (interface :pointer)
873   (property-name :string))
874
875 (defcfun g-object-interface-list-properties (:pointer g-param-spec)
876   (interface :pointer)
877   (n-properties (:pointer :uint)))
878
879 (defcfun g-object-newv :pointer
880   (object-type g-type-designator)
881   (n-parameter :uint)
882   (parameters (:pointer g-parameter)))
883
884 (defcfun g-object-ref :pointer
885   (object :pointer))
886
887 (defcfun g-object-unref :void
888   (object :pointer))
889
890 (defcfun g-object-ref-sink :pointer
891   (object :pointer))
892
893 (defcfun g-object-is-floating :boolean
894   (object :pointer))
895
896 (defcfun g-object-force-floating :void
897   (object :pointer))
898
899 (defcfun g-object-weak-ref :void
900   (object :pointer)
901   (notify :pointer)
902   (data :pointer))
903
904 (defcfun g-object-weak-unref :void
905   (object :pointer)
906   (notify :pointer)
907   (data :pointer))
908
909 (defcfun g-object-add-toggle-ref :void
910   (object :pointer)
911   (notifty :pointer)
912   (data :pointer))
913
914 (defcfun g-object-remove-toggle-ref :void
915   (object :pointer)
916   (notifty :pointer)
917   (data :pointer))
918
919 (defcfun g-object-notify :void
920   (object :pointer)
921   (property-name :string))
922
923 (defcfun g-object-freeze-notify :void
924   (object :pointer))
925
926 (defcfun g-object-thaw-notify :void
927   (object :pointer))
928
929 (defcfun g-object-get-data :pointer
930   (object :pointer)
931   (key :string))
932
933 (defcfun g-object-set-data :void
934   (object :pointer)
935   (key :string)
936   (new-value :pointer))
937
938 (defcfun g-object-set-data-full :void
939   (object :pointer)
940   (key :string)
941   (data :pointer)
942   (destory :pointer))
943
944 (defcfun g-object-steal-data :pointer
945   (object :pointer)
946   (key :string))
947
948 (defcfun g-object-set-property :void
949   (object :pointer)
950   (property-name :string)
951   (value (:pointer g-value)))
952
953 (defcfun g-object-get-property :void
954   (object :pointer)
955   (property-name :string)
956   (value (:pointer g-value)))
957
958 (defcfun g-signal-connect-closure :ulong
959   (instance :pointer)
960   (detailed-signal :string)
961   (closure (:pointer g-closure))
962   (after :boolean))
963
964 (defcfun g-signal-emitv :void
965   (instance-and-params (:pointer g-value))
966   (signal-id :uint)
967   (detail g-quark)
968   (return-value (:pointer g-value)))
969
970 (defcfun g-signal-lookup :uint
971   (name :string)
972   (type g-type-designator))
973
974 (defbitfield g-signal-flags
975   :run-first :run-last :run-cleanup :no-recurse :detailed :action :no-hooks)
976
977 (defcstruct g-signal-query
978   (:signal-id :uint)
979   (:signal-name :string)
980   (:owner-type g-type-designator)
981   (:signal-flags g-signal-flags)
982   (:return-type (g-type-designator :mangled-p t))
983   (:n-params :uint)
984   (:param-types (:pointer (g-type-designator :mangled-p t))))
985 (defctype g-signal-query (:struct g-signal-query))
986
987 (defcfun g-signal-query :void
988   (signal-id :uint)
989   (query (:pointer g-signal-query)))
990
991 (defcfun g-signal-list-ids (:pointer :uint)
992   (type g-type-designator)
993   (n-ids (:pointer :uint)))
994
995 (defcfun g-signal-parse-name :boolean
996   (detailed-signal :string)
997   (owner-type g-type-designator)
998   (signal-id-ptr (:pointer :uint))
999   (detail-ptr (:pointer g-quark))
1000   (force-detail-quark :boolean))
1001
1002 (defcstruct g-object-struct
1003   (:type-instance g-type-instance)
1004   (:ref-count :uint)
1005   (:qdata :pointer))
1006 (defctype g-object-struct (:struct g-object-struct))