#along with this program; if not, write to the Free Software
#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-import interfaces
+from interfaces import *
from base import BaseProxy, Enum
-from factory import add_accessible_class
+from accessible import Accessible
+from factory import accessible_factory
__all__ = [
"Selector",
The newly-available list of Command objects which may be invoked
by the listener.
"""
- func = self.get_dbus_method("notifyCommands")
+ func = self.get_dbus_method("notifyCommands", dbus_interface=ATSPI_COMMAND_LISTENER)
return func(*args, **kwargs)
#------------------------------------------------------------------------------
-class Selector(BaseProxy):
+class Selector(Accessible):
"""
This interface is intended for use by assistive technologies
and related user-agents. Via this interface, an assistive technology
and the reason for failure if the Command could not be activated
or invoked.
"""
- func = self.get_dbus_method("activateCommand")
+ func = self.get_dbus_method("activateCommand", dbus_interface=ATSPI_SELECTOR)
return func(*args, **kwargs)
def deregisterChangeListener(self, *args, **kwargs):
@param : listener
the CommandListener to remove from the notification list.
"""
- func = self.get_dbus_method("deregisterChangeListener")
+ func = self.get_dbus_method("deregisterChangeListener", dbus_interface=ATSPI_SELECTOR)
return func(*args, **kwargs)
def getCommands(self, *args, **kwargs):
Query the Selector for the current CommandList.
@return the currently available CommandList
"""
- func = self.get_dbus_method("getCommands")
+ func = self.get_dbus_method("getCommands", dbus_interface=ATSPI_SELECTOR)
return func(*args, **kwargs)
def refreshCommands(self, *args, **kwargs):
Ask the Selector to re-calculate its CommandList.
@return TRUE if the CommandList changed.
"""
- func = self.get_dbus_method("refreshCommands")
+ func = self.get_dbus_method("refreshCommands", dbus_interface=ATSPI_SELECTOR)
return func(*args, **kwargs)
def registerChangeListener(self, *args, **kwargs):
@param : listener
the CommandListener to be notified of changes.
"""
- func = self.get_dbus_method("registerChangeListener")
+ func = self.get_dbus_method("registerChangeListener", dbus_interface=ATSPI_SELECTOR)
return func(*args, **kwargs)
def replaceCommands(self, *args, **kwargs):
@return TRUE if the replacement request was successful, FALSE
if the request could not be honored.
"""
- func = self.get_dbus_method("replaceCommands")
+ func = self.get_dbus_method("replaceCommands", dbus_interface=ATSPI_SELECTOR)
return func(*args, **kwargs)
def get_supportsReplace(self):
COMMAND_RESULT_OBSOLETE = CommandResult(3)
COMMAND_RESULT_SUCCESS = CommandResult(1)
-# ATTENTION - Register the Application class with the accessible factory.
-add_accessible_class(interfaces.ATSPI_SELECTOR, Selector)
+# Register the accessible class with the factory.
+accessible_factory.register_accessible_class(ATSPI_SELECTOR, Selector)
#END----------------------------------------------------------------------------