X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=glib%2Fgobject.type.lisp;h=f72b125e91a5a1a970a2bbd753c82157858d5e19;hb=c770ca4a913da887d7e9cec76c4343cc1dc4a8aa;hp=b8c1638ea065c4a325a9db2c668e0fdc44e5b5cb;hpb=d698b1bf570296ce54a543fdae4233d731f42f72;p=cl-gtk2.git diff --git a/glib/gobject.type.lisp b/glib/gobject.type.lisp index b8c1638..f72b125 100644 --- a/glib/gobject.type.lisp +++ b/glib/gobject.type.lisp @@ -5,15 +5,27 @@ (defcfun (%g-type-init "g_type_init") :void) -(%g-type-init) +(at-init () (%g-type-init)) (defcfun (g-type-name "g_type_name") :string + "Returns the GType name + +@arg[type]{an integer specifying the GType} +@return{a string - name of type}" (type g-type)) (defcfun (g-type-from-name "g_type_from_name") g-type + "Looks up the GType by its name + +@arg[name]{a string naming the type} +@return{an integer specifying GType}" (name :string)) (defcfun g-type-parent g-type + "Returns the parent of a GType + +@arg[type]{an integer specifying the GType} +@return{an integer specifying the parent GType}" (type g-type)) (defcfun g-type-depth :uint @@ -48,6 +60,10 @@ (n-children (:pointer :uint))) (defun g-type-children (g-type) + "Returns the list of types inherited from @code{g-type}. + +@arg[g-type]{an integer or a string specifying type}" + (setf g-type (ensure-g-type g-type)) (with-foreign-object (n-children :uint) (let ((g-types-ptr (%g-type-children g-type n-children))) (prog1 @@ -108,6 +124,10 @@ (prerequisite-type g-type)) (defun g-type-from-object (object) + "Returns the GType of an @code{object} + +@arg[object]{C pointer to an object} +@return{an integer specifying the GType}" (g-type-from-instance object)) (defun g-type-from-class (g-class)