Cogl.UserDataKey¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
unused |
r/w |
ignored. |
Methods¶
None
Details¶
- class Cogl.UserDataKey¶
A
Cogl.UserDataKey
is used to declare a key for attaching data to aCogl.Object
using cogl_object_set_user_data. The typedef only exists as a formality to make code self documenting since only the unique address of aCogl.UserDataKey
is used.Typically you would declare a static
Cogl.UserDataKey
and set private data on an object something like this:static CoglUserDataKey path_private_key; static void destroy_path_private_cb (void *data) { g_free (data); } static void my_path_set_data (CoglPath *path, void *data) { cogl_object_set_user_data (COGL_OBJECT (path), &private_key, data, destroy_path_private_cb); }
New in version 1.4.