Package: glib
Type glib:quark-as-string
Details
Quarks are associations between strings and integer identifiers. Given either the string or the GQuark identifier it is possible to
retrieve the other. Lisp bindingIf the Lisp string does not currently has an associated GQuark, a new GQuark is created. A GQuark value of zero is associated to nil in Lisp. See the g:type-qdata function for attaching a GQuark identifier to a g:type-t type ID. Examples(cffi:convert-to-foreign "GtkWidget" 'g:quark-as-string) => 91 (cffi:convert-to-foreign "gboolean" 'g:quark-as-string) => 9 (cffi:convert-to-foreign nil 'g:quark-as-string) => 0Translate a GQuark identifier to a Lisp string: (cffi:convert-from-foreign 91 'g:quark-as-string) => "GtkWidget" (cffi:convert-from-foreign 9 'g:quark-as-string) => "gboolean" (cffi:convert-from-foreign 0 'g:quark-as-string) => NIL | See also |
2024-10-12