Struct
GLibHook
Description [src]
struct GHook {
gpointer data;
GHook* next;
GHook* prev;
guint ref_count;
gulong hook_id;
guint flags;
gpointer func;
GDestroyNotify destroy;
}
The GHook struct represents a single hook function in a GHookList.
Structure members
dataData which is passed to func when this hook is invoked.
nextPointer to the next hook in the list.
prevPointer to the previous hook in the list.
ref_countThe reference count of this hook.
hook_idThe id of this hook, which is unique within its list.
flagsFlags which are set for this hook. See
GHookFlagMaskfor predefined flags.funcThe function to call when this hook is invoked. The possible signatures for this function are
GHookFuncandGHookCheckFunc.destroyThe default
finalize_hookfunction of aGHookListcalls this member of the hook that is being finalized.
Functions
g_hook_destroy_link
Removes one GHook from a GHookList, marking it
inactive and calling g_hook_unref() on it.
g_hook_first_valid
Returns the first GHook in a GHookList which has not been destroyed.
The reference count for the GHook is incremented, so you must call
g_hook_unref() to restore it when no longer needed. (Or call
g_hook_next_valid() if you are stepping through the GHookList.).
g_hook_free
Calls the GHookList finalize_hook function if it exists,
and frees the memory allocated for the GHook.
g_hook_next_valid
Returns the next GHook in a GHookList which has not been destroyed.
The reference count for the GHook is incremented, so you must call
g_hook_unref() to restore it when no longer needed. (Or continue to call
g_hook_next_valid() until NULL is returned.).
g_hook_unref
Decrements the reference count of a GHook.
If the reference count falls to 0, the GHook is removed
from the GHookList and g_hook_free() is called to free it.
Instance methods
g_hook_compare_ids
Compares the ids of two GHook elements, returning a negative value
if the second id is greater than the first.