Package elisa :: Package core :: Module input_manager :: Class InputManager

Class InputManager

source code


InputManager provides a common place to retrieve input events coming from a GUI toolkit, additional input sources or even a network. InputEvents can be pushed by elisa.core.components.input_provider.InputProviders or be polled by the InputManager, depending on the implementation chosen: elisa.core.components.input_provider.PollInputProvider or elisa.core.components.input_provider.PushInputProvider.

Other objects can connect to the manager's signals that are emitted when elisa.core.input_event.InputEvents coming from elisa.core.components.input_provider.InputProviders are received.

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
clean(self) source code
 
process_event(self, event)
Fire the signal corresponding to the event.
source code
elisa.core.utils.defer.Deferred
register_component(self, component)
Register a new InputProvider in the InputManager so that the events collected by the former are propagated by the latter.
source code
elisa.core.utils.defer.Deferred
unregister_component(self, component)
Clean the InputProvider and unregister it from the InputManager; no events from the InputProvider will be propagated anymore.
source code

Inherited from extern.log.log.Loggable: debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

    Inherited from manager.Manager
 
plugin_status_changed_cb(self, plugin, status)
Callback meant to be invoked (by the plugin registry) when the status of a plugin has changed.
source code
Class Variables
  __gsignals__ = {'input_event':(gobject.SIGNAL_RUN_LAST, gobjec...
str entry_point = 'elisa.core.components.input_provider'
the entry point listing providers in plugins

Inherited from extern.log.log.Loggable: logCategory

Instance Variables
    Inherited from manager.Manager
list of elisa.core.component.Component components
components currently registered in the manager
Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

clean(self)

source code 
Overrides: manager.Manager.clean

process_event(self, event)

source code 

Fire the signal corresponding to the event.

Each event type is mapped to a signal instance to which other elisa components can connect (e.g to monitor user key presses).

This method can be called by elisa.core.components.input_provider.PushInputProvider components when they receive input data from the input device.

Parameters:

register_component(self, component)

source code 

Register a new InputProvider in the InputManager so that the events collected by the former are propagated by the latter.

Parameters:
Returns: elisa.core.utils.defer.Deferred
a deferred fired when the component is registered
Overrides: manager.Manager.register_component

unregister_component(self, component)

source code 

Clean the InputProvider and unregister it from the InputManager; no events from the InputProvider will be propagated anymore.

Parameters:
Returns: elisa.core.utils.defer.Deferred
a deferred fired when the component is unregistered
Overrides: manager.Manager.unregister_component

Class Variable Details

__gsignals__

Value:
{'input_event':(gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (object,))\
}