Wp.EventHook¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r |
The associated event dispatcher |
||
r/w/co |
The hook name |
||
[ |
r/w/co |
runs-after-hooks |
|
[ |
r/w/co |
runs-before-hooks |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Wp.EventHook(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
The event hook is a structure that describes some executable action that an event dispatcher will run when a matching event has been received.
- finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – the async operation result- Raises:
- Returns:
- Return type:
Finishes the async operation that was started by
Wp.EventHook.run
()
- get_runs_after_hooks()¶
-
Returns the names of the hooks that should run before this hook, or in other words, this hook should run after them.
- get_runs_before_hooks()¶
-
Returns the names of the hooks that should run after this hook, or in other words, this hook should run before them.
- run(event, cancellable, callback, *callback_data)¶
- Parameters:
event (
Wp.Event
) – the event that triggered the hookcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
to cancel the async operationcallback (
Gio.AsyncReadyCallback
orNone
) – a callback to fire after execution of the hook has completed
Runs the hook on the given event.
- runs_for_event(event)¶
- Parameters:
event (
Wp.Event
) – the event- Returns:
True
if the hook should be executed for the given event,False
otherwise- Return type:
Checks if the hook should be executed for a given event.
- do_finish(res) virtual¶
- Parameters:
res (
Gio.AsyncResult
) – the async operation result- Returns:
- Return type:
Finishes the async operation that was started by
Wp.EventHook.run
()
- do_run(event, cancellable, callback, callback_data) virtual¶
- Parameters:
event (
Wp.Event
) – the event that triggered the hookcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
to cancel the async operationcallback (
Gio.AsyncReadyCallback
orNone
) – a callback to fire after execution of the hook has completed
Runs the hook on the given event.
Property Details¶
- Wp.EventHook.props.dispatcher¶
- Name:
dispatcher
- Type:
- Default Value:
- Flags:
The associated event dispatcher
- Wp.EventHook.props.name¶
- Name:
name
- Type:
- Default Value:
''
- Flags:
The hook name
- Wp.EventHook.props.runs_after_hooks¶
- Name:
runs-after-hooks
- Type:
[
str
]- Default Value:
[]
- Flags:
runs-after-hooks