GLib.Hook¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
data |
r/w |
data which is passed to func when this hook is invoked |
|
destroy |
r/w |
the default finalize_hook function of a |
|
flags |
r/w |
flags which are set for this hook. See |
|
func |
r/w |
the function to call when this hook is invoked. The possible signatures for this function are |
|
hook_id |
r/w |
the id of this hook, which is unique within its list |
|
next |
r/w |
pointer to the next hook in the list |
|
prev |
r/w |
pointer to the previous hook in the list |
|
ref_count |
r/w |
the reference count of this hook |
Methods¶
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
|
Details¶
- class GLib.Hook¶
The
GLib.Hook
struct represents a single hook function in aGLib.HookList
.- classmethod destroy_link(hook_list, hook)[source]¶
- Parameters:
hook_list (
GLib.HookList
) – aGLib.HookList
Removes one
GLib.Hook
from aGLib.HookList
, marking it inactive and callingGLib.Hook.unref
() on it.
- classmethod free(hook_list, hook)[source]¶
- Parameters:
hook_list (
GLib.HookList
) – aGLib.HookList
Calls the
GLib.HookList
finalize_hook function if it exists, and frees the memory allocated for theGLib.Hook
.
- classmethod insert_before(hook_list, sibling, hook)[source]¶
- Parameters:
hook_list (
GLib.HookList
) – aGLib.HookList
sibling (
GLib.Hook
orNone
) – theGLib.Hook
to insert the newGLib.Hook
before
Inserts a
GLib.Hook
into aGLib.HookList
, before a givenGLib.Hook
.
- classmethod insert_sorted(hook_list, hook, func)[source]¶
- Parameters:
hook_list (
GLib.HookList
) – aGLib.HookList
func (
GLib.HookCompareFunc
) – the comparison function used to sort theGLib.Hook
elements
Inserts a
GLib.Hook
into aGLib.HookList
, sorted by the given function.
- classmethod prepend(hook_list, hook)[source]¶
- Parameters:
hook_list (
GLib.HookList
) – aGLib.HookList
hook (
GLib.Hook
) – theGLib.Hook
to add to the start of hook_list
Prepends a
GLib.Hook
on the start of aGLib.HookList
.
- classmethod unref(hook_list, hook)[source]¶
- Parameters:
hook_list (
GLib.HookList
) – aGLib.HookList
Decrements the reference count of a
GLib.Hook
. If the reference count falls to 0, theGLib.Hook
is removed from theGLib.HookList
andGLib.Hook.free
() is called to free it.