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

Class AEEvent

source code

object --+
         |
        AEEvent

Most base class for all AccessEngine events. Supports the concept of a priority which may be used to prioritize event execution.

Instance Methods [hide private]
 
__init__(self, priority=AEConstants.EXEC_NORMAL, focused=False, **kwargs)
Stores the event priority and whether the event source was focused or not.
source code
string
__str__(self)
Returns the name of this event.
source code
boolean
execute(self)
Executes the logic that will handle this event.
source code
integer
getPriority(self)
Returns: Current priority value
source code
 
setPriority(self, priority) source code
 
setLayer(self, layer) source code
integer
getLayer(self)
Gets the layer for this event.
source code
dictionary
getDataForTask(self)
Fetches data out of an AEEvent for use by a task.
source code
float
getTimestamp(self)
Gets the timestamp for when the event occurred.
source code
AEPor
getPOR(self)
Returns: Point of regard associated with this event
source code
opaque object
getAppID(self)
Returns: Unique application ID identifying the top most container for the source of this event (i.e.
source code

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

Instance Variables [hide private]
integer layer
Layer of this event (focus, tier, background)
AEPor por
Point of regard associated with this event
integer priority
Priority of this event
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, priority=AEConstants.EXEC_NORMAL, focused=False, **kwargs)
(Constructor)

source code 
Stores the event priority and whether the event source was focused or not.
Parameters:
  • priority (integer) - Priority of this event, defaults to normal
  • focused (boolean) - Was the source of the event focused at the time of event creation?
Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 
Returns the name of this event.
Returns: string
Class name of this AEEvent
Overrides: object.__str__

execute(self)

source code 

Executes the logic that will handle this event. The AEEventManager can provide whatever arguments are necessary for an AEEvent subclass to execute as keyword arguments. It is up to the subclass to unpack and use the arguments it needs by name.

See AccessEngine.AEEventManager._AEEventManager._executeEvent for the arguments provided.
Returns: boolean
Was this class able to execute successfully? Always True here.

getPriority(self)

source code 
Returns: integer
Current priority value

setPriority(self, priority)

source code 
Parameters:
  • priority (integer) - New priority value

setLayer(self, layer)

source code 
Parameters:
  • layer (integer) - Layer of this event (focus, tier, background)

getLayer(self)

source code 
Gets the layer for this event. If the AEPor is marked as imcomplete, builds a complete AEPor and then determines if the proper AEPor is in a different layer than the one originally computed.
Returns: integer
Gets the layer for this event

getDataForTask(self)

source code 
Fetches data out of an AEEvent for use by a task. This method must be implemented by any AEEvent that will be handled by AETierManager.manageEvent or AETierManager.manageGesture.
Returns: dictionary
Empty dictionary

getTimestamp(self)

source code 
Gets the timestamp for when the event occurred.
Returns: float
Always zero when not overridden

getPOR(self)

source code 
Returns: AEPor
Point of regard associated with this event

getAppID(self)

source code 
Returns: opaque object
Unique application ID identifying the top most container for the source of this event (i.e. the application)