Function
GLibdatalist_id_set_data_full
Declaration
void
g_datalist_id_set_data_full (
GData** datalist,
GQuark key_id,
gpointer data,
GDestroyNotify destroy_func
)
Description
Sets the data corresponding to the given GQuark id, and the
function to be called when the element is removed from the datalist.
Any previous data with the same key is removed, and its destroy
function is called.
This function is not directly available to language bindings.
Parameters
datalist-
Type:
GDataA datalist.
The data is owned by the caller of the function. key_id-
Type:
GQuarkThe
GQuarkto identify the data element. data-
Type:
gpointerThe data element or
NULLto remove any previous element corresponding tokey_id.The argument can be NULL.The data is owned by the caller of the function. destroy_func-
Type:
GDestroyNotifyThe function to call when the data element is removed. This function will be called with the data element and can be used to free any memory allocated for it. If
dataisNULL, thendestroy_funcmust also beNULL.The argument can be NULL.