Package AccessEngine :: Module AETierManager' :: Class _AETierManager
[hide private]
[frames] | no frames]

Class _AETierManager

source code

object --+
         |
        _AETierManager

Creates AETiers for all processes detectable by pyatspi.

Routes AEEvents to the active AETier for handling by task functions registered by AEScripts. Changes the active AETier as the active top-level application changes.

Instance Methods [hide private]
 
__init__(self)
Creates the empty dictionary for storing AETiers and initializes the active tier to None.
source code
 
init(self, application_state)
Called by AEMain at startup.
source code
 
close(self)
Removes all monitors and persists the current AEState.
source code
AEState
getState(self)
Gets the shared state for all AETiers
source code
AEMonitor.MonitorCollection
getMonitors(self)
Gets all loaded AEMonitors
source code
 
addMonitors(self, *monitors)
Adds one or more AEMonitors to the list of monitors to be notified about events.
source code
 
showTask(self, task_name, script)
Informs AEMonitors added via addMonitors of a script task executing or updating.
source code
 
showEvent(self, event, tier_name)
Informs AEMonitors added via addMonitors of an event.
source code
 
showChain(self, chain_type, anchor_ident)
Informs AEMonitors added via addMonitors of a chained script task executing.
source code
 
showPropagate(self, propagate)
Informs AEMonitors added via addMonitors of the propagation return value from a script task.
source code
 
freeDeadAETiers(self, aids)
Compares the list of given application names and IDs with those currently associated with AETiers.
source code
AETier
createAETier(self, name, aid, por, init)
Creates a new AETier using the application name and ID as a hash code.
source code
 
removeAETier(self, aid)
Removes an existing AETier.
source code
 
switchAETier(self, name, aid, por)
Switches the active AETier based on the current view's root accessible.
source code
 
setEventInterest(self, kind, wants)
Informs the AEViewManager of a change in interest in AEEvents by some AETier.
source code
 
_resetGesture(self)
Resets the gesture sequence counter.
source code
 
manageEvent(self, event)
Dispatches an AEEvent to the AETier to be handled by its AEScripts.
source code
 
manageGesture(self, event)
Dispatches an AEEvent to the active AETier so that it can determine which registered script task, if any, should be executed in response to some AEInput.Gesture.
source code
 
manageChooser(self, event)
Dispatches an AEEvent.ChooserChange to the AETier associated with the event so that it can determine which registered script task, if any, should be executed in response to a change in the chooser such as its completion or its cancellation.
source code
 
manageTimer(self, event)
Dispatches an AEEvent.TimerAlert to the AETier associated with the event so that it can determine which registered task, if any, should be executed in response to the timer firing.
source code
 
managePrivate(self, event)
Dispatches an AEEvent.PrivateChange to the active AETier so it can store important information without passing it along to AEScripts and tasks.
source code
dictionary
getAETiers(self)
Gets all AETiers created for running applications.
source code

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

Instance Variables [hide private]
AETier active_tier
AETier for the application currently in focus
list with two entrys gesture
counts how often in a row the last key combination was pressed:
AEMonitor.MonitorCollection monitors
Collection of all loaded AEMonitors
AEState state
Global state informaion.
dictionary tiers
All AETiers created for running applications:
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Creates the empty dictionary for storing AETiers and initializes the active tier to None.
Overrides: object.__init__

init(self, application_state)

source code 
Called by AEMain at startup.
Parameters:
  • application_state (AEState) - defines the settings for this application

close(self)

source code 

Removes all monitors and persists the current AEState.

Informs all existing AETiers that their state should be persisted also.

getState(self)

source code 
Gets the shared state for all AETiers
Returns: AEState
State shared across all AETiers

getMonitors(self)

source code 
Gets all loaded AEMonitors
Returns: AEMonitor.MonitorCollection
Collection of all loaded AEMonitors

addMonitors(self, *monitors)

source code 
Adds one or more AEMonitors to the list of monitors to be notified about events.
Parameters:
  • monitors (tuple of AEMonitors) - Monitors to notify

showTask(self, task_name, script)

source code 
Informs AEMonitors added via addMonitors of a script task executing or updating.
Parameters:
  • task_name (string) - registered name of the task handling the event
  • script (AEScript) - Script in which the task function is implemented

