Go to the source code of this file.
Functions |
void | plug_data_set (plugDefinition *plug, const char *ident, void *data, plugDataDestroyFunc destroy) |
void | plug_data_sink (plugData *data) |
plugData * | plug_data_get (const char *ident, plugData *data) |
plugData * | plug_data_get_new (const char *ident, plugData *data) |
plugData * | plug_data_get_full (const char *ident, plugData *data, BOOL onlynew, const char *plug_name) |
void | plug_data_ref (plugData *data) |
void | plug_data_unget (plugData *data) |
BOOL | plug_data_is_observed (const char *ident) |
void | plug_observ_data (plugDefinition *plug, const char *ident) |
void | plug_observ_data_priority (plugDefinition *plug, const char *ident, int pri) |
void | plug_observ_data_remove (plugDefinition *plug, const char *ident) |
void | plug_function_register (plugDefinition *plug, const char *ident, plugFunc func) |
void | plug_function_unregister (plugDefinition *plug, const char *ident) |
plugDataFunc * | plug_function_get (const char *ident, plugDataFunc *func) |
plugDataFunc * | plug_function_get_full (const char *ident, plugDataFunc *func, const char *plug_name) |
Macro Definition Documentation
#define PLUG_PRIORITY_DEFAULT (-1) |
Use default priority values
#define PLUG_PRIORITY_MIN 0 |
#define PLUG_PRIORITY_MAX 1000 |
Typedef Documentation
typedef void(* plugDataDestroyFunc)(void *data) |
typedef void(* plugFunc)() |
Function Documentation
Store refcounted data under the ID ident. plug is the plugin from
where this function is called.
destroy is called if the refcount drops to 0.
By default, even if refcount of data drops to 0, it is deleted not
until the end of the current mainloop run. This changes it to delete
data immediately if refcount drops to 0. If unsure, don't use it.
Retrieve data stored under the ID 'ident'.
The refcount of 'data' is increased.
data : If != NULL the data stored after 'data' under 'ident'
is returned, otherwise the first data element with an
ID of 'ident.
_new() / onlynew: Get only data which was added after the
last restart of the mainloop.
plug_name: Get data stored by a plugin by this name.
plugData* plug_data_get_full |
( |
const char * |
ident, |
|
|
plugData * |
data, |
|
|
BOOL |
onlynew, |
|
|
const char * |
plug_name |
|
) |
| |
BOOL plug_data_is_observed |
( |
const char * |
ident | ) |
|
Returns TRUE if there is a plugin which observes 'ident'.
Add an observer for data with the ID 'ident'. plug is the plugin
from where this function is called. The plugin's proces() function
will be called if data with the ID 'ident' is available.
ident == "id" : Add the observer.
ident == "id()" : Add the observer. The proces() function is
called one after another for all available data elements
(see plug_add_default_page()).
ident == "id(plugs)": Add the observer. The proces() function is
additionally called for data elements from the plugins
"plugs" (see plug_add_default_page()).
void plug_observ_data_priority |
( |
plugDefinition * |
plug, |
|
|
const char * |
ident, |
|
|
int |
pri |
|
) |
| |
void plug_observ_data_remove |
( |
plugDefinition * |
plug, |
|
|
const char * |
ident |
|
) |
| |
Remove an observer set with plug_observ_data().
ident == "id" : Remove the observer.
ident == "id()" : Remove the observer and any dependent plugins
in the plugin names string (see plug_add_default_page()).
ident == "id(plugs)": Remove the specified plugins from the plugin
names string (see plug_add_default_page()) and the observer,
if no dependent plugins in the plugin names string are left.
Register a function under the ID 'ident'. plug is the plugin from
where this function is called.
void plug_function_unregister |
( |
plugDefinition * |
plug, |
|
|
const char * |
ident |
|
) |
| |
Get function stored under the ID 'ident'. If 'func'!=NULL the
function stored after 'func' under 'ident' is returned.
plug_name: Get function stored by a plugin by this name.