Module AccessEngine :: Class AccessEngine
[hide private]
[frames] | no frames]

Class AccessEngine

source code

object --+
         |
        AccessEngine

Runs the main bonobo loop so that AT-SPI events are received and GUI monitors function properly. Allows clients to register for callbacks from the main loop on a set interval. Maintains a dictionary of managers that can be loaned out to Task.Tools objects

Instance Methods [hide private]
 
__init__(self, profile, welcome)
Creates the ViewManager, TierManager, and EventManager objects.
source code
 
_init(self, **managers)
Calls init on each manager providing it with references to the other managers in case it wants to hold one or more references.
source code
 
_close(self)
Shutsdown all managers.
source code
 
quit(self, *args)
Quits the gtk main loop.
source code
 
loanManagers(self, obj)
Updates the namespace dictionary of the given object with the names and values of the managers stored in manager_dict.
source code
 
unloanManagers(self, obj)
Updates the namespace dictionary of the given object with the names and None values of stored in none_dict.
source code
 
addTimer(self, callback, ms=None, *args)
Creates a timer that calls the given callback on the interval specified by the given milliseconds.
source code
 
removeTimer(self, callback)
Ceases calls to the given registered callback.
source code
 
run(self)
Runs an event loop by creating a gobject.MainLoop object and calling the iteration method of its gobject.MainContext.
source code
string
getProfile(self)
Gets the name of the profile this AccessEngine instance is running under.
source code

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

Instance Variables [hide private]
dictionary callbacks
Callback IDs for functions to invoke on timers or idle using gobject
DeviceManager dm
Reference to the DeviceManager
EventManager em
Reference to the EventManager
dictionary manager_dict
Dictionary of managers keyed by manager names (device_man, event_man, tier_man, and view_man)
dictionary none_dict
Dictionary of None values with the same keys as manager_dict
string profile
Name of the profile this instance of AccessEngine was started under
SettingsManager sm
Reference to the SettingsManager
TierManager tm
Reference to the TierManager
ViewManager vm
Reference to the ViewManager
boolean welcome
Output an introductory message when the engine starts?
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, profile, welcome)
(Constructor)

source code 

Creates the ViewManager, TierManager, and EventManager objects. Calls the init method here to intialize the managers with references to other managers.

Parameters:
  • profile (string) - Name of the profile LSR was executed under
  • welcome (boolean) - Output an introductory message?
Overrides: object.__init__

_init(self, **managers)

source code 

Calls init on each manager providing it with references to the other managers in case it wants to hold one or more references. Called implicitly by run.

Parameters:

_close(self)

source code 

Shutsdown all managers. Called implicitly by run when the main loop ends. Sends an exiting message to the default device.

quit(self, *args)

source code 

Quits the gtk main loop. Extra parameters are ignored but captured by args so that this method may be reigstered as a signal handler callback.

loanManagers(self, obj)

source code 

Updates the namespace dictionary of the given object with the names and values of the managers stored in manager_dict. These references can be wiped out by a later call to unloanManagers.

Parameters:
  • obj (object) - An object with a __dict__ attribute

unloanManagers(self, obj)

source code 

Updates the namespace dictionary of the given object with the names and None values of stored in none_dict. This effectively wipes out references to managers previously loaned out by loanManagers.

Parameters:
  • obj (object) - An object with a __dict__ attribute

addTimer(self, callback, ms=None, *args)

source code 

Creates a timer that calls the given callback on the interval specified by the given milliseconds. If ms is None, registers for callbacks on idle.

Parameters:
  • callback (callable) - Function to call
  • args (list) - Additional arguments to be given to the callback

removeTimer(self, callback)

source code 

Ceases calls to the given registered callback.

Parameters:
  • callback (callable) - Function to stop calling
Raises:
  • KeyError - When the callback is not already registered

run(self)

source code 

Runs an event loop by creating a gobject.MainLoop object and calling the iteration method of its gobject.MainContext. Makes the timer callbacks registered via AccessEngine.addTimer on each iteration of the loop.

getProfile(self)

source code 

Gets the name of the profile this AccessEngine instance is running under.

Returns: string
Name of the profile