showEvent(self, event, tier_name)

source code 
Informs AEMonitors added via addMonitors of an event.
Parameters:
  • event (AEEvent) - An event object
  • tier_name (string) - Name of the AETier executing the event

showChain(self, chain_type, anchor_ident)

source code 
Informs AEMonitors added via addMonitors of a chained script task executing.
Parameters:
  • chain_type (integer) - One of the AEConstants CHAIN_* constants
  • anchor_ident (string) - Identifier of the anchor task

showPropagate(self, propagate)

source code 
Informs AEMonitors added via addMonitors of the propagation return value from a script task.
Parameters:
  • propagate (boolean) - Was the event consumed (False) or allowed to propagate (True)?

freeDeadAETiers(self, aids)

source code 

Compares the list of given application names and IDs with those currently associated with AETiers.

Frees tiers in the tiers dictionary that no longer have associated applications.
Parameters:
  • aids (list) - List of identifiers for applications currently in existence

createAETier(self, name, aid, por, init)

source code 

Creates a new AETier using the application name and ID as a hash code.

If init is True, only creates the AETier if a specific AEScript is associated with this profile for the named application.
Parameters:
  • name (string) - Name of the now active application
  • aid (hashable) - Unique ID for the application associated with the AETier
  • por (AEPor) - Point of regard to the top object represented by the AETier
  • init (boolean) - Initialize the AETier only if a AEScript is associated for this particular application?
Returns: AETier
The new AETier that was created

removeAETier(self, aid)

source code 
Removes an existing AETier.
Parameters:
  • aid (hashable) - Unique ID for the application associated with the AETier

switchAETier(self, name, aid, por)

source code 

Switches the active AETier based on the current view's root accessible.

The view's root accessible is queried for information that can uniquely identify the AETier to use.

If an AETier already exists for the given view, it is activated. If one does not exist, an AETier is created using createAETier and made active.
Parameters:
  • name (string) - Name of the now active application
  • aid (hashable) - Unique ID for the application associated with the AETier
  • por (AEPor) - Point of regard to the top object represented by the AETier

setEventInterest(self, kind, wants)

source code 

Informs the AEViewManager of a change in interest in AEEvents by some AETier.

Used to optimize which system events are monitored in order to improve performance. Just acts as a proxy.
Parameters:
  • kind (AEEvent) - Kind of AEEvent of interest to a script task
  • wants (boolean) - Does a AEScript wants an event (i.e. a task is registering for it) or no longer wants an event (i.e. a task is unregistering for it)?

manageEvent(self, event)

source code 

Dispatches an AEEvent to the AETier to be handled by its AEScripts.

Makes the final determination of on what layer the event occurred. Events from a focused source are already marked as AEConstants.Event.LAYER_FOCUS. Events from an unfocused source in the active AETier are marked as AEConstants.Event.LAYER_TIER. All other events for which a AETier exists to handle them are marked as AEConstants.Event.LAYER_BACKGROUND.
Parameters:

manageGesture(self, event)

source code 
Dispatches an AEEvent to the active AETier so that it can determine which registered script task, if any, should be executed in response to some AEInput.Gesture.
Parameters:

manageChooser(self, event)

source code 
Dispatches an AEEvent.ChooserChange to the AETier associated with the event so that it can determine which registered script task, if any, should be executed in response to a change in the chooser such as its completion or its cancellation.
Parameters:

manageTimer(self, event)

source code 
Dispatches an AEEvent.TimerAlert to the AETier associated with the event so that it can determine which registered task, if any, should be executed in response to the timer firing.
Parameters:

managePrivate(self, event)

source code 
Dispatches an AEEvent.PrivateChange to the active AETier so it can store important information without passing it along to AEScripts and tasks.
Parameters:

getAETiers(self)

source code 
Gets all AETiers created for running applications.
Returns: dictionary
dictionary tiers with all created AETiers

Instance Variable Details [hide private]

gesture

counts how often in a row the last key combination was pressed:
   gesture[0]: pressed key, 
   gesture[1]: counts how often in a row the key was pressed
Type:
list with two entrys

state

Global state informaion.

Has properties representing system-wide settings.
Type:
AEState

tiers

All AETiers created for running applications:
   Dictionary: {
     key: unique application ID, 
     value: AETier
   }
Type:
dictionary