3 (defcfun (g-type-fundamental "g_type_fundamental") g-type
6 (defcfun (%g-type-init "g_type_init") :void)
10 (defcfun (g-type-name "g_type_name") :string
13 (defcfun (g-type-from-name "g_type_from_name") g-type
16 (defcfun g-type-parent g-type
19 (defcfun g-type-depth :uint
22 (defcfun g-type-next-base g-type
26 (defcfun g-type-is-a :boolean
30 (defcfun g-type-class-ref (:pointer g-type-class)
33 (defcfun g-type-class-unref :void
34 (class (:pointer g-type-class)))
36 (defcfun g-type-class-add-private :void
37 (class (:pointer g-type-class))
40 (defcfun g-type-default-interface-ref :pointer
43 (defcfun g-type-default-interface-unref :void
46 (defcfun (%g-type-children "g_type_children") (:pointer g-type)
48 (n-children (:pointer :uint)))
50 (defun g-type-children (g-type)
51 (with-foreign-object (n-children :uint)
52 (let ((g-types-ptr (%g-type-children g-type n-children)))
55 for i from 0 below (mem-ref n-children :uint)
56 collect (mem-aref g-types-ptr 'g-type i))
57 (g-free g-types-ptr)))))
59 (defcfun (%g-type-interfaces "g_type_interfaces") (:pointer g-type)
61 (n-interfaces (:pointer :uint)))
63 (defun g-type-interfaces (g-type)
64 (setf g-type (ensure-g-type g-type))
65 (with-foreign-object (n-interfaces :uint)
66 (let ((g-types-ptr (%g-type-interfaces g-type n-interfaces)))
69 for i from 0 below (mem-ref n-interfaces :uint)
70 collect (mem-aref g-types-ptr 'g-type i))
71 (g-free g-types-ptr)))))
73 (defcfun (%g-type-interface-prerequisites "g_type_interface_prerequisites") (:pointer g-type)
75 (n-interface-prerequisites (:pointer :uint)))
77 (defun g-type-interface-prerequisites (g-type)
78 (with-foreign-object (n-interface-prerequisites :uint)
79 (let ((g-types-ptr (%g-type-interface-prerequisites g-type n-interface-prerequisites)))
82 for i from 0 below (mem-ref n-interface-prerequisites :uint)
83 collect (mem-aref g-types-ptr 'g-type i))
84 (g-free g-types-ptr)))))
86 (defcfun g-type-register-static g-type
89 (info (:pointer g-type-info))
92 (defcfun g-type-register-static-simple g-type
98 (instance-init :pointer)
101 (defcfun g-type-add-interface-static :void
102 (instance-type g-type)
103 (interface-type g-type)
104 (info (:pointer g-interface-info)))
106 (defcfun g-type-interface-add-prerequisite :void
107 (interface-type g-type)
108 (prerequisite-type g-type))
110 (defun g-type-from-object (object)
111 (g-type-from-instance object))
113 (defun g-type-from-class (g-class)
114 (foreign-slot-value g-class 'g-type-class 'type))
116 (defun g-type-from-instance (type-instance)
117 (g-type-from-class (foreign-slot-value type-instance 'g-type-instance 'class)))
119 (defun g-type-from-interface (type-interface)
120 (foreign-slot-value type-interface 'g-type-interface 'type))
122 (defcfun g-strv-get-type g-type)
126 (defcfun g-closure-get-type g-type)
130 (defcfun g-type-query :void
132 (query (:pointer g-type-query)))