# Class e.c.i.InputManager(manager.Manager, gobject.GObject):

Part of elisa.core.input_manager View In Hierarchy

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.InputProvider`s 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.InputEvent`s coming from `elisa.core.components.input_provider.InputProvider`s are received.

Line # | Kind | Name | Docs
--- | --- | --- | ---
51 | Method | __init__ | Initialize the _components instance variable and the
59 | Method | start | Start a polling loop that will regularly check the registered
68 | Method | stop | Clean all the registered
81 | Method | process_event | Fire the signal corresponding to the event.
103 | Method | register_component | Register a new InputProvider in the InputManager so that the
118 | Method | unregister_component | Clean the InputProvider and unregister it from the InputManager;

Inherited from Manager:

Line # | Kind | Name | Docs
--- | --- | --- | ---
63 | Method | load_components | Load a list of components in sequence.

def __init__(self):
overrides elisa.core.manager.Manager.__init__
Initialize the _components instance variable and the Manager as a Loggable object.

def start(self):
overrides elisa.core.manager.Manager.start
Start a polling loop that will regularly check the registered `elisa.core.components.input_provider.PollInputProvider`s for new `elisa.core.input_event.InputEvent`s.

def stop(self):
overrides elisa.core.manager.Manager.stop
Clean all the registered `elisa.core.components.input_provider.InputProvider`s and stop polling for new `elisa.core.input_event.InputEvent`s.

def process_event(self, event):

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 | event | the event to process (type: `elisa.core.input_event.InputEvent` )
| provider_path | the path of the InputProvider where the event is from (type: str )

def register_component(self, component):
overrides elisa.core.manager.Manager.register_component
Register a new InputProvider in the InputManager so that the events collected by the former are propagated by the latter.

Parameters | component | the InputProvider instance to register (type: `elisa.core.components.input_provider.InputProvider` )

def unregister_component(self, component):
overrides elisa.core.manager.Manager.unregister_component
Clean the InputProvider and unregister it from the InputManager; no events from the InputProvider will be propagated anymore.

Parameters | component | the InputProvider instance to unregister (type: `elisa.core.components.input_provider.InputProvider` )