Method

CoglObjectset_user_data

Declaration [src]

void
cogl_object_set_user_data (
  CoglObject* object,
  CoglUserDataKey* key,
  void* user_data,
  CoglUserDataDestroyCallback destroy
)

Description [src]

Associates some private user_data with a given CoglObject. To later remove the association call cogl_object_set_user_data() with the same key but NULL for the user_data.

Available since:1.4

Parameters

key CoglUserDataKey
 

The address of a CoglUserDataKey which provides a unique value with which to index the private data.

 The data is owned by the caller of the function.
user_data void*
 

The data to associate with the given object, or NULL to remove a previous association.

 The argument can be NULL.
 The data is owned by the caller of the function.
destroy CoglUserDataDestroyCallback
 

A CoglUserDataDestroyCallback to call if the object is destroyed or if the association is removed by later setting NULL data for the same key.