HookList
- class HookList(*args, **kwargs)
- Constructors:
HookList()
Methods
- class HookList
-
- init(hook_size: int) None
Initializes a
HookList
. This must be called before theHookList
is used.- Parameters:
hook_size – the size of each element in the
HookList
, typicallysizeof (GHook)
.
- invoke(may_recurse: bool) None
Calls all of the
Hook
functions in aHookList
.- Parameters:
may_recurse –
True
if functions which are already running (e.g. in another thread) can be called. If set toFalse
, these are skipped
- invoke_check(may_recurse: bool) None
Calls all of the
Hook
functions in aHookList
. Any function which returnsFalse
is removed from theHookList
.- Parameters:
may_recurse –
True
if functions which are already running (e.g. in another thread) can be called. If set toFalse
, these are skipped
- marshal(may_recurse: bool, marshaller: Callable[[...], None], *marshal_data: Any) None
Calls a function on each valid
Hook
.- Parameters:
may_recurse –
True
if hooks which are currently running (e.g. in another thread) are considered valid. If set toFalse
, these are skippedmarshaller – the function to call for each
Hook
marshal_data – data to pass to
marshaller
- marshal_check(may_recurse: bool, marshaller: Callable[[...], bool], *marshal_data: Any) None
Calls a function on each valid
Hook
and destroys it if the function returnsFalse
.- Parameters:
may_recurse –
True
if hooks which are currently running (e.g. in another thread) are considered valid. If set toFalse
, these are skippedmarshaller – the function to call for each
Hook
marshal_data – data to pass to
marshaller