Package elisa :: Package core :: Module input_event :: Class InputEvent
[hide private]
[frames] | no frames]

Class InputEvent

source code

InputEvent base class

Each InputProvider component is able to build them and feed the InputManager with them. This class should allow us to abstract any kind of input event that can be injected in Elisa.

Instance Methods [hide private]
 
__init__(self, source_type, event_type, action=NONE, value=NONE, source_id='frontend', modifier=NONE, origin='frontend')
Create an InputEvent of a given type
source code
 
__str__(self) source code
 
__eq__(self, other) source code
 
__ne__(self, other) source code
Instance Variables [hide private]
  action
event's high level action (EXIT, PLAY, ...)
  modifier
event's modifier, especially useful for keyboards
  source
source device of the event (keyboard, mouse, ...)
  source_id
source device id, 0 by default
  type
type of event (KEY_UP, KEY_DOWN, ...)
  value
event's value (KEY_a, MOUSE_LEFT, ...)
Method Details [hide private]

__init__(self, source_type, event_type, action=NONE, value=NONE, source_id='frontend', modifier=NONE, origin='frontend')
(Constructor)

source code 
Create an InputEvent of a given type
Parameters:
Raises:
  • ValueError - raised when either source, event_type or value is None