Hook

The #GHook struct represents a single hook function in a #GHookList.

Constructors

this
this(GHook* gHook, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

compareIds
int compareIds(Hook sibling)

Compares the ids of two #GHook elements, returning a negative value if the second id is greater than the first.

getHookStruct
GHook* getHookStruct()

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

Static functions

alloc
Hook alloc(HookList hookList)

Allocates space for a #GHook and initializes it.

destroy
bool destroy(HookList hookList, gulong hookId)

Destroys a #GHook, given its ID.

destroyLink
void destroyLink(HookList hookList, Hook hook)

Removes one #GHook from a #GHookList, marking it inactive and calling g_hook_unref() on it.

doref
Hook doref(HookList hookList, Hook hook)

Increments the reference count for a #GHook.

find
Hook find(HookList hookList, bool needValids, GHookFindFunc func, void* data)

Finds a #GHook in a #GHookList using the given function to test for a match.

findData
Hook findData(HookList hookList, bool needValids, void* data)

Finds a #GHook in a #GHookList with the given data.

findFunc
Hook findFunc(HookList hookList, bool needValids, void* func)

Finds a #GHook in a #GHookList with the given function.

findFuncData
Hook findFuncData(HookList hookList, bool needValids, void* func, void* data)

Finds a #GHook in a #GHookList with the given function and data.

firstValid
Hook firstValid(HookList hookList, bool mayBeInCall)

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.)

free
void free(HookList hookList, Hook hook)

Calls the #GHookList @finalize_hook function if it exists, and frees the memory allocated for the #GHook.

get
Hook get(HookList hookList, gulong hookId)

Returns the #GHook with the given id, or %NULL if it is not found.

insertBefore
void insertBefore(HookList hookList, Hook sibling, Hook hook)

Inserts a #GHook into a #GHookList, before a given #GHook.

insertSorted
void insertSorted(HookList hookList, Hook hook, GHookCompareFunc func)

Inserts a #GHook into a #GHookList, sorted by the given function.

nextValid
Hook nextValid(HookList hookList, Hook hook, bool mayBeInCall)

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.)

prepend
void prepend(HookList hookList, Hook hook)

Prepends a #GHook on the start of a #GHookList.

unref
void unref(HookList hookList, Hook hook)

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.

Variables

gHook
GHook* gHook;

the main Gtk struct

ownedRef
bool ownedRef;
Undocumented in source.

Meta