GLib.Hook¶
Fields¶
| Name | Type | Access | Description | 
|---|---|---|---|
| data | object | r/w | data which is passed to func when this hook is invoked | 
| destroy | GLib.DestroyNotify | r/w | the default finalize_hook function of a GLib.HookListcalls this member of the hook that is being finalized | 
| flags | int | r/w | flags which are set for this hook. See GLib.HookFlagMaskfor predefined flags | 
| func | object | r/w | the function to call when this hook is invoked. The possible signatures for this function are GLib.HookFuncandGLib.HookCheckFunc | 
| hook_id | int | r/w | the id of this hook, which is unique within its list | 
| next | GLib.Hook | r/w | pointer to the next hook in the list | 
| prev | GLib.Hook | r/w | pointer to the previous hook in the list | 
| ref_count | int | r/w | the reference count of this hook | 
Methods¶
| class | destroy_link(hook_list, hook) | 
| class | free(hook_list, hook) | 
| class | insert_before(hook_list, sibling, hook) | 
| class | prepend(hook_list, hook) | 
| class | unref(hook_list, hook) | 
| compare_ids(sibling) | 
Details¶
- 
class GLib.Hook¶
- The - GLib.Hookstruct represents a single hook function in a- GLib.HookList.- 
classmethod destroy_link(hook_list, hook)[source]¶
- Parameters: - hook_list (GLib.HookList) – aGLib.HookList
- hook (GLib.Hook) – theGLib.Hookto remove
 - Removes one - GLib.Hookfrom a- GLib.HookList, marking it inactive and calling- GLib.Hook.unref() on it.
- hook_list (
 - 
classmethod free(hook_list, hook)[source]¶
- Parameters: - hook_list (GLib.HookList) – aGLib.HookList
- hook (GLib.Hook) – theGLib.Hookto free
 - Calls the - GLib.HookListfinalize_hook function if it exists, and frees the memory allocated for the- GLib.Hook.
- hook_list (
 - 
classmethod insert_before(hook_list, sibling, hook)[source]¶
- Parameters: - hook_list (GLib.HookList) – aGLib.HookList
- sibling (GLib.HookorNone) – theGLib.Hookto insert the newGLib.Hookbefore
- hook (GLib.Hook) – theGLib.Hookto insert
 - Inserts a - GLib.Hookinto a- GLib.HookList, before a given- GLib.Hook.
- hook_list (
 - 
classmethod prepend(hook_list, hook)[source]¶
- Parameters: - hook_list (GLib.HookList) – aGLib.HookList
- hook (GLib.Hook) – theGLib.Hookto add to the start of hook_list
 - Prepends a - GLib.Hookon the start of a- GLib.HookList.
- hook_list (
 - 
classmethod unref(hook_list, hook)[source]¶
- Parameters: - hook_list (GLib.HookList) – aGLib.HookList
- hook (GLib.Hook) – theGLib.Hookto unref
 - Decrements the reference count of a - GLib.Hook. If the reference count falls to 0, the- GLib.Hookis removed from the- GLib.HookListand- GLib.Hook.free() is called to free it.
- hook_list (
 
- 
classmethod