Hook

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

Constructors

this
this(void* ptr, Flag!"Take" take)

Members

Functions

cPtr
void* cPtr()
compareIds
int compareIds(glib.hook.Hook sibling)

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

Properties

destroy
GDestroyNotify destroy [@property getter]

Get field destroy.

destroy
GDestroyNotify destroy [@property setter]

Set field destroy.

flags
uint flags [@property getter]

Get field flags.

flags
uint flags [@property setter]

Set field flags.

hookId
gulong hookId [@property getter]

Get field hookId.

hookId
gulong hookId [@property setter]

Set field hookId.

next
glib.hook.Hook next [@property getter]

Get field next.

prev
glib.hook.Hook prev [@property getter]

Get field prev.

refCount
uint refCount [@property getter]

Get field refCount.

refCount
uint refCount [@property setter]

Set field refCount.

Static functions

destroy
bool destroy(glib.hook_list.HookList hookList, gulong hookId)

Destroys a #GHook, given its ID.

destroyLink
void destroyLink(glib.hook_list.HookList hookList, glib.hook.Hook hook)

Removes one #GHook from a #GHookList, marking it inactive and calling glib.hook.Hook.unref on it.

free
void free(glib.hook_list.HookList hookList, glib.hook.Hook hook)

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

insertBefore
void insertBefore(glib.hook_list.HookList hookList, glib.hook.Hook sibling, glib.hook.Hook hook)

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

insertSorted
void insertSorted(glib.hook_list.HookList hookList, glib.hook.Hook hook, glib.types.HookCompareFunc func)

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

prepend
void prepend(glib.hook_list.HookList hookList, glib.hook.Hook hook)

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

unref
void unref(glib.hook_list.HookList hookList, glib.hook.Hook hook)

Decrements the reference count of a #GHook. If the reference count falls to 0, the #GHook is removed from the #GHookList and glib.hook.Hook.free is called to free it.