Companion

object Companion

Functions

Link copied to clipboard
fun alloc(hookList: HookList): Hook

Allocates space for a #GHook and initializes it.

Link copied to clipboard
fun destroy(hookList: HookList, hookId: <Error class: unknown class>): Boolean

Destroys a #GHook, given its ID.

Link copied to clipboard
fun destroyLink(hookList: HookList, hook: Hook)

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

Link copied to clipboard
fun find(hookList: HookList, needValids: Boolean, func: HookFindFunc): Hook

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

Link copied to clipboard
fun findData(hookList: HookList, needValids: Boolean, data: <Error class: unknown class>? = null): Hook

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

Link copied to clipboard
fun findFunc(hookList: HookList, needValids: Boolean, func: <Error class: unknown class>? = null): Hook

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

Link copied to clipboard
fun findFuncData(hookList: HookList, needValids: Boolean, func: <Error class: unknown class>, data: <Error class: unknown class>? = null): Hook

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

Link copied to clipboard
fun firstValid(hookList: HookList, mayBeInCall: Boolean): Hook

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

Link copied to clipboard
fun free(hookList: HookList, hook: Hook)

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

Link copied to clipboard
fun get(hookList: HookList, hookId: <Error class: unknown class>): Hook

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

Link copied to clipboard
fun insertBefore(hookList: HookList, sibling: Hook? = null, hook: Hook)

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

Link copied to clipboard
fun nextValid(hookList: HookList, hook: Hook, mayBeInCall: Boolean): Hook

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

Link copied to clipboard
fun prepend(hookList: HookList, hook: Hook)

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

Link copied to clipboard
fun ref(hookList: HookList, hook: Hook): Hook

Increments the reference count for a #GHook.

Link copied to clipboard
fun 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.