Wp.EventDispatcher

g GObject.Object GObject.Object Wp.EventDispatcher Wp.EventDispatcher GObject.Object->Wp.EventDispatcher

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

get_instance (core)

new_hooks_iterator ()

push_event (event)

register_hook (hook)

unregister_hook (hook)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Wp.EventDispatcher(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Wp.EventDispatcherClass

The event dispatcher holds all the events and hooks and dispatches them. It orchestras the show on event stack.

classmethod get_instance(core)
Parameters:

core (Wp.Core) – the core

Returns:

the event dispatcher instance

Return type:

Wp.EventDispatcher

Returns the event dispatcher instance that is associated with the given core.

This method will also create the instance and register it with the core, if it had not been created before.

new_hooks_iterator()
Returns:

a new iterator

Return type:

Wp.Iterator

Returns an iterator to iterate over all the registered hooks.

push_event(event)
Parameters:

event (Wp.Event) – the new event

Pushes a new event onto the event stack for dispatching only if there are any hooks are available for it.

register_hook(hook)
Parameters:

hook (Wp.EventHook) – the hook to register

Registers an event hook.

unregister_hook(hook)
Parameters:

hook (Wp.EventHook) – the hook to unregister

Unregisters an event hook.