#include <glib.h>
Go to the source code of this file.
◆ NHook
◆ NHookCallback
typedef void(* NHookCallback) (NHook *hook, void *data, void *userdata) |
◆ NHookPriority
Enum defining the order in which callbacks are executed.
◆ _NHookPriority
Enum defining the order in which callbacks are executed.
Enumerator |
---|
N_HOOK_PRIORITY_LAST | |
N_HOOK_PRIORITY_LOW | |
N_HOOK_PRIORITY_DEFAULT | |
N_HOOK_PRIORITY_HIGH | |
N_HOOK_PRIORITY_FIRST | |
◆ n_hook_connect()
int n_hook_connect |
( |
NHook * | hook, |
|
|
int | priority, |
|
|
NHookCallback | callback, |
|
|
void * | userdata ) |
Connect callback function to hook.
- Parameters
-
hook | Hook. |
priority | Priority of the callback function. |
callback | Callback function. |
userdata | Userdata. |
- Returns
- TRUE if success.
- See also
- NHookPriority
-
NHookCallback
◆ n_hook_disconnect()
Disconnects callback function from hook.
- Parameters
-
hook | Hook. |
callback | Callback function. |
userdata | Userdata. |
◆ n_hook_fire()
int n_hook_fire |
( |
NHook * | hook, |
|
|
void * | data ) |
Executes callback functions associated with hook.
- Parameters
-
hook | Hook. |
data | Data to pass the callback functions as userdata. |
- Returns
- TRUE if success.
◆ n_hook_init()
void n_hook_init |
( |
NHook * | hook | ) |
|
Initializes hook structure.
- Parameters
-