Macros | |
#define | MIRKL_IMPLEMENT_HOOK_GET_PROTO(ns, link, name) link##_DECLARE(mirkl_dllist_t *) ns##_hook_get_##name(void) |
#define | MIRKL_DECLARE_EXTERNAL_HOOK(ns, link, ret, name, args) |
#define | MIRKL_HOOK_STRUCT(members) static struct { members } _hooks={0}; |
#define | MIRKL_HOOK_LINK(name) |
#define | MIRKL_IMPLEMENT_EXTERNAL_HOOK_BASE(ns, link, name) |
#define | MIRKL_IMPLEMENT_EXTERNAL_HOOK_VOID(ns, link, name, args_decl, args_use) |
#define | MIRKL_HOOK_REALLY_FIRST (-10) |
#define | MIRKL_HOOK_FIRST 0 |
#define | MIRKL_HOOK_MIDDLE 10 |
#define | MIRKL_HOOK_LAST 20 |
#define | MIRKL_HOOK_REALLY_LAST 30 |
Functions | |
int | mirkl_hook_bubsort_callback (int atag, void *amem, int btag, void *bmem, void *args) |
#define MIRKL_DECLARE_EXTERNAL_HOOK | ( | ns, | |
link, | |||
ret, | |||
name, | |||
args | |||
) |
macro to declare the hook correctly
#define MIRKL_HOOK_FIRST 0 |
run this hook first
#define MIRKL_HOOK_LAST 20 |
run this hook after every other hook which is defined
#define MIRKL_HOOK_LINK | ( | name | ) |
macro to link the hook structure
#define MIRKL_HOOK_MIDDLE 10 |
run this hook somewhere
#define MIRKL_HOOK_REALLY_FIRST (-10) |
run this hook first, before ANYTHING
#define MIRKL_HOOK_REALLY_LAST 30 |
run this hook last, after EVERYTHING
#define MIRKL_HOOK_STRUCT | ( | members | ) | static struct { members } _hooks={0}; |
macro to declare the hook structure
#define MIRKL_IMPLEMENT_EXTERNAL_HOOK_BASE | ( | ns, | |
link, | |||
name | |||
) |
macro to implement the hook
#define MIRKL_IMPLEMENT_EXTERNAL_HOOK_VOID | ( | ns, | |
link, | |||
name, | |||
args_decl, | |||
args_use | |||
) |
Implement a hook that has no return code, and therefore runs all of the registered functions
ns | The namespace prefix of the hook functions |
link | The linkage declaration prefix of the hook |
name | The name of the hook |
args_decl | The declaration of the arguments for the hook |
args_use | The names for the arguments for the hook |
#define MIRKL_IMPLEMENT_HOOK_GET_PROTO | ( | ns, | |
link, | |||
name | |||
) | link##_DECLARE(mirkl_dllist_t *) ns##_hook_get_##name(void) |
macro to return the prototype of the hook function