Package AccessEngine :: Module AEViewManager' :: Class _AEViewManager
[hide private]
[frames] | no frames]

Class _AEViewManager

source code

object --+
         |
        _AEViewManager

Stores a root accessible representing the active view when an event occurs indicating that the view may have changed.

Two view roots must be tracked by this object. The first, the raw view, is needed by AEAccAdapters which will handle raw view change events. The second, the AccessEngine view, is needed by the rest of the system when processing AEEvents.

Instance Methods [hide private]
 
__init__(self)
Initializes active view to None.
source code
 
init(self)
Registers with the AEEventManager to receive raw events related to the active view.
source code
 
close(self)
Does nothing and is called by AEMain when quitting the main loop.
source code
 
initViews(self)
Walks through the top level applications on the first desktop.
source code
 
setEventInterest(self, kind, wants)
Sets or unsets an interest in a particular kind of AEEvent.
source code
boolean
getRawActive(self)
Gets whether some view is active or not.
source code
 
setRawActive(self, val)
Sets whether some view is active or not.
source code
AEPor
getRawView(self)
Gets the root AEPor of the active view according to the raw event stream.
source code
boolean
setRawView(self, accessible)
Stores the root AEPor of the active view according to the raw event stream.
source code
AEPor
getAEView(self)
Gets the root AEPor of the active view according to the AEEvent stream.
source code
 
setAEView(self, por)
Stores the root AEPor of the active view according to the AEEvent stream.
source code
boolean
onIterateApps(self)
Collects all application names and IDs and gives them to the AETierManager so it can free any AETiers that are no longer associated with running applications.
source code
 
onRawEvent(self, event)
Based on a raw pyatspi.event.Event posts AEEvents to the active AETier through the AEEventManager.
source code
 
onRawViewEvent(self, event)
Creates a AEEvent.ViewChange event in response to a window activation or deactivation.
source code

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

Instance Variables [hide private]
AEPor ae_view
Root AEPor representing the active view according to the AEEvent stream.
boolean raw_active
Is there an raw active view?
pyatspi.Accessible raw_view
Root accessible representing the active view according to the raw event stream.
dictionary wanted_events
Lookup table for what AEEvents are desired by any task in any AEScript in all AETiers.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Initializes active view to None.
Overrides: object.__init__

init(self)

source code 

Registers with the AEEventManager to receive raw events related to the active view.

Also registers for raw events that may indicate that this AEViewManager needs to manage a new view.

Called by AEMain at startup.

initViews(self)

source code 

Walks through the top level applications on the first desktop.

Calls the method AETierManager.createAETier for application encountered. If the AETierManager determines that an app has at least one AEScript written for that application, creates an AETier for the application and loads all of its AEScripts.

If the AETier is created, this method sends AEEvent.ViewChange messages to the AETier with a flag of AEConstants.Event.EVENT_VIEW_STARTUP such that AEScripts in the AETier may initialize themselves and begin any desired background processes.

setEventInterest(self, kind, wants)

source code 

Sets or unsets an interest in a particular kind of AEEvent.

This information is used to register or unregister for raw events on-demand as an optimization.
Parameters:
  • kind (AEEvent) - Indicates the type of AEEvent some part of the system wants to be able to process
  • wants (boolean) - Does the system want to process the given kind of AEEvent?

getRawActive(self)

source code 
Gets whether some view is active or not.
Returns: boolean
Value of raw_active

setRawActive(self, val)

source code 
Sets whether some view is active or not.
Parameters:

getRawView(self)

source code 

Gets the root AEPor of the active view according to the raw event stream.

This is the view known to AEAccAdapters.
Returns: AEPor
Root AEPor of the raw active view

See Also: setRawView

setRawView(self, accessible)

source code 

Stores the root AEPor of the active view according to the raw event stream.

This is the view known to AEAccAdapters.
Parameters:
  • accessible (pyatspi.Accessible) - Event source that triggered the change of view. Usually a top level window or panel.
Returns: boolean
Was a new view root set or not?

See Also: getRawView

getAEView(self)

source code 

Gets the root AEPor of the active view according to the AEEvent stream.

This is the view known to AEScripts.
Returns: AEPor
Root AEPor of the active AEMain view

See Also: setAEView

setAEView(self, por)

source code 

Stores the root AEPor of the active view according to the AEEvent stream.

This is the view known to AEAccAdapters.
Parameters:
  • por (AEPor) - New root AEPor of the active AEMain view. May be set to None if there is no active view.

See Also: getAEView

onIterateApps(self)

source code 
Collects all application names and IDs and gives them to the AETierManager so it can free any AETiers that are no longer associated with running applications.
Returns: boolean
True to continue receiving notifications

onRawEvent(self, event)

source code 
Based on a raw pyatspi.event.Event posts AEEvents to the active AETier through the AEEventManager.
Parameters:
  • event (pyatspi.event.Event) - Event indicating some change

onRawViewEvent(self, event)

source code 

Creates a AEEvent.ViewChange event in response to a window activation or deactivation.

Also responds to create or destroy events from floating windows. Called in response to any of the raw events returned by AEAccInterfaces.IEventHandler.getAEViewEvents and registered with the AEEventManager in the AEViewManager.init method when this object was created.
Parameters:
  • event (pyatspi.event.Event) - Event that may indicate the view has changed

Instance Variable Details [hide private]

wanted_events

Lookup table for what AEEvents are desired by any task in any AEScript in all AETiers.

Used to optimize event dispatch and processing. Unwanted events are ignored.
Type:
dictionary