Method

GObjectObjectset_data_full

Declaration

void
g_object_set_data_full (
  GObject* object,
  const gchar* key,
  gpointer data,
  GDestroyNotify destroy
)

Description

Like g_object_set_data() except it adds notification for when the association is destroyed, either by setting it to a different value or when the object is destroyed.

Note that the destroy callback is not called if data is NULL.

Parameters

key const gchar*
 

Name of the key.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
data gpointer
 

Data to associate with that key.

 The argument can be NULL.
destroy GDestroyNotify
 

Function to call when the association is destroyed.

 The argument can be NULL.