Software: Apache/2.0.54 (Fedora). PHP/5.0.4 uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /usr/share/gtk-doc/html/glib/ drwxr-xr-x |
Viewing file: Select action/file-type:
Synopsis#include <glib.h> GData; void g_datalist_init (GData **datalist); #define g_datalist_id_set_data (dl, q, d) void g_datalist_id_set_data_full (GData **datalist, GQuark key_id, gpointer data, GDestroyNotify destroy_func); gpointer g_datalist_id_get_data (GData **datalist, GQuark key_id); #define g_datalist_id_remove_data (dl, q) gpointer g_datalist_id_remove_no_notify (GData **datalist, GQuark key_id); #define g_datalist_set_data (dl, k, d) #define g_datalist_set_data_full (dl, k, d, f) #define g_datalist_get_data (dl, k) #define g_datalist_remove_data (dl, k) #define g_datalist_remove_no_notify (dl, k) void g_datalist_foreach (GData **datalist, GDataForeachFunc func, gpointer user_data); void g_datalist_clear (GData **datalist); DescriptionKeyed data lists provide lists of arbitrary data elements which can be accessed either with a string or with a GQuark corresponding to the string. The GQuark methods are quicker, since the strings have to be converted to GQuarks anyway.
Data lists are used for associating arbitrary data with
GObjects, using
To create a datalist, use
To add data elements to a datalist use
To get data elements from a datalist use
To iterate over all data elements in a datalist use
To remove data elements from a datalist use
To remove all data elements from a datalist, use DetailsGDatatypedef struct _GData GData; The GData struct is an opaque data structure to represent a Keyed Data List. It should only be accessed via the following functions. g_datalist_init ()void g_datalist_init (GData **datalist);
Resets the datalist to
g_datalist_id_set_data()#define g_datalist_id_set_data(dl, q, d) Sets the data corresponding to the given GQuark id. Any previous data with the same key is removed, and its destroy function is called.
g_datalist_id_set_data_full ()void g_datalist_id_set_data_full (GData **datalist, GQuark key_id, gpointer data, GDestroyNotify destroy_func); 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.
g_datalist_id_get_data ()gpointer g_datalist_id_get_data (GData **datalist, GQuark key_id);
Retrieves the data element corresponding to
g_datalist_id_remove_data()#define g_datalist_id_remove_data(dl, q) Removes an element, using its GQuark identifier.
g_datalist_id_remove_no_notify ()gpointer g_datalist_id_remove_no_notify (GData **datalist, GQuark key_id); Removes an element, without calling its destroy notification function.
g_datalist_set_data()#define g_datalist_set_data(dl, k, d) Sets the data element corresponding to the given string identifier.
g_datalist_set_data_full()#define g_datalist_set_data_full(dl, k, d, f) Sets the data element corresponding to the given string identifier, and the function to be called when the data element is removed.
g_datalist_get_data()#define g_datalist_get_data(dl, k)
Gets a data element, using its string identifer.
This is slower than
g_datalist_remove_data()#define g_datalist_remove_data(dl, k) Removes an element using its string identifier. The data element's destroy function is called if it has been set.
g_datalist_remove_no_notify()#define g_datalist_remove_no_notify(dl, k) Removes an element, without calling its destroy notifier.
g_datalist_foreach ()void g_datalist_foreach (GData **datalist, GDataForeachFunc func, gpointer user_data);
Calls the given function for each data element of the datalist.
The function is called with each data element's GQuark id and data,
together with the given
g_datalist_clear ()void g_datalist_clear (GData **datalist); Frees all the data elements of the datalist. The data elements' destroy functions are called if they have been set.
|
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.003 ]-- |