Package AccessEngine :: Package AEEvent :: Module InputGesture :: Class InputGesture
[hide private]
[frames] | no frames]

Class InputGesture

source code

  object --+    
           |    
Base.AEEvent --+
               |
              InputGesture

Event that fires when some AEInput.Gesture is detected on an AEInput device. Always defaults to the focused layer.

This class registers its name and whether it should be monitored by default in an AEMonitor using the Base.registerEventType function when this module is first imported. The AEMonitor can use this information to build its menus.

Instance Methods [hide private]
 
__init__(self, gesture, timestamp, **kwargs)
Calls the base class (which sets the event priority) and then stores the AEInput.GestureList that will be used to trigger a task.
source code
string
__str__(self)
Returns a human readable representation of this event including its name, its gesture codes, and its device.
source code
boolean
execute(self)
Contacts the AETierManager and asks it to manage this event as a gesture.
source code
AEInput.GestureList
getTaskKey(self)
Gets the AEInput.GestureList that triggered this event.
source code
float
getTimestamp(self)
Gets the timestamp for when the event occurred.
source code
dictionary
getDataForTask(self)
Fetches data out of this InputGesture for use by a Input Task.
source code

Inherited from Base.AEEvent: getAppID, getLayer, getPOR, getPriority, setLayer, setPriority

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Instance Variables [hide private]
AEInput.Gesture gesture
Gesture detected
dictionary kwargs
Additional arguments to be passed to a Input-Task
float timestamp
Time at which the gesture was received on the device

Inherited from Base.AEEvent: layer, por, priority

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, gesture, timestamp, **kwargs)
(Constructor)

source code 
Calls the base class (which sets the event priority) and then stores the AEInput.GestureList that will be used to trigger a task.
Parameters:
  • gesture (AEInput.Gesture) - Gestures detected on an AEInput device
  • timestamp (float) - Time at which the gesture was received on the device
  • kwargs (dictionary) - Additional arguments to be passed to a Input-Task
Overrides: Base.AEEvent.__init__

__str__(self)
(Informal representation operator)

source code 
Returns a human readable representation of this event including its name, its gesture codes, and its device.
Returns: string
Information about this event
Overrides: Base.AEEvent.__str__

execute(self)

source code 
Contacts the AETierManager and asks it to manage this event as a gesture.
Returns: boolean
True to indicate the event executed properly
Overrides: Base.AEEvent.execute

getTaskKey(self)

source code 
Gets the AEInput.GestureList that triggered this event. This information is used to locate the task that should handle this event.
Returns: AEInput.GestureList
Gesture seen on an AEInput device

getTimestamp(self)

source code 
Gets the timestamp for when the event occurred. This timestamp is useful for connecting input events to changes on the desktop. For instance, the timestamp for keyboard input is needed when key presses open a new dialog on some platforms such that the window manager can activate the dialog once it appears.
Returns: float
Gesture timestamp
Overrides: Base.AEEvent.getTimestamp

getDataForTask(self)

source code 
Fetches data out of this InputGesture for use by a Input Task.
Returns: dictionary
Dictionary of parameters to be passed to a Input-Task as follows:
  • timestamp: The time when the input gesture occurred. The scale and absolute zero is device dependent.
  • any additional data in the kwargs instance variable
Overrides: Base.AEEvent.getDataForTask