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 (setf g-type (ensure-g-type g-type))
52 (with-foreign-object (n-children :uint)
53 (let ((g-types-ptr (%g-type-children g-type n-children)))
56 for i from 0 below (mem-ref n-children :uint)
57 collect (mem-aref g-types-ptr 'g-type i))
58 (g-free g-types-ptr)))))
60 (defcfun (%g-type-interfaces "g_type_interfaces") (:pointer g-type)
62 (n-interfaces (:pointer :uint)))
64 (defun g-type-interfaces (g-type)
65 (setf g-type (ensure-g-type g-type))
66 (with-foreign-object (n-interfaces :uint)
67 (let ((g-types-ptr (%g-type-interfaces g-type n-interfaces)))
70 for i from 0 below (mem-ref n-interfaces :uint)
71 collect (mem-aref g-types-ptr 'g-type i))
72 (g-free g-types-ptr)))))
74 (defcfun (%g-type-interface-prerequisites "g_type_interface_prerequisites") (:pointer g-type)
76 (n-interface-prerequisites (:pointer :uint)))
78 (defun g-type-interface-prerequisites (g-type)
79 (with-foreign-object (n-interface-prerequisites :uint)
80 (let ((g-types-ptr (%g-type-interface-prerequisites g-type n-interface-prerequisites)))
83 for i from 0 below (mem-ref n-interface-prerequisites :uint)
84 collect (mem-aref g-types-ptr 'g-type i))
85 (g-free g-types-ptr)))))
87 (defcfun g-type-register-static g-type
90 (info (:pointer g-type-info))
93 (defcfun g-type-register-static-simple g-type
99 (instance-init :pointer)
100 (flags g-type-flags))
102 (defcfun g-type-add-interface-static :void
103 (instance-type g-type)
104 (interface-type g-type)
105 (info (:pointer g-interface-info)))
107 (defcfun g-type-interface-add-prerequisite :void
108 (interface-type g-type)
109 (prerequisite-type g-type))
111 (defun g-type-from-object (object)
112 (g-type-from-instance object))
114 (defun g-type-from-class (g-class)
115 (foreign-slot-value g-class 'g-type-class 'type))
117 (defun g-type-from-instance (type-instance)
118 (g-type-from-class (foreign-slot-value type-instance 'g-type-instance 'class)))
120 (defun g-type-from-interface (type-interface)
121 (foreign-slot-value type-interface 'g-type-interface 'type))
123 (defcfun g-strv-get-type g-type)
127 (defcfun g-closure-get-type g-type)
131 (defcfun g-type-query :void
133 (query (:pointer g-type-query)))