Wp.Event¶
Fields¶
None
Methods¶
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Wp.Event¶
Wp.Event
describes an event, an event is an entity which can be pushed on to event stack and the event dispatcher is going to pick and dispatch it.- classmethod new(type, priority, properties, source, subject)¶
- Parameters:
type (
str
) – the type of the eventpriority (
int
) – the priority of the eventproperties (
Wp.Properties
orNone
) – properties of the eventsource (
GObject.Object
) – the source of the eventsubject (
GObject.Object
orNone
) – the object that the event is about
- Returns:
the newly constructed event
- Return type:
Creates a new event.
- collect_hooks(dispatcher)¶
- Parameters:
dispatcher (
Wp.EventDispatcher
) – the event dispatcher- Returns:
True
if at least one hook has been collected,False
if no hooks run for this event or an error occurred- Return type:
Collects all the hooks registered in the dispatcher that run for this self.
- get_cancellable()¶
- Returns:
the cancellable
- Return type:
Returns the internal
Gio.Cancellable
that is used to track whether this event has been stopped byWp.Event.stop_processing
()
- get_data(key)¶
-
Gets the data that was previously associated with key by
Wp.Event.set_data
()
- get_properties()¶
- Returns:
the properties of the event
- Return type:
Gets the properties of the Event.
- get_source()¶
- Returns:
the source of the event
- Return type:
Gets the Source Object of the Event.
- get_subject()¶
- Returns:
the subject of the event
- Return type:
Gets the Subject Object of the Event.
- new_hooks_iterator()¶
- Returns:
the new iterator
- Return type:
Returns an iterator that iterates over all the hooks that were collected by
Wp.Event.collect_hooks
()
- set_data(key, data)¶
- Parameters:
key (
str
) – the key to associate data withdata (
GObject.Value
orNone
) – the data element, orNone
to remove any previous data associated with this key
Stores data on the event, associated with the specified key.
This can be used to exchange arbitrary data between hooks that run for this event.
- stop_processing()¶
Stops processing of this event; any further hooks will not be executed from this moment onwards and the event will be discarded from the stack.
- unref()¶