Package: gobject

Function gobject:type-qdata

Lambda List

gobject:type-qdata (gtype quark)

Syntax

(g:type-qdata type quark) => data
(setf (g:type-qdata type quark) data)

Arguments

gtype -- a g:type-t type ID
quark -- a g:quark-as-string ID to identify the data
data -- the data

Details

The g:type-qdata function obtains data which has previously been attached to gtype with the (setf g:type-qdata) function.

Note that this does not take subtyping into account. Data attached to one type cannot be retrieved from a subtype.

Examples

(setf (g:type-qdata "gboolean" "mydata") "a string") => "a string"
(g:type-qdata "gboolean" "mydata") => "a string"
(setf (g:type-qdata "gboolean" "mydata") '(a b c)) => (A B C)
(g:type-qdata "gboolean" "mydata") => (A B C)
(setf (g:type-qdata "gboolean" "mydata") nil) => NIL
(g:type-qdata "gboolean" "mydata") => NIL    
 

See also

2023-12-8