2009-07-10 Mark Doffman <mark.doffman@codethink.co.uk>
authorMark Doffman <mdoff@altair-voyager.(none)>
Wed, 7 Oct 2009 08:40:11 +0000 (09:40 +0100)
committerMark Doffman <mdoff@altair-voyager.(none)>
Wed, 7 Oct 2009 08:40:11 +0000 (09:40 +0100)
        Remove pyatspi and the pyatspi tests that have been moved
        out into a separate repository.

100 files changed:
Makefile.am
configure.ac
pyatspi/Accessibility.py [deleted file]
pyatspi/Makefile.am [deleted file]
pyatspi/__init__.py [deleted file]
pyatspi/accessible.py [deleted file]
pyatspi/accessiblecache.py [deleted file]
pyatspi/action.py [deleted file]
pyatspi/application.py [deleted file]
pyatspi/applicationcache.py [deleted file]
pyatspi/base.py [deleted file]
pyatspi/collection.py [deleted file]
pyatspi/component.py [deleted file]
pyatspi/constants.py [deleted file]
pyatspi/desktop.py [deleted file]
pyatspi/deviceevent.py [deleted file]
pyatspi/document.py [deleted file]
pyatspi/editabletext.py [deleted file]
pyatspi/event.py [deleted file]
pyatspi/factory.py [deleted file]
pyatspi/hyperlink.py [deleted file]
pyatspi/hypertext.py [deleted file]
pyatspi/image.py [deleted file]
pyatspi/interfaces.py [deleted file]
pyatspi/loginhelper.py [deleted file]
pyatspi/registry.py [deleted file]
pyatspi/relation.py [deleted file]
pyatspi/role.py [deleted file]
pyatspi/selection.py [deleted file]
pyatspi/state.py [deleted file]
pyatspi/table.py [deleted file]
pyatspi/text.py [deleted file]
pyatspi/utils.py [deleted file]
pyatspi/value.py [deleted file]
tests/Makefile.am [deleted file]
tests/apps/Makefile.am [deleted file]
tests/apps/accessible-app.c [deleted file]
tests/apps/action-app.c [deleted file]
tests/apps/atk-object-xml-loader.c [deleted file]
tests/apps/atk-object-xml-loader.h [deleted file]
tests/apps/component-app.c [deleted file]
tests/apps/noop-app.c [deleted file]
tests/apps/relation-app.c [deleted file]
tests/apps/test-application.c [deleted file]
tests/cspi/Makefile.am [deleted file]
tests/cspi/accessible-test.c [deleted file]
tests/cspi/classy-test-suite.c [deleted file]
tests/cspi/classy-test-suite.h [deleted file]
tests/cspi/classy-test.c [deleted file]
tests/cspi/classy-test.h [deleted file]
tests/cspi/key-listener-test.c [deleted file]
tests/cspi/keysynth-test.c [deleted file]
tests/cspi/simple-at.c [deleted file]
tests/cspi/simple-test.c [deleted file]
tests/cspi/test-simple.c [deleted file]
tests/data/Makefile.am [deleted file]
tests/data/accessible-test-results.xml [deleted file]
tests/data/accessible-test.xml [deleted file]
tests/dummyatk/Makefile.am [deleted file]
tests/dummyatk/my-atk-action.c [deleted file]
tests/dummyatk/my-atk-action.h [deleted file]
tests/dummyatk/my-atk-component.c [deleted file]
tests/dummyatk/my-atk-component.h [deleted file]
tests/dummyatk/my-atk-hyperlink.c [deleted file]
tests/dummyatk/my-atk-hyperlink.h [deleted file]
tests/dummyatk/my-atk-hypertext.c [deleted file]
tests/dummyatk/my-atk-hypertext.h [deleted file]
tests/dummyatk/my-atk-object.c [deleted file]
tests/dummyatk/my-atk-object.h [deleted file]
tests/dummyatk/my-atk-selection.c [deleted file]
tests/dummyatk/my-atk-selection.h [deleted file]
tests/dummyatk/my-atk-streamable-content.c [deleted file]
tests/dummyatk/my-atk-streamable-content.h [deleted file]
tests/dummyatk/my-atk-table.c [deleted file]
tests/dummyatk/my-atk-table.h [deleted file]
tests/dummyatk/my-atk-text.c [deleted file]
tests/dummyatk/my-atk-text.h [deleted file]
tests/dummyatk/my-atk-value.c [deleted file]
tests/dummyatk/my-atk-value.h [deleted file]
tests/dummyatk/my-atk.h [deleted file]
tests/dummyatk/resources_storage.c [deleted file]
tests/dummyatk/resources_storage.h [deleted file]
tests/dummyatk/useful_functions.c [deleted file]
tests/dummyatk/useful_functions.h [deleted file]
tests/dummyatk/user_marshal.c [deleted file]
tests/dummyatk/user_marshal.h [deleted file]
tests/pyatspi/Makefile.am [deleted file]
tests/pyatspi/accessibletest.py [deleted file]
tests/pyatspi/actiontest.py [deleted file]
tests/pyatspi/componenttest.py [deleted file]
tests/pyatspi/desktoptest.py [deleted file]
tests/pyatspi/pasytest/Events.py [deleted file]
tests/pyatspi/pasytest/Makefile.am [deleted file]
tests/pyatspi/pasytest/Pasy.py [deleted file]
tests/pyatspi/pasytest/__init__.py [deleted file]
tests/pyatspi/relationtest.py [deleted file]
tests/pyatspi/runtests.sh [deleted file]
tests/pyatspi/setvars.sh [deleted file]
tests/pyatspi/statetest.py [deleted file]
tests/pyatspi/testrunner [deleted file]

index 99b87a8..131502a 100644 (file)
@@ -1 +1 @@
-SUBDIRS=common atk-adaptor cspi pyatspi tests
+SUBDIRS=common atk-adaptor cspi
index 4656a11..7a193c0 100644 (file)
@@ -24,7 +24,6 @@ AC_SUBST(LT_AGE)
 AM_INIT_AUTOMAKE([-Wall foreign])
 
 AC_PROG_CC
-AM_PATH_PYTHON(2.4)
 AM_DISABLE_STATIC
 AM_PROG_LIBTOOL
 PKG_PROG_PKG_CONFIG
@@ -96,14 +95,7 @@ AC_CONFIG_FILES([Makefile
                 tests/Makefile
                 common/Makefile
                 atk-adaptor/Makefile
-                tests/dummyatk/Makefile
-                tests/data/Makefile
-                tests/pyatspi/Makefile
-                tests/pyatspi/pasytest/Makefile
-                tests/apps/Makefile
-                tests/cspi/Makefile
                 cspi/Makefile
-                pyatspi/Makefile
                ])
 
 AC_OUTPUT
diff --git a/pyatspi/Accessibility.py b/pyatspi/Accessibility.py
deleted file mode 100644 (file)
index cf4df5b..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from constants import *
-
-from registry import*
-from accessible import *
-from action import *
-from application import *
-from collection import *
-from component import *
-from constants import *
-from desktop import *
-from deviceevent import *
-from document import *
-from editabletext import *
-from event import *
-from hyperlink import *
-from hypertext import *
-from image import *
-from interfaces import *
-from loginhelper import *
-from relation import *
-from role import *
-from selection import *
-from state import *
-from table import *
-from text import *
-from utils import *
-from value import *
diff --git a/pyatspi/Makefile.am b/pyatspi/Makefile.am
deleted file mode 100644 (file)
index cd4e6f8..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-pyatspidir = $(pythondir)/pyatspi
-pyatspi_PYTHON = \
-               Accessibility.py        \
-               accessible.py           \
-               accessiblecache.py      \
-               action.py               \
-               application.py          \
-               applicationcache.py     \
-               base.py                 \
-               collection.py           \
-               component.py            \
-               constants.py            \
-               desktop.py              \
-               deviceevent.py          \
-               document.py             \
-               editabletext.py         \
-               event.py                \
-               factory.py              \
-               hyperlink.py            \
-               hypertext.py            \
-               image.py                \
-               __init__.py             \
-               interfaces.py           \
-               loginhelper.py          \
-               registry.py             \
-               relation.py             \
-               role.py                 \
-               selection.py            \
-               state.py                \
-               table.py                \
-               text.py                 \
-               utils.py                \
-               value.py
-
-CLEANFILES = *.pyc
diff --git a/pyatspi/__init__.py b/pyatspi/__init__.py
deleted file mode 100644 (file)
index 3ad8476..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-__version__ = (1, 9, 0)
-
-import registry
-Registry = registry._Registry()
-registry._Registry = Registry
-del registry
-
-import constants
-from Accessibility import *
-
-#This is a re-creation of the namespace pollution implemented
-#by PyORBit.
-import sys
-import Accessibility
-sys.modules['Accessibility'] = Accessibility
-del sys
diff --git a/pyatspi/accessible.py b/pyatspi/accessible.py
deleted file mode 100644 (file)
index 8bbe9b2..0000000
+++ /dev/null
@@ -1,283 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from interfaces import ATSPI_ACCESSIBLE, ATSPI_APPLICATION
-from base import BaseProxy, Enum
-from factory import accessible_factory
-from state import StateSet, _marshal_state_set
-from relation import _marshal_relation_set
-from role import Role, ROLE_NAMES
-
-__all__ = [
-           "LOCALE_TYPE",
-           "LOCALE_TYPE_COLLATE",
-           "LOCALE_TYPE_CTYPE",
-           "LOCALE_TYPE_MESSAGES",
-           "LOCALE_TYPE_MONETARY",
-           "LOCALE_TYPE_NUMERIC",
-           "LOCALE_TYPE_TIME",
-           "BoundingBox",
-           "Accessible",
-          ]
-
-#------------------------------------------------------------------------------
-
-class LOCALE_TYPE(Enum):
-    _enum_lookup = {
-        0:'LOCALE_TYPE_MESSAGES',
-        1:'LOCALE_TYPE_COLLATE',
-        2:'LOCALE_TYPE_CTYPE',
-        3:'LOCALE_TYPE_MONETARY',
-        4:'LOCALE_TYPE_NUMERIC',
-        5:'LOCALE_TYPE_TIME',
-    }
-
-LOCALE_TYPE_COLLATE = LOCALE_TYPE(1)
-LOCALE_TYPE_CTYPE = LOCALE_TYPE(2)
-LOCALE_TYPE_MESSAGES = LOCALE_TYPE(0)
-LOCALE_TYPE_MONETARY = LOCALE_TYPE(3)
-LOCALE_TYPE_NUMERIC = LOCALE_TYPE(4)
-LOCALE_TYPE_TIME = LOCALE_TYPE(5)
-
-#------------------------------------------------------------------------------
-
-class BoundingBox(list):
-    def __new__(cls, x, y, width, height):
-        return list.__new__(cls, (x, y, width, height))
-    def __init__(self, x, y, width, height):
-        list.__init__(self, (x, y, width, height))
-
-    def __str__(self):
-        return ("(%d, %d, %d, %d)" % (self.x, self.y, self.width, self.height))
-
-    def _get_x(self):
-        return self[0]
-    def _set_x(self, val):
-        self[0] = val
-    x = property(fget=_get_x, fset=_set_x)
-    def _get_y(self):
-        return self[1]
-    def _set_y(self, val):
-        self[1] = val
-    y = property(fget=_get_y, fset=_set_y)
-    def _get_width(self):
-        return self[2]
-    def _set_width(self, val):
-        self[2] = val
-    width = property(fget=_get_width, fset=_set_width)
-    def _get_height(self):
-        return self[3]
-    def _set_height(self, val):
-        self[3] = val
-    height = property(fget=_get_height, fset=_set_height)
-
-#------------------------------------------------------------------------------
-
-class Accessible(BaseProxy):
-    """
-    The base interface which is implemented by all accessible objects.
-    All objects support interfaces for querying their contained
-    'children' and position in the accessible-object hierarchy,
-    whether or not they actually have children.
-    """
-
-    _relation_set = None
-
-    def __nonzero__(self):
-            return True
-
-    def __len__(self):
-            return self.getChildCount()
-
-    def __getitem__(self, index):
-            return self.getChildAtIndex(index)
-
-    def getApplication(self):
-        """
-        Get the containing Application for this object.
-        @return the Application instance to which this object belongs.
-        """
-        return self._cache.create_application(self._app_name)
-
-    def getAttributes(self):
-        """
-        Get a list of properties applied to this object as a whole, as
-        an AttributeSet consisting of name-value pairs. As such these
-        attributes may be considered weakly-typed properties or annotations,
-        as distinct from the strongly-typed interface instance data declared
-        using the IDL "attribute" keyword.
-        Not all objects have explicit "name-value pair" AttributeSet
-        properties.
-        Attribute names and values may have any UTF-8 string value, however
-        where possible, in order to facilitate consistent use and exposure
-        of "attribute" properties by applications and AT clients, attribute
-        names and values should chosen from a publicly-specified namespace
-        where appropriate.
-        Where possible, the names and values in the name-value pairs
-        should be chosen from well-established attribute namespaces using
-        standard semantics. For example, attributes of Accessible objects
-        corresponding to XHTML content elements should correspond to
-        attribute names and values specified in the w3c XHTML specification,
-        at http://www.w3.org/TR/xhtml2, where such values are not already
-        exposed via a more strongly-typed aspect of the AT-SPI API. Metadata
-        names and values should be chosen from the 'Dublin Core' Metadata
-        namespace using Dublin Core semantics: http://dublincore.org/dcregistry/
-        Similarly, relevant structural metadata should be exposed using
-        attribute names and values chosen from the CSS2 and WICD specification:
-        http://www.w3.org/TR/1998/REC-CSS2-19980512 WICD (http://www.w3.org/TR/2005/WD-WICD-20051121/).
-
-        @return : An AttributeSet encapsulating any "attribute values"
-        currently defined for the object. An attribute set is a list of strings
-        with each string comprising an name-value pair format 'name:value'.
-        """
-        func = self.get_dbus_method("getAttributes", dbus_interface=ATSPI_ACCESSIBLE)
-        return [key + ':' + value for key, value in func().iteritems()]
-
-    def getChildAtIndex(self, index):
-        """
-        Get the accessible child of this object at index. 
-        @param : index
-        an in parameter indicating which child is requested (zero-indexed).
-        @return : the 'nth' Accessible child of this object.
-        """
-        path = self.cached_data.children[index]
-        return self._cache.create_accessible(self._app_name, path, ATSPI_ACCESSIBLE)
-
-    def getIndexInParent(self):
-        """
-        Get the index of this object in its parent's child list.
-        @return : a long integer indicating this object's index in the
-        parent's list.
-        """
-        if self.parent == None:
-                return -1
-        for i in range(0, self.parent.childCount):
-                child = self.parent.getChildAtIndex(i)
-                if self.isEqual(child):
-                        return i
-        raise AccessibleObjectNoLongerExists("Child not found within parent")
-
-    def getLocalizedRoleName(self):
-        """
-        Get a string indicating the type of UI role played by this object,
-        translated to the current locale.
-        @return : a UTF-8 string indicating the type of UI role played
-        by this object.
-        """
-        func = self.get_dbus_method("getLocalizedRoleName", dbus_interface=ATSPI_ACCESSIBLE)
-        return func()
-
-    def getRelationSet(self):
-        """
-        Get a set defining this object's relationship to other accessible
-        objects. 
-        @return : a RelationSet defining this object's relationships.
-        """
-        if self._relation_set:
-                return self._relation_set
-        else:
-                func = self.get_dbus_method("getRelationSet", dbus_interface=ATSPI_ACCESSIBLE)
-                relation_set = func()
-                self._relation_set = _marshal_relation_set(self._cache, self._app_name, relation_set)
-                return self._relation_set
-
-    def getRole(self):
-        """
-        Get the Role indicating the type of UI role played by this object.
-        @return : a Role indicating the type of UI role played by this
-        object.
-        """
-        return Role(self.cached_data.role)
-
-    def getRoleName(self):
-        """
-        Get a string indicating the type of UI role played by this object.
-        @return : a UTF-8 string indicating the type of UI role played
-        by this object.
-        """
-        """
-        func = self.get_dbus_method("getRoleName", dbus_interface=ATSPI_ACCESSIBLE)
-        return func()
-        """
-        return ROLE_NAMES[self.cached_data.role]
-
-    def getState(self):
-        """
-        Get the current state of the object as a StateSet. 
-        @return : a StateSet encapsulating the currently true states
-        of the object.
-        """
-        return _marshal_state_set(self.cached_data.state)
-
-    def isEqual(self, accessible):
-        """
-        Determine whether an Accessible refers to the same object as
-        another. This method should be used rather than brute-force comparison
-        of object references (i.e. "by-value" comparison), as two object
-        references may have different apparent values yet refer to the
-        same object.
-        @param : obj
-        an Accessible object reference to compare to 
-        @return : a boolean indicating whether the two object references
-        point to the same object.
-        """
-        return  (self._app_name == accessible._app_name) and \
-                (self._acc_path == accessible._acc_path)
-
-
-    def get_childCount(self):
-        return len(self.cached_data.children)
-    _childCountDoc = \
-        """
-        childCount: the number of children contained by this object.
-        """
-    childCount = property(fget=get_childCount, doc=_childCountDoc)
-
-    getChildCount = get_childCount
-
-    def get_description(self):
-        return self.cached_data.description
-    _descriptionDoc = \
-        """
-        a string describing the object in more detail than name.
-        """
-    description = property(fget=get_description, doc=_descriptionDoc)
-
-    def get_name(self):
-        return self.cached_data.name
-    _nameDoc = \
-        """
-        a (short) string representing the object's name.
-        """
-    name = property(fget=get_name, doc=_nameDoc)
-
-    def get_parent(self):
-        return self._cache.create_accessible(self._app_name,
-                                             self.cached_data.parent,
-                                             ATSPI_ACCESSIBLE)
-
-    _parentDoc = \
-        """
-        an Accessible object which is this object's containing object.
-        """
-    parent = property(fget=get_parent, doc=_parentDoc)
-
-    def refresh(self):
-            self._relation_set = None
-            self._cache.application_cache[self._app_name]._refresh()
-
-# Register the accessible class with the factory.
-accessible_factory.register_accessible_class(ATSPI_ACCESSIBLE, Accessible)
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/accessiblecache.py b/pyatspi/accessiblecache.py
deleted file mode 100644 (file)
index b190793..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import dbus as _dbus
-
-from event import Event as _Event
-
-#------------------------------------------------------------------------------
-
-class _CacheData(object):
-        __slots__ = [
-                        'path',
-                        'parent',
-                        'interfaces',
-                        'children',
-                        'role',
-                        'name',
-                        'description',
-                        'state',
-                    ]
-
-        def __init__(self, data):
-                self._update(data)
-
-        def _update(self, data):
-                (self.path,
-                 self.parent,
-                 self.children,
-                 self.interfaces,
-                 self.name,
-                 self.role,
-                 self.description,
-                 self.state) = data
-
-#------------------------------------------------------------------------------
-
-def _list_items_added_removed (l1, l2):
-        """
-        Returns a tuple (boolean, boolean).
-        The first value indicates if, when
-        moving from l1 to l2, any items have been added.
-        The second value indicates whether any items have
-        been removed.
-        """
-        l1notl2 = [item for item in l1 if item not in l2]
-        l2notl1 = [item for item in l2 if item not in l1]
-        return ((len(l1notl2) > 0), (len(l2notl1) > 0))
-
-#------------------------------------------------------------------------------
-
-class AccessibleCache(object):
-        """
-        There is one accessible cache per application.
-        For each application the accessible cache stores
-        data on every accessible object within the app.
-
-        It also acts as the factory for creating client
-        side proxies for these accessible objects.
-
-        connection - DBus connection.
-        busName    - Name of DBus connection where cache interface resides.
-        """
-
-        _PATH = '/org/freedesktop/atspi/tree'
-        _INTERFACE = 'org.freedesktop.atspi.Tree'
-        _GET_METHOD = 'getTree'
-        _UPDATE_SIGNAL = 'updateAccessible'
-        _REMOVE_SIGNAL = 'removeAccessible'
-
-        def __init__(self, registry, connection, bus_name):
-                """
-                Creates a cache.
-
-                connection - DBus connection.
-                busName    - Name of DBus connection where cache interface resides.
-                """
-                self._registry = registry
-                self._connection = connection
-                self._bus_name = bus_name
-
-                obj = connection.get_object(bus_name, self._PATH, introspect=False)
-                self._tree_itf = _dbus.Interface(obj, self._INTERFACE)
-
-                self._objects = {}
-
-                get_method = self._tree_itf.get_dbus_method(self._GET_METHOD)
-                self._update_objects(get_method())
-
-                self._updateMatch = self._tree_itf.connect_to_signal(self._UPDATE_SIGNAL, self._update_single)
-                self._removeMatch = self._tree_itf.connect_to_signal(self._REMOVE_SIGNAL, self._remove_object)
-
-                self._root = self._tree_itf.getRoot()
-
-        def __getitem__(self, key):
-                return self._objects[key]
-
-        def __contains__(self, key):
-                return key in self._objects
-
-        def _dispatch_event(self, olddata, newdata):
-                if olddata.name != newdata.name:
-                        event = _Event(self._registry.cache,
-                                       newdata.path,
-                                       self._bus_name,
-                                       "org.freedesktop.atspi.Event.Object",
-                                       "property-change",
-                                       ("accessible-name", 0, 0, newdata.name))
-                        self._registry._notifyNameChange(event)
-
-                if olddata.description != newdata.description:
-                        event = _Event(self._registry.cache,
-                                       newdata.path,
-                                       self._bus_name,
-                                       "org.freedesktop.atspi.Event.Object",
-                                       "property-change",
-                                       ("accessible-description", 0, 0, newdata.description))
-                        self._registry._notifyDescriptionChange(event)
-
-                if olddata.parent != newdata.parent:
-                        event = _Event(self._registry.cache,
-                                       newdata.path,
-                                       self._bus_name,
-                                       "org.freedesktop.atspi.Event.Object",
-                                       "property-change",
-                                       ("accessible-parent", 0, 0, ""))
-                        self._registry._notifyParentChange(event)
-
-                removed, added = _list_items_added_removed (olddata.children, newdata.children)
-
-                if added:
-                        event = _Event(self._registry.cache,
-                                       newdata.path,
-                                       self._bus_name,
-                                       "org.freedesktop.atspi.Event.Object",
-                                       "children-changed",
-                                       ("add", 0, 0, ""))
-                        self._registry._notifyChildrenChange(event)
-
-                if removed:
-                        event = _Event(self._registry.cache,
-                                       newdata.path,
-                                       self._bus_name,
-                                       "org.freedesktop.atspi.Event.Object",
-                                       "children-changed",
-                                       ("remove", 0, 0, ""))
-                        self._registry._notifyChildrenChange(event)
-
-        # TODO This should be the other way around. Single is more common than many.
-        def _update_single(self, object):
-                self._update_objects ([object])
-
-        def _update_objects(self, objects):
-                cache_update_objects = []
-                for data in objects:
-                        #First element is the object path.
-                        path = data[0]
-                        if path in self._objects:
-                                olddata = self._objects[path]
-                                newdata = _CacheData(data)
-                                cache_update_objects.append((olddata, newdata))
-                                self._objects[path] = newdata
-                        else:
-                                self._objects[path] = _CacheData(data)
-                for old, new in cache_update_objects:
-                        self._dispatch_event(old, new)
-
-        def _remove_object(self, path):
-                # TODO I'm squashing a possible error here
-                # I've seen things appear to be deleted twice
-                # which needs investigation
-                try:
-                        del(self._objects[path])
-                except KeyError:
-                        pass
-
-        def _get_root(self):
-                return self._root
-
-        def _refresh(self):
-                get_method = self._tree_itf.get_dbus_method(self._GET_METHOD)
-                self._update_objects(get_method())
-
-        root = property(fget=_get_root)
-
-#END---------------------------------------------------------------------------
diff --git a/pyatspi/action.py b/pyatspi/action.py
deleted file mode 100644 (file)
index 5ac2262..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from interfaces import *
-from accessible import Accessible
-from factory import accessible_factory
-
-import dbus
-
-__all__ = [
-           "Action",
-          ]
-
-#------------------------------------------------------------------------------
-
-class Action(Accessible):
-        """
-        An interface through which a user-actionable user interface component
-        can be manipulated. Components which react to mouse or keyboard
-        input from the user, (with the exception of pure text entry fields
-        with no other function), should implement this interface. Typical
-        actions include "click", "press", "release" (for instance for
-        buttons), "menu" (for objects which have context menus invokable
-        from mouse or keyboard), "open" for icons representing files
-        folders, and others.
-        """
-
-        def getActions(self):
-                """
-                getActions:
-                Retrieves all the actions at once.  
-                @return : an array of an array of strings in the form
-                [[name, description, keybinding], ...]
-                """
-                func = self.get_dbus_method("getActions", dbus_interface=ATSPI_ACTION)
-                return func()
-
-        def doAction(self, index):
-                """
-                doAction: 
-                @param : index
-                the 0-based index of the action to perform.
-                Causes the object to perform the specified action.
-                @return : a boolean indicating success or failure.
-                """
-                func = self.get_dbus_method("doAction", dbus_interface=ATSPI_ACTION)
-                return func(index)
-
-        def getDescription(self, index):
-                """
-                getDescription: 
-                @param : index
-                the index of the action for which a description is desired.
-                Get the description of the specified action. The description
-                of an action may provide information about the result of action
-                invocation, unlike the action name. 
-                @return : a string containing the description of the specified
-                action.
-                """
-                func = self.get_dbus_method("getDescription", dbus_interface=ATSPI_ACTION)
-                return func(index)
-
-        def getKeyBinding(self, index):
-                """
-                getKeyBinding: 
-                @param : index
-                the 0-based index of the action for which a key binding is requested.
-                Get the key binding associated with a specific action.
-                @return : a string containing the key binding for the specified
-                action, or an empty string ("") if none exists.
-                """
-                func = self.get_dbus_method("getKeyBinding", dbus_interface=ATSPI_ACTION)
-                return func(index)
-
-        def getName(self, index):
-                """
-                getName: 
-                @param : index
-                the index of the action whose name is requested.
-                Get the name of the specified action. Action names generally
-                describe the user action, i.e. "click" or "press", rather then
-                the result of invoking the action.
-                @return : a string containing the name of the specified action.
-                """
-                func = self.get_dbus_method("getName", dbus_interface=ATSPI_ACTION)
-                return func(index)
-
-        def get_nActions(self):
-                return dbus.Int32(self._pgetter(self._dbus_interface, "nActions"))
-        _nActionsDoc = \
-                """
-                nActions: a long containing the number of actions this object
-                supports.
-                """
-        nActions = property(fget=get_nActions, doc=_nActionsDoc)
-
-# Register the accessible class with the factory.
-accessible_factory.register_accessible_class(ATSPI_ACTION, Action)
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/application.py b/pyatspi/application.py
deleted file mode 100644 (file)
index ca126fe..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from interfaces import *
-from factory import accessible_factory
-from accessible import Accessible
-
-import dbus
-
-__all__ = [
-                  "Application",
-          ]
-
-#------------------------------------------------------------------------------
-
-class Application(Accessible):
-        """
-        An interface identifying an object which is the root of the user
-        interface Accessible hierarchy associated with a running application.
-        Children of Application are typically, but not exclusively, top-level
-        windows.
-        """
-
-        def getLocale(self, locale_type):
-                """
-                Gets the locale in which the application is currently operating.
-                For the current message locale, use lctype LOCALE_TYPE_MESSAGES.
-                @param : lctype
-                The LocaleType for which the locale is queried. 
-                @return a string compliant with the POSIX standard for locale
-                description.
-                """
-                func = self.get_dbus_method("getLocale", dbus_interface=ATSPI_APPLICATION)
-                return func(local_type)
-
-        def get_toolkitName(self):
-                return dbus.String(self._pgetter(self._dbus_interface, "toolkitName"))
-        _toolkitNameDoc = \
-                """
-                A string indicating the type of user interface toolkit which
-                is used by the application.
-                """
-        toolkitName = property(fget=get_toolkitName, doc=_toolkitNameDoc)
-
-        def get_version(self):
-                return dbus.String(self._pgetter(self._dbus_interface, "version"))
-        _versionDoc = \
-                """
-                A string indicating the version number of the application's accessibility
-                bridge implementation.
-                """
-        version = property(fget=get_version, doc=_versionDoc)
-
-# Register the accessible class with the factory.
-accessible_factory.register_accessible_class(ATSPI_APPLICATION, Application)
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/applicationcache.py b/pyatspi/applicationcache.py
deleted file mode 100644 (file)
index 68fa65a..0000000
+++ /dev/null
@@ -1,248 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import dbus
-
-from accessiblecache import AccessibleCache
-from desktop import Desktop, DESKTOP_PATH
-from factory import accessible_factory
-from event import Event as _Event
-from base import AccessibleObjectNotAvailable
-
-from interfaces import *
-
-__all__ = [
-           "ApplicationCache",
-           "TestApplicationCache",
-          ]
-
-#------------------------------------------------------------------------------
-
-ROOT_PATH    = '/org/freedesktop/atspi/accessible/root'
-
-#------------------------------------------------------------------------------
-
-class TestApplicationCache(object):
-
-        """
-        Test application store, accesses a single application.
-
-        The store object acts as a central class for creating accessible objects.
-        It interfaces with the ATSPI registry to keep account of all accessible
-        applications. It contains the accessible cache objects from each application.
-
-        @registry:   Each accessible cache object must have a reference to the registry
-                     object to send update events.
-
-        @connection: D-Bus connection used to access applications.
-
-        @bus_name:   The test store only accesses one accessible application, this is its
-                     D-Bus path.
-        """
-
-        def __init__(self, registry, connection, bus_name):
-                self._connection = connection
-
-                self.application_list = [bus_name]
-                self.application_cache = {bus_name:AccessibleCache(registry, connection, bus_name)}
-
-        def get_cache_data(self, app_name, acc_path):
-                """
-                Returns the cache tuple for the given application and accessible
-                object path. Throws an IndexError if the cache data is not found.
-                """
-                return self.application_cache[app_name][acc_path]
-
-        def create_application(self, app_name):
-                """
-                Creates an accessible object for the root of the application
-                available at the given D-Bus name.
-                """
-                cls = accessible_factory.get_accessible_class(ATSPI_APPLICATION)
-                try:
-                        return cls(app_name, self.application_cache[app_name].root, self, ATSPI_APPLICATION)
-                except KeyError:
-                        raise AccessibleObjectNotAvailable ()
-
-        def create_accessible(self, app_name, acc_path, interface, dbus_object=None):
-                """
-                Creates an accessible object.
-
-                @app_name: D-Bus name of the application where the accessible object resides.
-
-                @acc_path: D-Bus path of the object within the application.
-
-                @interface: D-Bus interface of the requested object. A different accessible object
-                            class will be created depending on this. Making the function much like 
-                            an accessible object factory.
-
-                @dbus_object: If a D-Bus object already exists for the accessible object it can be
-                              provided here so that another one is not created.
-                """
-                # An acc_path of '/' implies the desktop object, whatever the app_name.
-                if acc_path == DESKTOP_PATH:
-                        return Desktop(self)
-                if acc_path == ROOT_PATH:
-                        return None
-                else:
-                        cls = accessible_factory.get_accessible_class(interface)
-                        try:
-                                return cls(app_name, acc_path, self, interface, dbus_object=dbus_object)
-                        except KeyError:
-                                raise AccessibleObjectNotAvailable ()
-
-        @property
-        def connection(self):
-                """
-                D-Bus connection used by the store.
-                """
-                return self._connection
-
-#------------------------------------------------------------------------------
-
-class ApplicationCache(object):
-        """
-        Test application store, accesses a single application.
-
-        The store object acts as a central class for creating accessible objects.
-        It interfaces with the ATSPI registry to keep account of all accessible
-        applications. It contains the accessible cache objects from each application.
-
-        @registry:   Each accessible cache object must have a reference to the registry
-                     object to send update events.
-
-        @connection: D-Bus connection used to access applications.
-
-        @bus_name:   The test store only accesses one accessible application, this is its
-                     D-Bus path.
-        """
-
-        _APPLICATIONS_ADD = 1
-        _APPLICATIONS_REMOVE = 0
-
-        def __init__(self, registry, connection):
-                self._connection = connection
-                self._registry = registry
-
-                self.application_list = []
-                self.application_cache = {}
-
-                self._regsig = connection.add_signal_receiver(self.update_handler,
-                                                              dbus_interface=ATSPI_REGISTRY_INTERFACE,
-                                                              signal_name="updateApplications")
-
-                obj = connection.get_object(ATSPI_REGISTRY_NAME,
-                                            ATSPI_REGISTRY_PATH,
-                                            introspect=False)
-                self._app_register = dbus.Interface(obj, ATSPI_REGISTRY_INTERFACE)
-
-                self.application_list.extend(self._app_register.getApplications())
-                for bus_name in self.application_list:
-                        self.application_cache[bus_name] = AccessibleCache(self._registry, self._connection, bus_name)
-
-        def update_handler (self, update_type, bus_name):
-                if update_type == ApplicationCache._APPLICATIONS_ADD:
-                        #TODO Check that app does not already exist
-                        #TODO Excuding this app is a hack, need to have re-entrant method calls.
-                        if bus_name != self._connection.get_unique_name ():
-                                self.application_list.append(bus_name)
-                                self.application_cache[bus_name] = AccessibleCache(self._registry,
-                                                                                   self._connection,
-                                                                                   bus_name)
-                                event = _Event(self,
-                                               DESKTOP_PATH,
-                                               ATSPI_REGISTRY_NAME,
-                                               "org.freedesktop.atspi.Event.Object",
-                                               "children-changed",
-                                               ("add", 0, 0, ""))
-                elif update_type == ApplicationCache._APPLICATIONS_REMOVE:
-                        #TODO Fail safely if app does not exist
-                        self.application_list.remove(bus_name)
-                        del(self.application_cache[bus_name])
-                        event = _Event(self,
-                                       DESKTOP_PATH,
-                                       ATSPI_REGISTRY_NAME,
-                                       "org.freedesktop.atspi.Event.Object",
-                                       "children-changed",
-                                       ("remove", 0, 0, ""))
-
-                self._registry._notifyChildrenChange(event)
-
-        def get_cache_data(self, app_name, acc_path):
-                """
-                Returns the cache tuple for the given application and accessible
-                object path. Throws an IndexError if the cache data is not found.
-                """
-                return self.application_cache[app_name][acc_path]
-
-        def create_application(self, app_name):
-                """
-                Creates an accessible object for the root of the application
-                available at the given D-Bus name.
-                """
-                if app_name == ATSPI_REGISTRY_NAME:
-                        return Desktop(self)
-                else:
-                        cls = accessible_factory.get_accessible_class(ATSPI_APPLICATION)
-                        try:
-                                return cls(app_name, self.application_cache[app_name].root, self, ATSPI_APPLICATION)
-                        except KeyError:
-                                raise AccessibleObjectNotAvailable ()
-
-        def create_accessible(self, app_name, acc_path, interface, dbus_object=None):
-                """
-                Creates an accessible object.
-
-                @app_name: D-Bus name of the application where the accessible object resides.
-
-                @acc_path: D-Bus path of the object within the application.
-
-                @interface: D-Bus interface of the requested object. A different accessible object
-                            class will be created depending on this. Making the function much like 
-                            an accessible object factory.
-
-                @dbus_object: If a D-Bus object already exists for the accessible object it can be
-                              provided here so that another one is not created.
-                """
-                if acc_path == DESKTOP_PATH:
-                        return Desktop(self)
-                if acc_path == ROOT_PATH:
-                        return None
-                else:
-                        cls = accessible_factory.get_accessible_class(interface)
-                        try:
-                                return cls(app_name, acc_path, self, interface, dbus_object=dbus_object)
-                        except KeyError:
-                                raise AccessibleObjectNotAvailable ()
-
-        @property
-        def connection(self):
-                """
-                D-Bus connection used by the store.
-                """
-                return self._connection
-
-        def _refresh(self):
-                new = self._app_register.getApplications()
-                removed = [item for item in self.application_list if item not in new]
-                added   = [item for item in new if item not in self.application_list]
-                for item in added:
-                        self.update_handler (self._APPLICATIONS_ADD, item)
-                for item in removed:
-                        self.update_handler (self._APPLICATIONS_REMOVE, item)
-
-                for item in self.application_cache.values():
-                        item._refresh()
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/base.py b/pyatspi/base.py
deleted file mode 100644 (file)
index 7096d1b..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import dbus
-from dbus.proxies import Interface
-from dbus.exceptions import *
-
-import interfaces
-
-__all__ = [
-           "AccessibleObjectNoLongerExists",
-           "AccessibleObjectNotAvailable",
-           "Enum",
-           "BaseProxy",
-           "_repack_tuple",
-          ]
-
-class AccessibleObjectNoLongerExists(Exception):
-        pass
-
-class AccessibleObjectNotAvailable(Exception):
-        pass
-
-#------------------------------------------------------------------------------
-
-def _repack_tuple (tup):
-        """
-        Re-packs a tuple moving the last element to the beginning.
-        """
-        return (tup[-1] ,) + tup[:-1]
-
-#------------------------------------------------------------------------------
-
-class Enum(dbus.UInt32):
-        def __str__(self):
-                return self._enum_lookup[int(self)]
-
-        def __eq__(self, other):
-                if other is None:
-                        return False
-                if int(self) == int(other):
-                        return True
-                else:
-                        return False
-
-        def __hash__(self):
-                return int(self)
-
-#------------------------------------------------------------------------------
-
-
-class BaseProxyMeta(type):
-        def __new__(meta, *args, **kwargs):
-                cls = type.__new__(meta, *args, **kwargs)
-
-                queryable_interfaces = { 
-                        'Accessible':interfaces.ATSPI_ACCESSIBLE,
-                        'Action':interfaces.ATSPI_ACTION,
-                        'Application':interfaces.ATSPI_APPLICATION,
-                        'Collection':interfaces.ATSPI_COLLECTION,
-                        'Component':interfaces.ATSPI_COMPONENT,
-                        'Desktop':interfaces.ATSPI_DESKTOP,
-                        'Document':interfaces.ATSPI_DOCUMENT,
-                        'EditableText':interfaces.ATSPI_EDITABLE_TEXT,
-                        'Hypertext':interfaces.ATSPI_HYPERTEXT,
-                        'Hyperlink':interfaces.ATSPI_HYPERLINK,
-                        'Image':interfaces.ATSPI_IMAGE,
-                        'Selection':interfaces.ATSPI_SELECTION,
-                        'StreamableContent':interfaces.ATSPI_STREAMABLE_CONTENT,
-                        'Table':interfaces.ATSPI_TABLE,
-                        'Text':interfaces.ATSPI_TEXT,
-                        'Value':interfaces.ATSPI_VALUE,
-                }
-
-                def return_query(interface):
-                        def new_query(self):
-                                return self.queryInterface(interface)
-                        return new_query
-
-                for interface in queryable_interfaces.keys():
-                        name = 'query%s' % interface
-                        setattr(cls, name, return_query(queryable_interfaces[interface])) 
-
-                return cls
-
-#------------------------------------------------------------------------------
-
-class BaseProxy(object):
-        """
-        The base D-Bus proxy for a remote object that implements one or more
-        of the AT-SPI interfaces.
-        """
-
-        __metaclass__ = BaseProxyMeta
-
-        def __init__(self, app_name, acc_path, cache, interface, dbus_object=None):
-                """
-                Create a D-Bus Proxy for an ATSPI interface.
-
-                cache - ApplicationCache, where the cached data for the accessible can be obtained.
-                app_name - D-Bus bus name of the application this accessible belongs to.
-                acc_path - D-Bus object path of the server side accessible object.
-                parent - Parent accessible.
-                dbus_object(kwarg) - The D-Bus proxy object used by the accessible for D-Bus method calls.
-                """
-                self._cache = cache
-                self._app_name = app_name
-                self._acc_path = acc_path
-                self._dbus_interface = interface
-
-                if not dbus_object:
-                        dbus_object = cache.connection.get_object(self._app_name,
-                                                                  self._acc_path,
-                                                                  introspect=False)
-                self._dbus_object = dbus_object
-
-                self._pgetter = self.get_dbus_method("Get",
-                                                     dbus_interface="org.freedesktop.DBus.Properties")
-                self._psetter = self.get_dbus_method("Set",
-                                                     dbus_interface="org.freedesktop.DBus.Properties")
-
-        def __str__(self):
-                    try:
-                              return '[%s | %s]' % (self.getRoleName(), self.name)
-                    except Exception:
-                              return '[DEAD]'
-
-        def __eq__(self, other):
-                if other is None:
-                        return False
-                try:
-                        if self._app_name == other._app_name and \
-                           self._acc_path == other._acc_path:
-                                return True
-                        else:
-                                return False
-                except AttributeError:
-                        return False
-
-        def __ne__(self, other):
-                return not self.__eq__(other)
-
-        def __hash__(self):
-                return hash(self._app_name + self._acc_path)
-
-        def get_dbus_method(self, *args, **kwargs):
-                method =  self._dbus_object.get_dbus_method(*args, **kwargs)
-
-                def dbus_method_func(*iargs, **ikwargs):
-                        # TODO Need to throw an AccessibleObjectNoLongerExists exception
-                        # on D-Bus error of the same type.
-                        try:
-                                return method(*iargs, **ikwargs)
-                        except UnknownMethodException, e:
-                                raise NotImplementedError(e)
-                        except DBusException, e:
-                                raise LookupError(e)
-
-                return dbus_method_func
-
-        @property
-        def cached_data(self):
-                try:
-                        return self._cache.get_cache_data(self._app_name, self._acc_path)
-                except KeyError:
-                        raise AccessibleObjectNoLongerExists, \
-                                'Cache data cannot be found for path %s in app %s' % (self._acc_path, self._app_name)
-
-        @property
-        def interfaces(self):
-                return self.cached_data.interfaces
-
-        def queryInterface(self, interface):
-                """
-                Gets a different accessible interface for this object
-                or raises a NotImplemented error if the given interface
-                is not supported.
-                """
-                if interface in self.interfaces:
-                        return self._cache.create_accessible(self._app_name,
-                                                             self._acc_path,
-                                                             interface,
-                                                             dbus_object=self._dbus_object)
-                else:
-                        raise NotImplementedError(
-                                "%s not supported by accessible object at path %s"
-                                % (interface, self._acc_path))
-
-        def flushCache(self):
-                pass
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/collection.py b/pyatspi/collection.py
deleted file mode 100644 (file)
index a5be820..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from interfaces import *
-from base import Enum
-from accessible import Accessible
-from factory import accessible_factory
-
-__all__ = [
-            "Collection",
-          ]
-
-#------------------------------------------------------------------------------
-
-class Collection(Accessible):
-
-        def createMatchRule(self, *args, **kwargs):
-                func = self.get_dbus_method("createMatchRule", dbus_interface=ATSPI_COLLECTION)
-                return func(*args, **kwargs)
-
-        def freeMatchRule(self, *args, **kwargs):
-                func = self.get_dbus_method("freeMatchRule", dbus_interface=ATSPI_COLLECTION)
-                return func(*args, **kwargs)
-
-        def getActiveDescendant(self, *args, **kwargs):
-                func = self.get_dbus_method("getActiveDescendant", dbus_interface=ATSPI_COLLECTION)
-                return func(*args, **kwargs)
-
-        def getMatches(self, *args, **kwargs):
-                func = self.get_dbus_method("getMatches", dbus_interface=ATSPI_COLLECTION)
-                return func(*args, **kwargs)
-
-        def getMatchesFrom(self, *args, **kwargs):
-                func = self.get_dbus_method("getMatchesFrom", dbus_interface=ATSPI_COLLECTION)
-                return func(*args, **kwargs)
-
-        def getMatchesTo(self, *args, **kwargs):
-                func = self.get_dbus_method("getMatchesTo", dbus_interface=ATSPI_COLLECTION)
-                return func(*args, **kwargs)
-
-        def isAncestorOf(self, *args, **kwargs):
-                func = self.get_dbus_method("isAncestorOf", dbus_interface=ATSPI_COLLECTION)
-                return func(*args, **kwargs)
-
-        class MatchType(Enum):
-                _enum_lookup = {
-                        0:'MATCH_INVALID',
-                        1:'MATCH_ALL',
-                        2:'MATCH_ANY',
-                        3:'MATCH_NONE',
-                        4:'MATCH_EMPTY',
-                        5:'MATCH_LAST_DEFINED',
-                }
-
-        MATCH_ALL = MatchType(1)
-        MATCH_ANY = MatchType(2)
-        MATCH_EMPTY = MatchType(4)
-        MATCH_INVALID = MatchType(0)
-        MATCH_LAST_DEFINED = MatchType(5)
-        MATCH_NONE = MatchType(3)
-
-        class SortOrder(Enum):
-                _enum_lookup = {
-                        0:'SORT_ORDER_INVALID',
-                        1:'SORT_ORDER_CANONICAL',
-                        2:'SORT_ORDER_FLOW',
-                        3:'SORT_ORDER_TAB',
-                        4:'SORT_ORDER_REVERSE_CANONICAL',
-                        5:'SORT_ORDER_REVERSE_FLOW',
-                        6:'SORT_ORDER_REVERSE_TAB',
-                        7:'SORT_ORDER_LAST_DEFINED',
-                }
-
-        SORT_ORDER_CANONICAL = SortOrder(1)
-        SORT_ORDER_FLOW = SortOrder(2)
-        SORT_ORDER_INVALID = SortOrder(0)
-        SORT_ORDER_LAST_DEFINED = SortOrder(7)
-        SORT_ORDER_REVERSE_CANONICAL = SortOrder(4)
-        SORT_ORDER_REVERSE_FLOW = SortOrder(5)
-        SORT_ORDER_REVERSE_TAB = SortOrder(6)
-        SORT_ORDER_TAB = SortOrder(3)
-
-        class TreeTraversalType(Enum):
-                _enum_lookup = {
-                        0:'TREE_RESTRICT_CHILDREN',
-                        1:'TREE_RESTRICT_SIBLING',
-                        2:'TREE_INORDER',
-                        3:'TREE_LAST_DEFINED',
-                }
-
-        TREE_INORDER = TreeTraversalType(2)
-        TREE_LAST_DEFINED = TreeTraversalType(3)
-        TREE_RESTRICT_CHILDREN = TreeTraversalType(0)
-        TREE_RESTRICT_SIBLING = TreeTraversalType(1)
-
-# Register the accessible class with the factory.
-accessible_factory.register_accessible_class(ATSPI_COLLECTION, Collection)
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/component.py b/pyatspi/component.py
deleted file mode 100644 (file)
index 9e7b36f..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from interfaces import *
-from base import Enum
-from factory import accessible_factory
-from accessible import BoundingBox, Accessible
-
-from dbus.types import UInt32
-
-__all__ = [
-           "CoordType",
-           "XY_SCREEN",
-           "XY_WINDOW",
-           "ComponentLayer",
-           "Component",
-           "LAYER_BACKGROUND",
-           "LAYER_CANVAS",
-           "LAYER_INVALID",
-           "LAYER_LAST_DEFINED",
-           "LAYER_MDI",
-           "LAYER_OVERLAY",
-           "LAYER_POPUP",
-           "LAYER_WIDGET",
-           "LAYER_WINDOW",
-          ]
-
-#------------------------------------------------------------------------------
-
-class CoordType(Enum):
-        _enum_lookup = {
-                0:'XY_SCREEN',
-                1:'XY_WINDOW',
-        }
-
-XY_SCREEN = CoordType(0)
-XY_WINDOW = CoordType(1)
-
-#------------------------------------------------------------------------------
-
-class ComponentLayer(Enum):
-        _enum_lookup = {
-                0:'LAYER_INVALID',
-                1:'LAYER_BACKGROUND',
-                2:'LAYER_CANVAS',
-                3:'LAYER_WIDGET',
-                4:'LAYER_MDI',
-                5:'LAYER_POPUP',
-                6:'LAYER_OVERLAY',
-                7:'LAYER_WINDOW',
-                8:'LAYER_LAST_DEFINED',
-        }
-
-LAYER_BACKGROUND = ComponentLayer(1)
-LAYER_CANVAS = ComponentLayer(2)
-LAYER_INVALID = ComponentLayer(0)
-LAYER_LAST_DEFINED = ComponentLayer(8)
-LAYER_MDI = ComponentLayer(4)
-LAYER_OVERLAY = ComponentLayer(6)
-LAYER_POPUP = ComponentLayer(5)
-LAYER_WIDGET = ComponentLayer(3)
-LAYER_WINDOW = ComponentLayer(7)
-
-#------------------------------------------------------------------------------
-
-class Component(Accessible):
-        """
-        The Component interface is implemented by objects which occupy
-        on-screen space, e.g. objects which have onscreen visual representations.
-        The methods in Component allow clients to identify where the
-        objects lie in the onscreen coordinate system, their relative
-        size, stacking order, and position. It also provides a mechanism
-        whereby keyboard focus may be transferred to specific user interface
-        elements programmatically. This is a 2D API, coordinates of 3D
-        objects are projected into the 2-dimensional screen view for
-        purposes of this interface.
-        """
-
-        def contains(self, x, y, coord_type):
-                """
-                @return True if the specified point lies within the Component's
-                bounding box, False otherwise.
-                """
-                func = self.get_dbus_method("contains", dbus_interface=ATSPI_COMPONENT)
-                return func(x, y, UInt32(coord_type))
-
-        def getAccessibleAtPoint(self, x, y, coord_type):
-                """
-                @return the Accessible child whose bounding box contains the
-                specified point.
-                """
-                func = self.get_dbus_method("getAccessibleAtPoint", dbus_interface=ATSPI_COMPONENT)
-                return self._cache.create_accessible(self._app_name,
-                                                     func(x, y, UInt32(coord_type)),
-                                                     interfaces.ATSPI_COMPONENT)
-
-        def getAlpha(self):
-                """
-                Obtain the alpha value of the component. An alpha value of 1.0
-                or greater indicates that the object is fully opaque, and an
-                alpha value of 0.0 indicates that the object is fully transparent.
-                Negative alpha values have no defined meaning at this time.
-                """
-                func = self.get_dbus_method("getAlpha", dbus_interface=ATSPI_COMPONENT)
-                return func()
-
-        def getExtents(self, coord_type):
-                """
-                Obtain the Component's bounding box, in pixels, relative to the
-                specified coordinate system. 
-                @param coord_type
-                @return a BoundingBox which entirely contains the object's onscreen
-                visual representation.
-                """
-                func = self.get_dbus_method("getExtents", dbus_interface=ATSPI_COMPONENT)
-                extents = func(UInt32(coord_type))
-                return BoundingBox(*extents)
-
-        def getLayer(self):
-                """
-                @return the ComponentLayer in which this object resides.
-                """
-                func = self.get_dbus_method("getLayer", dbus_interface=ATSPI_COMPONENT)
-                return ComponentLayer(func())
-
-        def getMDIZOrder(self):
-                """
-                Obtain the relative stacking order (i.e. 'Z' order) of an object.
-                Larger values indicate that an object is on "top" of the stack,
-                therefore objects with smaller MDIZOrder may be obscured by objects
-                with a larger MDIZOrder, but not vice-versa. 
-                @return an integer indicating the object's place in the stacking
-                order.
-                """
-                func = self.get_dbus_method("getMDIZOrder", dbus_interface=ATSPI_COMPONENT)
-                return func()
-
-        def getPosition(self, coord_type):
-                """
-                Obtain the position of the current component in the coordinate
-                system specified by coord_type. 
-                @param : coord_type
-                @param : x
-                an out parameter which will be back-filled with the returned
-                x coordinate. 
-                @param : y
-                an out parameter which will be back-filled with the returned
-                y coordinate.
-                """
-                func = self.get_dbus_method("getPosition", dbus_interface=ATSPI_COMPONENT)
-                return func(UInt32(coord_type))
-
-        def getSize(self):
-                """
-                Obtain the size, in the coordinate system specified by coord_type,
-                of the rectangular area which fully contains the object's visual
-                representation, without accounting for viewport clipping. 
-                @param : width
-                the object's horizontal extents in the specified coordinate system.
-                @param : height
-                the object's vertical extents in the specified coordinate system.
-                """
-                func = self.get_dbus_method("getSize", dbus_interface=ATSPI_COMPONENT)
-                return func()
-
-        def grabFocus(self):
-                """
-                Request that the object obtain keyboard focus.
-                @return True if keyboard focus was successfully transferred to
-                the Component.
-                """
-                func = self.get_dbus_method("grabFocus", dbus_interface=ATSPI_COMPONENT)
-                return func()
-
-# Register the accessible class with the factory.
-accessible_factory.register_accessible_class(ATSPI_COMPONENT, Component)
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/constants.py b/pyatspi/constants.py
deleted file mode 100644 (file)
index b6c694a..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-#copyright: Copyright (c) 2005, 2007 IBM Corporation
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-#Portions of this code originally licensed and copyright (c) 2005, 2007
-#IBM Corporation under the BSD license, available at
-#U{http://www.opensource.org/licenses/bsd-license.php}
-
-#authors: Peter Parente, Mark Doffman
-
-# Constants used in the Component interface to get screen coordinates
-DESKTOP_COORDS = 0
-WINDOW_COORDS = 1
-
-# Constants used to synthesize mouse events
-MOUSE_B1P = 'b1p'
-MOUSE_B1R = 'b1r'
-MOUSE_B1C = 'b1c'
-MOUSE_B1D = 'b1d'
-MOUSE_B2P = 'b2p'
-MOUSE_B2R = 'b2r'
-MOUSE_B2C = 'b2c'
-MOUSE_B2D = 'b2d'
-MOUSE_B3P = 'b3p'
-MOUSE_B3R = 'b3r'
-MOUSE_B3C = 'b3c'
-MOUSE_B3D = 'b3d'
-MOUSE_ABS = 'abs'
-MOUSE_REL = 'rel'
-
-# events that clear cached properties
-CACHE_EVENTS = ['object:property-change:accessible-name',
-                'object:property-change:accessible-description',
-                'object:property-change:accessible-role',
-                'object:property-change:accessible-parent']
-
-CACHE_PROPERTIES = ''
-
-# Dictionary used to correct the bug of not being able to register for all the
-# subevents given only an AT-SPI event class (i.e. first part of the event
-# name) keys are event names having subevents and values are the subevents
-# under the key event; handlers *can* be registered for events not in this tree
-EVENT_TREE = {
-  'terminal':
-    ['terminal:line-changed',
-     'terminal:columncount-changed',
-     'terminal:linecount-changed',
-     'terminal:application-changed',
-     'terminal:charwidth-changed'
-     ],
-  'document':
-    ['document:load-complete',
-     'document:reload',
-     'document:load-stopped',
-     'document:content-changed',
-     'document:attributes-changed'
-     ],
-  'object': 
-    ['object:property-change',
-     'object:bounds-changed',
-     'object:link-selected',
-     'object:state-changed',
-     'object:children-changed',
-     'object:visible-data-changed',
-     'object:selection-changed',
-     'object:model-changed',
-     'object:active-descendant-changed',
-     'object:row-inserted',
-     'object:row-reordered',
-     'object:row-deleted',
-     'object:column-inserted',
-     'object:column-reordered',
-     'object:column-deleted',
-     'object:text-bounds-changed',
-     'object:text-selection-changed',
-     'object:text-changed',
-     'object:text-attributes-changed',
-     'object:text-caret-moved',  
-     'object:attributes-changed'],
-  'object:text-changed' :
-    ['object:text-changed:insert',
-    'object:text-changed:delete'],
-  'object:property-change' :
-    ['object:property-change:accessible-parent', 
-    'object:property-change:accessible-name',
-    'object:property-change:accessible-description',
-    'object:property-change:accessible-value',
-    'object:property-change:accessible-role',
-    'object:property-change:accessible-table-caption',
-    'object:property-change:accessible-table-column-description',
-    'object:property-change:accessible-table-column-header',
-    'object:property-change:accessible-table-row-description',
-    'object:property-change:accessible-table-row-header',
-    'object:property-change:accessible-table-summary'],
-  'object:children-changed' :
-    ['object:children-changed:add',
-    'object:children-changed:remove'],
-  'object:state-changed' :
-    ['object:state-changed:'],
-  'mouse' :
-    ['mouse:abs',
-    'mouse:rel',
-    'mouse:button'],
-  'mouse:button' :
-    ['mouse:button:1p',
-    'mouse:button:1r',
-    'mouse:button:2p',
-    'mouse:button:2r',
-    'mouse:button:3p',
-    'mouse:button:3r'],
-  'window' :
-    ['window:minimize',
-    'window:maximize',
-    'window:restore',
-    'window:close',
-    'window:create',
-    'window:reparent',
-    'window:desktop-create',
-    'window:desktop-destroy',
-    'window:activate',
-    'window:deactivate',
-    'window:raise',
-    'window:lower',
-    'window:move',
-    'window:resize',
-    'window:shade',
-    'window:unshade',
-    'window:restyle'],
-  'focus' :
-    ['focus:']
-}
-
-from Accessibility import *
diff --git a/pyatspi/desktop.py b/pyatspi/desktop.py
deleted file mode 100644 (file)
index ed6a9ee..0000000
+++ /dev/null
@@ -1,364 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from interfaces import *
-from base import BaseProxyMeta
-from accessible import BoundingBox
-from state import StateSet
-
-from role import ROLE_UNKNOWN
-from component import LAYER_WIDGET
-
-__all__ = [
-           "Desktop",
-           "DESKTOP_PATH",
-          ]
-
-#------------------------------------------------------------------------------
-
-DESKTOP_PATH = '/org/freedesktop/atspi/accessible/desktop'
-
-#------------------------------------------------------------------------------
-
-class DesktopComponent(object):
-        """
-        The Component interface is implemented by objects which occupy
-        on-screen space, e.g. objects which have onscreen visual representations.
-        The methods in Component allow clients to identify where the
-        objects lie in the onscreen coordinate system, their relative
-        size, stacking order, and position. It also provides a mechanism
-        whereby keyboard focus may be transferred to specific user interface
-        elements programmatically. This is a 2D API, coordinates of 3D
-        objects are projected into the 2-dimensional screen view for
-        purposes of this interface.
-        """
-
-        def contains(self, *args, **kwargs):
-                """
-                @return True if the specified point lies within the Component's
-                bounding box, False otherwise.
-                """
-                return False
-
-        def getAccessibleAtPoint(self, *args, **kwargs):
-                """
-                @return the Accessible child whose bounding box contains the
-                specified point.
-                """
-                return None
-
-        def getAlpha(self, *args, **kwargs):
-                """
-                Obtain the alpha value of the component. An alpha value of 1.0
-                or greater indicates that the object is fully opaque, and an
-                alpha value of 0.0 indicates that the object is fully transparent.
-                Negative alpha values have no defined meaning at this time.
-                """
-                return 1.0
-
-        def getExtents(self, coord_type):
-                """
-                Obtain the Component's bounding box, in pixels, relative to the
-                specified coordinate system. 
-                @param coord_type
-                @return a BoundingBox which entirely contains the object's onscreen
-                visual representation.
-                """
-                #TODO This needs to return the window size
-                return BoundingBox(*(0,0,1024,768))
-
-        def getLayer(self, *args, **kwargs):
-                """
-                @return the ComponentLayer in which this object resides.
-                """
-                return LAYER_WIDGET
-
-        def getMDIZOrder(self):
-                """
-                Obtain the relative stacking order (i.e. 'Z' order) of an object.
-                Larger values indicate that an object is on "top" of the stack,
-                therefore objects with smaller MDIZOrder may be obscured by objects
-                with a larger MDIZOrder, but not vice-versa. 
-                @return an integer indicating the object's place in the stacking
-                order.
-                """
-                return 0
-
-        def getPosition(self, coord_type):
-                """
-                Obtain the position of the current component in the coordinate
-                system specified by coord_type. 
-                @param : coord_type
-                @param : x
-                an out parameter which will be back-filled with the returned
-                x coordinate. 
-                @param : y
-                an out parameter which will be back-filled with the returned
-                y coordinate.
-                """
-                return (0,0)
-
-        def getSize(self, *args, **kwargs):
-                """
-                Obtain the size, in the coordinate system specified by coord_type,
-                of the rectangular area which fully contains the object's visual
-                representation, without accounting for viewport clipping. 
-                @param : width
-                the object's horizontal extents in the specified coordinate system.
-                @param : height
-                the object's vertical extents in the specified coordinate system.
-                """
-                #TODO Need to return window size
-                return (1024, 768)
-
-        def grabFocus(self, *args, **kwargs):
-                """
-                Request that the object obtain keyboard focus.
-                @return True if keyboard focus was successfully transferred to
-                the Component.
-                """
-                return False
-
-#------------------------------------------------------------------------------
-
-class Desktop(object):
-        """
-        The base interface which is implemented by all accessible objects.
-        All objects support interfaces for querying their contained
-        'children' and position in the accessible-object hierarchy,
-        whether or not they actually have children.
-        """
-
-        __metaclass__ = BaseProxyMeta
-
-        def __init__(self, cache):
-                """
-                Creates a desktop object. There should be one single desktop
-                object for the Registry object.
-
-                @param cache - The application cache.
-                @kwarf application - The application D-Bus name
-
-                If the application name is provided the Desktop is being used for
-                test and will only report the application provided as its single child.
-                """
-                self._appcache = cache
-                self._app_name = ':'
-                self._acc_path = DESKTOP_PATH
-
-        def __str__(self):
-                    try:
-                              return '[%s | %s]' % (self.getRoleName(), self.name)
-                    except Exception:
-                              return '[DEAD]'
-
-        def __nonzero__(self):
-                        return True
-
-        def __len__(self):
-                        return self.getChildCount()
-
-        def __getitem__(self, index):
-                        # IndexError thrown by getChildAtIndex
-                        return self.getChildAtIndex(index)
-
-        def __eq__(self, other):
-                if other is None:
-                        return False
-                try:
-                        if self._app_name == other._app_name and \
-                           self._acc_path == other._acc_path:
-                                return True
-                        else:
-                                return False
-                except AttributeError:
-                        return False
-
-        def __ne__(self, other):
-                return not self.__eq__(other)
-
-        def __hash__(self):
-                return hash(self._app_name + self._acc_path)
-
-        def getApplication(self):
-                """
-                Get the containing Application for this object.
-                @return the Application instance to which this object belongs.
-                """
-                return None
-
-        def getAttributes(self):
-                """
-                Get a list of properties applied to this object as a whole, as
-                an AttributeSet consisting of name-value pairs. As such these
-                attributes may be considered weakly-typed properties or annotations,
-                as distinct from the strongly-typed interface instance data declared
-                using the IDL "attribute" keyword.
-                Not all objects have explicit "name-value pair" AttributeSet
-                properties.
-                Attribute names and values may have any UTF-8 string value, however
-                where possible, in order to facilitate consistent use and exposure
-                of "attribute" properties by applications and AT clients, attribute
-                names and values should chosen from a publicly-specified namespace
-                where appropriate.
-                Where possible, the names and values in the name-value pairs
-                should be chosen from well-established attribute namespaces using
-                standard semantics. For example, attributes of Accessible objects
-                corresponding to XHTML content elements should correspond to
-                attribute names and values specified in the w3c XHTML specification,
-                at http://www.w3.org/TR/xhtml2, where such values are not already
-                exposed via a more strongly-typed aspect of the AT-SPI API. Metadata
-                names and values should be chosen from the 'Dublin Core' Metadata
-                namespace using Dublin Core semantics: http://dublincore.org/dcregistry/
-                Similarly, relevant structural metadata should be exposed using
-                attribute names and values chosen from the CSS2 and WICD specification:
-                http://www.w3.org/TR/1998/REC-CSS2-19980512 WICD (http://www.w3.org/TR/2005/WD-WICD-20051121/).
-
-                @return : An AttributeSet encapsulating any "attribute values"
-                currently defined for the object. An attribute set is a list of strings
-                with each string comprising an name-value pair format 'name:value'.
-                """
-                return []
-
-        def getChildAtIndex(self, index):
-                """
-                Get the accessible child of this object at index. 
-                @param : index
-                an in parameter indicating which child is requested (zero-indexed).
-                @return : the 'nth' Accessible child of this object.
-                """
-                return self._appcache.create_application(self._appcache.application_list[index])
-
-        def getIndexInParent(self):
-                """
-                Get the index of this object in its parent's child list. 
-                @return : a long integer indicating this object's index in the
-                parent's list.
-                """
-                return -1
-
-        def getLocalizedRoleName(self):
-                """
-                Get a string indicating the type of UI role played by this object,
-                translated to the current locale.
-                @return : a UTF-8 string indicating the type of UI role played
-                by this object.
-                """
-                #TODO Need to localize this somehow. Hmmmmm
-                return 'unknown'
-
-        def getRelationSet(self):
-                """
-                Get a set defining this object's relationship to other accessible
-                objects. 
-                @return : a RelationSet defining this object's relationships.
-                """
-                return []
-
-        def getRole(self):
-                """
-                Get the Role indicating the type of UI role played by this object.
-                @return : a Role indicating the type of UI role played by this
-                object.
-                """
-                return ROLE_UNKNOWN
-
-        def getRoleName(self):
-                """
-                Get a string indicating the type of UI role played by this object.
-                @return : a UTF-8 string indicating the type of UI role played
-                by this object.
-                """
-                return 'unknown'
-
-        def getState(self):
-                """
-                Get the current state of the object as a StateSet. 
-                @return : a StateSet encapsulating the currently true states
-                of the object.
-                """
-                return StateSet()
-
-        def isEqual(self, accessible):
-                """
-                Determine whether an Accessible refers to the same object as
-                another. This method should be used rather than brute-force comparison
-                of object references (i.e. "by-value" comparison), as two object
-                references may have different apparent values yet refer to the
-                same object.
-                @param : obj
-                an Accessible object reference to compare to 
-                @return : a boolean indicating whether the two object references
-                point to the same object.
-                """
-                #TODO Fix this method
-                return self == accessible
-
-        def get_childCount(self):
-                return len(self._appcache.application_list)
-        _childCountDoc = \
-                """
-                childCount: the number of children contained by this object.
-                """
-        childCount = property(fget=get_childCount, doc=_childCountDoc)
-
-        getChildCount = get_childCount
-
-        def get_description(self):
-                return ''
-        _descriptionDoc = \
-                """
-                a string describing the object in more detail than name.
-                """
-        description = property(fget=get_description, doc=_descriptionDoc)
-
-        def get_name(self):
-                return 'main'
-        _nameDoc = \
-                """
-                a (short) string representing the object's name.
-                """
-        name = property(fget=get_name, doc=_nameDoc)
-
-        def get_parent(self):
-                return None
-        _parentDoc = \
-                """
-                An Accessible object which is this object's containing object.
-                """
-        parent = property(fget=get_parent, doc=_parentDoc)
-
-        @property
-        def interfaces(self):
-                return [ATSPI_ACCESSIBLE, ATSPI_COMPONENT]
-
-        def queryInterface(self, interface):
-                """
-                Gets a different accessible interface for this object
-                or raises a NotImplemented error if the given interface
-                is not supported.
-                """
-                if interface == ATSPI_ACCESSIBLE:
-                                return self
-                elif interface == ATSPI_COMPONENT:
-                                return DesktopComponent()
-                else:
-                                raise NotImplementedError(
-                                                "%s not supported by accessible object at path %s"
-                                                % (interface, self._acc_path))
-
-        def refresh(self):
-                self._appcache._refresh()
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/deviceevent.py b/pyatspi/deviceevent.py
deleted file mode 100644 (file)
index 5e4e3bb..0000000
+++ /dev/null
@@ -1,549 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import dbus as _dbus
-import dbus.service as _service
-import interfaces
-
-from base import Enum as _Enum
-
-#------------------------------------------------------------------------------
-
-class PressedEventType(_Enum):
-        _enum_lookup = {
-                0:'KEY_PRESSED_EVENT',
-                1:'KEY_RELEASED_EVENT',
-                2:'BUTTON_PRESSED_EVENT',
-                3:'BUTTON_RELEASED_EVENT',
-        }
-
-KEY_PRESSED_EVENT = PressedEventType(0)
-KEY_RELEASED_EVENT = PressedEventType(1)
-BUTTON_PRESSED_EVENT = PressedEventType(2)
-BUTTON_RELEASED_EVENT = PressedEventType(3)
-
-#------------------------------------------------------------------------------
-
-class ControllerEventMask(_Enum):
-        _enum_lookup = {
-                1:'KEY_PRESSED_EVENT_MASK',
-                2:'KEY_RELEASED_EVENT_MASK',
-                4:'BUTTON_PRESSED_EVENT_MASK',
-                8:'BUTTON_RELEASED_EVENT_MASK',
-        }
-
-KEY_PRESSED_EVENT_MASK = ControllerEventMask(1)
-KEY_RELEASED_EVENT_MASK = ControllerEventMask(2)
-BUTTON_PRESSED_EVENT_MASK = ControllerEventMask(4)
-BUTTON_RELEASED_EVENT_MASK = ControllerEventMask(8)
-
-#------------------------------------------------------------------------------
-
-class KeyEventType(_Enum):
-        _enum_lookup = {
-                0:'KEY_PRESSED',
-                1:'KEY_RELEASED',
-        }
-KEY_PRESSED = KeyEventType(0)
-KEY_RELEASED = KeyEventType(1)
-
-#------------------------------------------------------------------------------
-
-class KeySynthType(_Enum):
-        _enum_lookup = {
-                0:'KEY_PRESS',
-                1:'KEY_RELEASE',
-                2:'KEY_PRESSRELEASE',
-                3:'KEY_SYM',
-                4:'KEY_STRING',
-        }
-
-KEY_PRESS = KeySynthType(0)
-KEY_PRESSRELEASE = KeySynthType(2)
-KEY_RELEASE = KeySynthType(1)
-KEY_STRING = KeySynthType(4)
-KEY_SYM = KeySynthType(3)
-
-#------------------------------------------------------------------------------
-
-class ModifierType(_Enum):
-        _enum_lookup = {
-                0:'MODIFIER_SHIFT',
-                1:'MODIFIER_SHIFTLOCK',
-                2:'MODIFIER_CONTROL',
-                3:'MODIFIER_ALT',
-                4:'MODIFIER_META',
-                5:'MODIFIER_META2',
-                6:'MODIFIER_META3',
-                7:'MODIFIER_NUMLOCK',
-        }
-
-MODIFIER_ALT = ModifierType(3)
-MODIFIER_CONTROL = ModifierType(2)
-MODIFIER_META = ModifierType(4)
-MODIFIER_META2 = ModifierType(5)
-MODIFIER_META3 = ModifierType(6)
-MODIFIER_NUMLOCK = ModifierType(7)
-MODIFIER_SHIFT = ModifierType(0)
-MODIFIER_SHIFTLOCK = ModifierType(1)
-
-#------------------------------------------------------------------------------
-
-class DeviceEvent(list):
-        """
-        Wraps an AT-SPI device event with a more Pythonic interface. Primarily adds
-        a consume attribute which can be used to cease propagation of a device event.
-
-        @ivar consume: Should this event be consumed and not allowed to pass on to
-                observers further down the dispatch chain in this process or possibly
-                system wide?
-        @type consume: boolean
-        @ivar type: Kind of event, KEY_PRESSED_EVENT or KEY_RELEASED_EVENT
-        @type type: Accessibility.EventType
-        @ivar id: Serial identifier for this key event
-        @type id: integer
-        @ivar hw_code: Hardware scan code for the key
-        @type hw_code: integer
-        @ivar modifiers: Modifiers held at the time of the key event
-        @type modifiers: integer
-        @ivar timestamp: Time at which the event occurred relative to some platform
-                dependent starting point (e.g. XWindows start time)
-        @type timestamp: integer
-        @ivar event_string: String describing the key pressed (e.g. keysym)
-        @type event_string: string
-        @ivar is_text: Is the event representative of text to be inserted (True), or 
-                of a control key (False)?
-        @type is_text: boolean
-        """
-        def __new__(cls, type, id, hw_code, modifiers, timestamp, event_string, is_text):
-                return list.__new__(cls, (type, id, hw_code, modifiers, timestamp, event_string, is_text))
-        def __init__(self, type, id, hw_code, modifiers, timestamp, event_string, is_text):
-                list.__init__(self, (type, id, hw_code, modifiers, timestamp, event_string, is_text))
-                self.consume = False
-        def _get_type(self):
-                return self[0]
-        def _set_type(self, val):
-                self[0] = val
-        type = property(fget=_get_type, fset=_set_type)
-        def _get_id(self):
-                return self[1]
-        def _set_id(self, val):
-                self[1] = val
-        id = property(fget=_get_id, fset=_set_id)
-        def _get_hw_code(self):
-                return self[2]
-        def _set_hw_code(self, val):
-                self[2] = val
-        hw_code = property(fget=_get_hw_code, fset=_set_hw_code)
-        def _get_modifiers(self):
-                return self[3]
-        def _set_modifiers(self, val):
-                self[3] = val
-        modifiers = property(fget=_get_modifiers, fset=_set_modifiers)
-        def _get_timestamp(self):
-                return self[4]
-        def _set_timestamp(self, val):
-                self[4] = val
-        timestamp = property(fget=_get_timestamp, fset=_set_timestamp)
-        def _get_event_string(self):
-                return self[5]
-        def _set_event_string(self, val):
-                self[5] = val
-        event_string = property(fget=_get_event_string, fset=_set_event_string)
-        def _get_is_text(self):
-                return self[6]
-        def _set_is_text(self, val):
-                self[6] = val
-        is_text = property(fget=_get_is_text, fset=_set_is_text)
-
-        def __str__(self):
-                """
-                Builds a human readable representation of the event.
-
-                @return: Event description
-                @rtype: string
-                """
-                import constants
-                if self.type == constants.KEY_PRESSED_EVENT:
-                        kind = 'pressed'
-                elif self.type == constants.KEY_RELEASED_EVENT:
-                        kind = 'released'
-                return """\
-%s
-\thw_code: %d
-\tevent_string: %s
-\tmodifiers: %d
-\tid: %d
-\ttimestamp: %d
-\tis_text: %s""" % (kind, self.hw_code, self.event_string, self.modifiers,
-                self.id, self.timestamp, self.is_text)
-
-#------------------------------------------------------------------------------
-
-class EventListenerMode(list):
-        def __new__(cls, synchronous, preemptive, global_):
-                return list.__new__(cls, (synchronous, preemptive, global_))
-        def __init__(self, synchronous, preemptive, global_):
-                list.__init__(self, (synchronous, preemptive, global_))
-        def _get_synchronous(self):
-                return self[0]
-        def _set_synchronous(self, val):
-                self[0] = val
-        synchronous = property(fget=_get_synchronous, fset=_set_synchronous)
-        def _get_preemptive(self):
-                return self[1]
-        def _set_preemptive(self, val):
-                self[1] = val
-        preemptive = property(fget=_get_preemptive, fset=_set_preemptive)
-        def _get_global_(self):
-                return self[2]
-        def _set_global_(self, val):
-                self[2] = val
-        global_ = property(fget=_get_global_, fset=_set_global_)
-
-#------------------------------------------------------------------------------
-
-class KeyDefinition(list):
-        def __new__(cls, keycode, keysym, keystring, unused):
-                return list.__new__(cls, (keycode, keysym, keystring, unused))
-        def __init__(self, keycode, keysym, keystring, unused):
-                list.__init__(self, (keycode, keysym, keystring, unused))
-        def _get_keycode(self):
-                return self[0]
-        def _set_keycode(self, val):
-                self[0] = val
-        keycode = property(fget=_get_keycode, fset=_set_keycode)
-        def _get_keysym(self):
-                return self[1]
-        def _set_keysym(self, val):
-                self[1] = val
-        keysym = property(fget=_get_keysym, fset=_set_keysym)
-        def _get_keystring(self):
-                return self[2]
-        def _set_keystring(self, val):
-                self[2] = val
-        keystring = property(fget=_get_keystring, fset=_set_keystring)
-        def _get_unused(self):
-                return self[3]
-        def _set_unused(self, val):
-                self[3] = val
-        unused = property(fget=_get_unused, fset=_set_unused)
-
-#------------------------------------------------------------------------------
-
-class DeviceEventController(object):
-        """
-        The interface via which clients request notification of device
-        events, and through which device events may be simulated.
-        """
-
-        def __init__ (self, connection):
-                dec_object = connection.get_object(interfaces.ATSPI_REGISTRY_NAME,
-                                                   interfaces.ATSPI_DEVICE_EVENT_CONTROLLER_PATH,
-                                                   introspect=True)
-                self._dec = _dbus.Interface(dec_object, interfaces.ATSPI_DEVICE_EVENT_CONTROLLER_INTERFACE)
-
-        def registerKeystrokeListener(self,
-                                      event_listener,
-                                      keys,
-                                      event_mask,
-                                      key_event_types,
-                                      event_listener_mode):
-                """
-                Register to intercept keyboard events, and either pass them on
-                or consume them.
-                @param : listener
-                A DeviceEventListener which will intercept key events. 
-                @param : keys
-                A list of KeyDefinition indicating which keys to intercept, or KEYSET_ALL_KEYS.
-                @param : mask
-                A ControllerEventMask bitmask for filtering the intercepted key events.
-                @param : type
-                A list of KeyEventType
-                @param : mode
-                An EventListenerMode indicating whether the listener should receive
-                the events synchronously, potentially consuming them, or just
-                be notified asynchronously of those events that have been generated.
-
-                @return True if the DeviceEventListener was successfully registered
-                for the requested KeySet, ControllerEventMask, event types, and
-                EventListenerMode; otherwise returns False.
-                """
-                func = self._dec.get_dbus_method("registerKeystrokeListener")
-                return func(event_listener,
-                            _dbus.Array(keys, signature="(iisi)"),
-                            event_mask,
-                            key_event_types,
-                            event_listener_mode)
-
-        def deregisterKeystrokeListener(self,
-                                        event_listener,
-                                        keys,
-                                        event_mask,
-                                        key_event_types):
-                """
-                De-register a previously registered keyboard eventlistener.
-                @param : listener
-                A DeviceEventListener which will intercept key events.
-                @param : keys
-                A list of KeyDefinition indicating which keys to intercept, or KEYSET_ALL_KEYS.
-                @param : mask
-                A ControllerEventMask filtering the intercepted key events.
-                @param : type
-                A list of KeyEventType
-                """
-                func = self._dec.get_dbus_method("deregisterKeystrokeListener")
-                return func(event_listener,
-                            keys,
-                            event_mask,
-                            key_event_types)
-
-        def registerDeviceEventListener(self,
-                                        event_listener,
-                                        event_types):
-                """
-                Register to intercept events, and either pass them on or consume
-                them. To listen to keyboard events use registerKeystrokeListener
-                instead. 
-                @param : listener
-                A DeviceEventListener which will intercept events.
-                @param : typeseq
-                A list of EventType indicating which event types to listen for.
-                @return True if successful, False if not
-                """
-                func = self._dec.get_dbus_method("registerDeviceEventListener")
-                return func(event_listener, event_types)
-
-        def deregisterDeviceEventListener(self,
-                                          event_listener,
-                                          event_types):
-                """
-                De-register a previously registered keyboard eventlistener.
-                @param : listener
-                A DeviceEventListener which will intercept events.
-                @param : typeseq
-                A List of EventType indicating which event types to stop listening
-                for.
-                """
-                func = self._dec.get_dbus_method("deregisterDeviceEventListener")
-                return func(event_listener, event_types)
-
-        def notifyListenersSync(self, event):
-                """
-                Notify the Registry instance that a device event has taken place,
-                and allow pre-emptive listeners the opportunity to 'consume'
-                the event and thus prevent its further issuance/forwarding. This
-                is the method used by accessibility bridges to forward "toolkit
-                dependent" device events to the Registry from the application's
-                process space.
-                @return True if the event was consumed by a (pre-emptive) listener,
-                False if not (in which case the device event will be forwarded
-                as normal to any application which would normally receive it,
-                e.g. the currently active application in the case of mouse or
-                keyboard events).
-                """
-                func = self._dec.get_dbus_method("notifyListenersSync")
-                return func(event)
-
-        def notifyListenersAsync(self, event):
-                """
-                Notify the Registry instance that a device event has taken place
-                in an asynchronous manner. This is the method used by accessibility
-                bridges to forward "toolkit dependent" device events to the Registry
-                from the application's process space. If the event in question
-                is potentially pre-emptible. notifyListenersSync should be used
-                instead.
-                """
-                func = self._dec.get_dbus_method("notifyListenersAsync")
-                return func(event)
-
-        def generateKeyboardEvent(self, keycode, keystring, type):
-                """
-                Synthesize a keyboard event.
-                @param : keycode
-                A long integer indicating the keycode of the keypress to be synthesized.
-                @param : keystring
-                an optional UTF-8 string indicating a complex keyboard input
-                event.
-                @param : type
-                A KeySynthType indicating the type of event(s) to be synthesized:
-                a key press, release, press-release pair, or a complex input
-                string (for instance from an internationalized or complex text
-                input method, or a composed character).
-                """
-                func = self._dec.get_dbus_method("generateKeyboardEvent")
-                return func(keycode, keystring, type)
-
-        def generateMouseEvent(self, x, y, name):
-                """
-                Synthesize a mouse event.
-                @param : x
-                A long integer indicating the screen x coord for the mouse event.
-                @param : y
-                A long integer indicating the screen y coord for the mouse event.
-                @param : name
-                A string indicating the type of mouse event, e.g. "button1up"
-                """
-                func = self._dec.get_dbus_method("generateMouseEvent")
-                return func(x, y, name)
-
-#------------------------------------------------------------------------------
-
-class _TestDeviceEventController(object):
-        """
-        Used for testing when no Registry daemon is present.
-        """
-
-        def registerKeystrokeListener(self, event_listener, keys, event_mask, key_event_types, event_listener_mode):
-                return True
-
-        def deregisterKeystrokeListener(self, event_listener, keys, event_mask, key_event_types):
-                pass
-
-        def registerDeviceEventListener(self, event_listener, event_types):
-                return True
-
-        def deregisterDeviceEventListener(self, event_listener, event_types):
-                pass
-
-        def notifyListenersSync(self, event):
-                return False
-
-        def notifyListenersAsync(self, event):
-                pass
-
-        def generateKeyboardEvent(self, keycode, keystring, type):
-                pass
-
-        def generateMouseEvent(self, x, y, name):
-                pass
-
-#------------------------------------------------------------------------------
-
-class KeyboardDeviceEventListener(_service.Object):
-        """
-        Observes keyboard press and release events.
-
-        @ivar registry: The L{Registry} that created this observer
-        @type registry: L{Registry}
-        @ivar key_set: Set of keys to monitor
-        @type key_set: list of integer
-        @ivar mask: Watch for key events while these modifiers are held
-        @type mask: integer
-        @ivar kind: Kind of events to monitor
-        @type kind: integer
-        @ivar mode: Keyboard event mode
-        @type mode: Accessibility.EventListenerMode
-        """
-
-        _next_listener_id = 0
-
-        def _get_unique_path (self):
-                KeyboardDeviceEventListener._next_listener_id += 1
-                return "/org/freedesktop/atspi/keyeventlistener/%d" % (KeyboardDeviceEventListener._next_listener_id,)
-
-        def __init__(self, registry, synchronous, preemptive, global_):
-                """
-                Creates a mode object that defines when key events will be received from 
-                the system. Stores all other information for later registration.
-
-                @param registry: The L{Registry} that created this observer
-                @type registry: L{Registry}
-                @param synchronous: Handle the key event synchronously?
-                @type synchronous: boolean
-                @param preemptive: Allow event to be consumed?
-                @type preemptive: boolean
-                @param global_: Watch for events on inaccessible applications too?
-                @type global_: boolean
-                """
-                self._upath = self._get_unique_path()
-                _service.Object.__init__(self, registry._bus, self._upath)
-                self.mode = EventListenerMode(synchronous, preemptive, global_)
-                self._registry = registry
-
-        def register(self, dc, key_set, mask, kind):
-                """
-                Starts keyboard event monitoring.
-
-                @param dc: Reference to a device controller
-                @type dc: Accessibility.DeviceEventController
-                @param key_set: Set of keys to monitor
-                @type key_set: list of integer
-                @param mask: Integer modifier mask or an iterable over multiple masks to
-                        unapply all at once
-                @type mask: integer, iterable, or None
-                @param kind: Kind of events to monitor
-                @type kind: integer
-                """
-                try:
-                        # check if the mask is iterable
-                        iter(mask)
-                except TypeError:
-                        # register a single integer if not
-                        dc.registerKeystrokeListener(self._upath, key_set, mask, kind, self.mode)
-                else:
-                        for m in mask:
-                                dc.registerKeystrokeListener(self._upath, key_set, m, kind, self.mode)
-
-        def unregister(self, dc, key_set, mask, kind):
-                """
-                Stops keyboard event monitoring.
-
-                @param dc: Reference to a device controller
-                @type dc: Accessibility.DeviceEventController
-                @param key_set: Set of keys to monitor
-                @type key_set: list of integer
-                @param mask: Integer modifier mask or an iterable over multiple masks to
-                        unapply all at once
-                @type mask: integer, iterable, or None
-                @param kind: Kind of events to monitor
-                @type kind: integer
-                """
-                try:
-                        # check if the mask is iterable
-                        iter(mask)
-                except TypeError:
-                        # unregister a single integer if not
-                        dc.deregisterKeystrokeListener(self._upath, key_set, mask, kind)
-                else:
-                        for m in mask:
-                                dc.deregisterKeystrokeListener(self._upath, key_set, m, kind)
-
-        @_service.method(dbus_interface=interfaces.ATSPI_DEVICE_EVENT_LISTENER_INTERFACE,
-                         in_signature="(uinnisb)",
-                         out_signature="b")
-        def notifyEvent(self, ev):
-                """
-                Notifies the L{Registry} that an event has occurred. Wraps the raw event 
-                object in our L{Event} class to support automatic ref and unref calls. An
-                observer can return True to indicate this event should not be allowed to pass 
-                to other AT-SPI observers or the underlying application.
-
-                @param ev: Keyboard event
-                @type ev: Accessibility.DeviceEvent
-                @return: Should the event be consumed (True) or allowed to pass on to other
-                        AT-SPI observers (False)?
-                @rtype: boolean
-                """
-                # TODO Find out where the exceptions are falling in to.
-                try:
-                        # wrap the device event
-                        event = DeviceEvent(*ev)
-                        return self._registry.handleDeviceEvent(event, self)
-                except Exception, e:
-                        import traceback
-                        traceback.print_exc()
-                        return False
-
-#END---------------------------------------------------------------------------
diff --git a/pyatspi/document.py b/pyatspi/document.py
deleted file mode 100644 (file)
index 038b1fd..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from interfaces import *
-from accessible import Accessible
-from factory import accessible_factory
-
-__all__ = [
-           "Document",
-          ]
-
-#------------------------------------------------------------------------------
-
-class Document(Accessible):
-        """
-        Primarily a 'tagging' interface which indicates the start of
-        document content in the Accessibility hierarchy. Accessible objects
-        below the node implementing Document are normally assumed to
-        be part of the document content. Attributes of Document are those
-        attributes associated with the document as a whole. Objects that
-        implement Document are normally expected to implement Collection
-        as well.
-        """
-
-        def getAttributeValue(self, key):
-                """
-                Gets the value of a single attribute, if specified for the document
-                as a whole.
-                @param : attributename
-                a string indicating the name of a specific attribute (name-value
-                pair) being queried.
-                @return a string corresponding to the value of the specified
-                attribute, or an empty string if the attribute is unspecified
-                for the object.
-                """
-                func = self.get_dbus_method("getAttributeValue", dbus_interface=ATSPI_DOCUMENT)
-                return func(key)
-
-        def getAttributes(self):
-                """
-                Gets all attributes specified for a document as a whole. For
-                attributes which change within the document content, see Accessibility::Text::getAttributes
-                instead.
-                @return an AttributeSet containing the attributes of the document,
-                as name-value pairs.
-                """
-                func = self.get_dbus_method("getAttributes", dbus_interface=ATSPI_DOCUMENT)
-                return [key + ':' + value for key, value in func().values()]
-
-        def getLocale(self):
-                """
-                Gets the locale associated with the document's content. e.g.
-                the locale for LOCALE_TYPE_MESSAGES.
-                @return a string compliant with the POSIX standard for locale
-                description.
-                """
-                func = self.get_dbus_method("getLocale", dbus_interface=ATSPI_DOCUMENT)
-                return func()
-
-# Register the accessible class with the factory.
-accessible_factory.register_accessible_class(ATSPI_DOCUMENT, Document)
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/editabletext.py b/pyatspi/editabletext.py
deleted file mode 100644 (file)
index 23cdf48..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from interfaces import *
-from factory import accessible_factory
-from text import *
-
-__all__ = [
-           "EditableText",
-          ]
-
-#------------------------------------------------------------------------------
-
-class EditableText(Text):
-        """
-        Derived from interface Text, EditableText provides methods for
-        modifying textual content of components which support editing.
-        EditableText also interacts with the system clipboard via copyText,
-        cutText, and pasteText.
-        """
-
-        def copyText(self, start, end):
-                """
-                Copy a range of text into the system clipboard. 
-                @param : startPos
-                the character offset of the first character in the range of text
-                being copied. 
-                @param : endPos
-                the offset of the first character past the end of the range of
-                text being copied.
-                """
-                func = self.get_dbus_method("copyText", dbus_interface=ATSPI_EDITABLE_TEXT)
-                return func(start, end)
-
-        def cutText(self, start, end):
-                """
-                Excise a range of text from a Text object, copying it into the
-                system clipboard. 
-                @param : startPos
-                the character offset of the first character in the range of text
-                being cut. 
-                @param : endPos
-                the offset of the first character past the end of the range of
-                text being cut. 
-                @return True if the text was successfully cut, False otherwise.
-                """
-                func = self.get_dbus_method("cutText", dbus_interface=ATSPI_EDITABLE_TEXT)
-                return func(start, end)
-
-        def deleteText(self, start, end):
-                """
-                Excise a range of text from a Text object without copying it
-                into the system clipboard. 
-                @param : startPos
-                the character offset of the first character in the range of text
-                being deleted. 
-                @param : endPos
-                the offset of the first character past the end of the range of
-                text being deleted. 
-                @return True if the text was successfully deleted, False otherwise.
-                """
-                func = self.get_dbus_method("deleteText", dbus_interface=ATSPI_EDITABLE_TEXT)
-                return func(start, end)
-
-        def insertText(self, position, text, length):
-                """
-                Insert new text contents into an existing text object at a given
-                location, while retaining the old contents. 
-                @param : position
-                the character offset into the Text implementor's content at which
-                the new content will be inserted. 
-                @param : text
-                a UTF-8 string of which length characters will be inserted into
-                the text object's text buffer. 
-                @param : length
-                the number of characters of text to insert. If the character
-                count of text is less than or equal to length, the entire contents
-                of text will be inserted.
-                @return True if the text content was successfully inserted, False
-                otherwise.
-                """
-                func = self.get_dbus_method("insertText", dbus_interface=ATSPI_EDITABLE_TEXT)
-                return func(position, text, length)
-
-        def pasteText(self, position):
-                """
-                Copy the text contents of the system clipboard, if any, into
-                a Text object, inserting it at a particular character offset.
-                @param : position
-                the character offset before which the text will be inserted.
-                @return True if the text was successfully pasted into the Text
-                object, False otherwise.
-                """
-                func = self.get_dbus_method("pasteText", dbus_interface=ATSPI_EDITABLE_TEXT)
-                return func(position)
-
-        def setTextContents(self, contents):
-                """
-                Replace the text contents with a new string, discarding the old
-                contents.
-                @param : newContents
-                a UTF-8 string with which the text object's contents will be
-                replaced. 
-                @return True if the text content was successfully changed, False
-                otherwise.
-                """
-                func = self.get_dbus_method("setTextContents", dbus_interface=ATSPI_EDITABLE_TEXT)
-                return func(contents)
-
-# Register the accessible class with the factory.
-accessible_factory.register_accessible_class(ATSPI_EDITABLE_TEXT, EditableText)
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/event.py b/pyatspi/event.py
deleted file mode 100644 (file)
index 948535f..0000000
+++ /dev/null
@@ -1,262 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#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 accessible import BoundingBox
-from base import AccessibleObjectNotAvailable
-
-__all__ = [
-                "Event",
-                "EventType",
-                "event_type_to_signal_reciever",
-          ]
-
-#------------------------------------------------------------------------------
-
-_interface_to_klass = {
-                "org.freedesktop.atspi.Event.Object":"object",
-                "org.freedesktop.atspi.Event.Window":"window",
-                "org.freedesktop.atspi.Event.Mouse":"mouse",
-                "org.freedesktop.atspi.Event.Keyboard":"keyboard",
-                "org.freedesktop.atspi.Event.Terminal":"terminal",
-                "org.freedesktop.atspi.Event.Document":"document",
-                "org.freedesktop.atspi.Event.Focus":"focus",
-                }
-
-_klass_to_interface = {
-                "object":"org.freedesktop.atspi.Event.Object",
-                "window":"org.freedesktop.atspi.Event.Window",
-                "mouse":"org.freedesktop.atspi.Event.Mouse",
-                "keyboard":"org.freedesktop.atspi.Event.Keyboard",
-                "terminal":"org.freedesktop.atspi.Event.Terminal",
-                "document":"org.freedesktop.atspi.Event.Document",
-                "focus":"org.freedesktop.atspi.Event.Focus",
-                }
-
-#------------------------------------------------------------------------------
-
-class _ELessList(list):
-        def __getitem__(self, index):
-                try:
-                        return list.__getitem__(self, index)
-                except IndexError:
-                        return None
-
-class EventType(str):
-        """
-        Wraps the AT-SPI event type string so its components can be accessed 
-        individually as klass (can't use the keyword class), major, minor, and detail 
-        (klass_major_minor_detail).
-
-        @note: All attributes of an instance of this class should be considered 
-                public readable as it is acting a a struct.
-        @ivar klass: Most general event type identifier (object, window, mouse, etc.)
-        @type klass: string
-        @ivar major: Second level event type description
-        @type major: string
-        @ivar minor: Third level event type description
-        @type minor: string
-        @ivar detail: Lowest level event type description
-        @type detail: string
-        @ivar name: Full, unparsed event name as received from AT-SPI
-        @type name: string
-        @cvar format: Names of the event string components
-        @type format: 4-tuple of string
-        """
-
-        _SEPARATOR = ':'
-
-        def __init__(self, name):
-                """
-                Parses the full AT-SPI event name into its components
-                (klass:major:minor:detail). If the provided event name is an integer
-                instead of a string, then the event is really a device event.
-
-                @param name: Full AT-SPI event name
-                @type name: string
-                @raise AttributeError: When the given event name is not a valid string 
-                """
-                stripped = name.strip(self._SEPARATOR)
-                separated = stripped.split(self._SEPARATOR, 3)
-                self._separated = _ELessList(separated)
-
-                self.klass = self._separated[0]
-                self.major = self._separated[1]
-                self.minor = self._separated[2]
-                self.detail = self._separated[3]
-
-        def is_subtype(self, event_type):
-                """
-                Determines if the passed event type is a subtype
-                of this event.
-                """
-                if event_type.klass and event_type.klass !=  self.klass:
-                        return False
-                else:
-                        if event_type.major and event_type.major != self.major:
-                                return False
-                        else:
-                                if event_type.minor and event_type.minor != self.minor:
-                                        return False
-                return True
-
-        @property
-        def name(self):
-                return str(self)
-
-        @property
-        def value(self):
-                return str(self)
-
-#------------------------------------------------------------------------------
-
-def event_type_to_signal_reciever(bus, cache, event_handler, event_type):
-        kwargs = {
-                        'sender_keyword':'sender',
-                        'interface_keyword':'interface',
-                        'member_keyword':'member',
-                        'path_keyword':'path',
-                 }
-        if event_type.major:
-                major = event_type.major.replace('-', '_')
-        if event_type.klass:
-                kwargs['dbus_interface'] = _klass_to_interface[event_type.klass]
-        if event_type.major:
-                kwargs['signal_name'] = major
-        if event_type.minor:
-                kwargs['arg0'] = event_type.minor
-
-        def handler_wrapper(minor, detail1, detail2, any_data,
-                            sender=None, interface=None, member=None, path=None):
-                event = Event(cache, path, sender, interface, member, (minor, detail1, detail2, any_data))
-                return event_handler(event)
-
-        return bus.add_signal_receiver(handler_wrapper, **kwargs)
-
-#------------------------------------------------------------------------------
-
-def signal_spec_to_event_string (interface, name, minor):
-        interface = _interface_to_klass[interface]
-        name = name.replace('_', '-')
-
-        if interface == "focus":
-                return "focus:"
-
-        result = interface + ':'
-        if name:
-                result += name + ':'
-        if minor:
-                result += minor
-        return result
-
-#------------------------------------------------------------------------------
-
-class Event(object):
-        """
-        Wraps an AT-SPI event with a more Pythonic interface managing exceptions,
-        the differences in any_data across versions, and the reference counting of
-        accessibles provided with the event.
-
-        @note: All unmarked attributes of this class should be considered public
-                readable and writable as the class is acting as a record object.
-
-        @ivar type: The type of the AT-SPI event
-        @type type: L{EventType}
-        @ivar detail1: First AT-SPI event parameter
-        @type detail1: integer
-        @ivar detail2: Second AT-SPI event parameter
-        @type detail2: integer
-        @ivar any_data: Extra AT-SPI data payload
-        @type any_data: object
-        @ivar host_application: Application owning the event source
-        @type host_application: Accessibility.Application
-        @ivar source_name: Name of the event source at the time of event dispatch
-        @type source_name: string
-        @ivar source_role: Role of the event source at the time of event dispatch
-        @type source_role: Accessibility.Role
-        @ivar source: Source of the event
-        @type source: Accessibility.Accessible
-        """
-        def __init__(self, cache, source_path, source_application, interface, name, event):
-                """
-                Extracts information from the provided event. If the event is a "normal" 
-                event, pulls the detail1, detail2, any_data, and source values out of the
-                given object and stores it in this object. If the event is a device event,
-                key ID is stored in detail1, scan code is stored in detail2, key name, 
-                key modifiers (e.g. ALT, CTRL, etc.), is text flag, and timestamp are 
-                stored as a 4-tuple in any_data, and source is None (since key events are
-                global).
-
-                @param event: Event from an AT-SPI callback
-                @type event: Accessibility.Event or Accessibility.DeviceEvent
-                """
-                self._cache = cache
-                self._source_path = source_path
-                self._source_application = source_application
-
-                self._source = None
-                self._application = None
-
-                self.type = EventType(signal_spec_to_event_string(interface, name, event[0]))
-
-                self.detail1 = event[1]
-                self.detail2 = event[2]
-
-                data = event[3]
-                if name == "object_bounds_changed":
-                        self.any_data = BoundingBox(*data)
-                else:
-                        self.any_data = data
-
-        @property
-        def host_application(self):
-                if not self._application:
-                        try:
-                                return self._cache.create_application(self._source_application)
-                        except AccessibleObjectNotAvailable:
-                                pass
-                return self._application
-
-        @property
-        def source(self):
-                if not self._source:
-                        try:
-                                self._source = self._cache.create_accessible(self._source_application,
-                                                                             self._source_path,
-                                                                             interfaces.ATSPI_ACCESSIBLE)
-                        except AccessibleObjectNotAvailable:
-                                pass
-                return self._source
-
-        @property
-        def source_name(self):
-                return source.name
-
-        @property
-        def source_role(self):
-                return source.getRole()
-
-        def __str__(self):
-                """
-                Builds a human readable representation of the event including event type,
-                parameters, and source info.
-
-                @return: Event description
-                @rtype: string
-                """
-                return '%s(%s, %s, %s)\n\tsource: %s\n\thost_application: %s' % \
-                                         (self.type, self.detail1, self.detail2, self.any_data,
-                                                self.source, self.host_application)
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/factory.py b/pyatspi/factory.py
deleted file mode 100644 (file)
index 4b02320..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-#------------------------------------------------------------------------------
-
-class AccessibleFactory(object):
-        __accessible_interfaces = {}
-
-        def register_accessible_class(self, name, cls):
-                self.__accessible_interfaces[name] = cls
-
-        def get_accessible_class(self, name):
-                return self.__accessible_interfaces[name]
-
-accessible_factory = AccessibleFactory()
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/hyperlink.py b/pyatspi/hyperlink.py
deleted file mode 100644 (file)
index de7a6db..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from interfaces import *
-from accessible import Accessible
-from factory import accessible_factory
-
-import dbus
-
-__all__ = [
-           "Hyperlink",
-          ]
-
-#------------------------------------------------------------------------------
-
-class Hyperlink(Accessible):
-        """
-        Instances of Hyperlink are returned by Hypertext objects, and
-        are the means by which end users and clients interact with linked,
-        and in some cases embedded, content. Hyperlinks may have multiple
-        "anchors", where an anchor corresponds to a reference to a particular
-        resource with a corresponding resource identified (URI). Hyperlinks
-        may be queried for their URIs, or queried for the objects corresponding
-        to their anchors. The objects thus obtained are instances of
-        Accessible, and may be queried, and manipulated via the Action
-        interface.
-        """
-
-        def getObject(self, index):
-                """
-                Gets the i'th object, (where i is an integer between 0 and Hyperlink::numAnchors
-                - 1, inclusive) associated with a Hyperlink. The objects returned
-                are usually actionable (i.e. they should implement Accessibility::Action),
-                and the available actions often include "open", "bookmark", "save
-                link as", etc. They may also implement Accessibility::StreamableContent,
-                although clients can normally use getURI to obtain a resource
-                locator via which the object's data may be accessed.
-                @return an Accessible object instance representing the Hyperlink's
-                ith anchor, or through which the content associated with the
-                ith anchor can be accessed.
-                """
-                func = self.get_dbus_method("getObject", dbus_interface=ATSPI_HYPERLINK)
-                return self._cache.create_accessible(self._app_name, func(index),
-                                                     interfaces.ATSPI_HYPERLINK)
-
-        def getURI(self, index):
-                """
-                Obtain a resource locator ('URI') which can be used to access
-                the content to which this link "points" or is connected. 
-                @return a string corresponding to the URI of the Hyperlink's
-                'ith' anchor, if one exists, or a NIL string otherwise.
-                """
-                func = self.get_dbus_method("getURI", dbus_interface=ATSPI_HYPERLINK)
-                return func(index)
-
-        def isValid(self):
-                """
-                Check the hyperlink to see if a connection to its backing content
-                can be established, or if its URI is valid. 
-                @return True if the object's content is available, or False if
-                the hyperlink's URI is invalid, or a connection to the resource
-                can not be established.
-                """
-                func = self.get_dbus_method("isValid", dbus_interface=ATSPI_HYPERLINK)
-                return func()
-
-        def get_endIndex(self):
-                return dbus.Int32(self._pgetter(self._dbus_interface, "endIndex"))
-        _endIndexDoc = \
-                """
-                the ending offset within the containing Hypertext content with
-                which this Hyperlink is associated; that is, the offset of the
-                first element past the range within the Hypertext associated
-                with this Hyperlink.
-                """
-        endIndex = property(fget=get_endIndex, doc=_endIndexDoc)
-
-        def get_nAnchors(self):
-                return dbus.Int16(self._pgetter(self._dbus_interface, "nAnchors"))
-        _nAnchorsDoc = \
-                """
-                the number of separate anchors associated with this Hyperlink
-                """
-        nAnchors = property(fget=get_nAnchors, doc=_nAnchorsDoc)
-
-        def get_startIndex(self):
-                return dbus.Int32(self._pgetter(self._dbus_interface, "startIndex"))
-        _startIndexDoc = \
-                """
-                the starting offset within the containing Hypertext content with
-                which this Hyperlink is associated
-                """
-        startIndex = property(fget=get_startIndex, doc=_startIndexDoc)
-
-# Register the accessible class with the factory.
-accessible_factory.register_accessible_class(ATSPI_HYPERLINK, Hyperlink)
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/hypertext.py b/pyatspi/hypertext.py
deleted file mode 100644 (file)
index 6e7332f..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from interfaces import *
-from accessible import Accessible
-from factory import accessible_factory
-
-__all__ = [
-           "Hypertext",
-          ]
-
-#------------------------------------------------------------------------------
-
-class Hypertext(Accessible):
-        """
-        An interface used for objects which implement linking between
-        multiple resource or content locations, or multiple 'markers'
-        within a single document. A Hypertext instance is associated
-        with one or more Hyperlinks, which are associated with particular
-        offsets within the Hypertext's included content.
-        """
-
-        def getLink(self, index):
-                """
-                Get one of the Hyperlinks associated with this Hypertext object,
-                by index.
-                @param : linkIndex
-                an integer from 0 to getNLinks() - 1. 
-                @return the Hyperlink in this Hypertext object.
-                """
-                func = self.get_dbus_method("getLink", dbus_interface=ATSPI_HYPERTEXT)
-                return self._cache.create_accessible(self._app_name, func(index),
-                                                     interfaces.ATSPI_HYPERTEXT)
-
-        def getLinkIndex(self, character_index):
-                """
-                Get the hyperlink index, if any, associated with a particular
-                character offset in the Hypertext object. For Hypertext implementors
-                without textual content, all hyperlinks are associated with character
-                offset '0'.
-                @return the index of the Hyperlink associated with character
-                offset characterIndex, or -1 if no Hyperlink is associated with
-                that character offset.
-                """
-                func = self.get_dbus_method("getLinkIndex", dbus_interface=ATSPI_HYPERTEXT)
-                return func(character_index)
-
-        def getNLinks(self):
-                """
-                Query the hypertext object for the number of Hyperlinks it contains.
-                @return the number of Hyperlinks associated with this Hypertext
-                object, as a long integer.
-                """
-                func = self.get_dbus_method("getNLinks", dbus_interface=ATSPI_HYPERTEXT)
-                return func()
-
-# Register the accessible class with the factory.
-accessible_factory.register_accessible_class(ATSPI_HYPERTEXT, Hypertext)
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/image.py b/pyatspi/image.py
deleted file mode 100644 (file)
index b2b595a..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import dbus
-from interfaces import *
-from accessible import Accessible
-from factory import accessible_factory
-from accessible import BoundingBox
-
-from dbus.types import UInt32
-
-__all__ = [
-           "Image",
-          ]
-
-#------------------------------------------------------------------------------
-
-class Image(Accessible):
-        """
-        An interface implemented by objects which render image data or
-        pictorial information to the screen. When onscreen components
-        include graphical information that is not purely intended to
-        enhance "3d effect" or visual layout, but which conveys some
-        semantic or informational content to the sighted user, they should
-        implement Image, and that semantic content should be conveyed
-        textually to the extent possible via the image description, as
-        well as the Accessible::name and Accessible::description properties.
-        """
-
-        def getImageExtents(self, coordType):
-                """
-                Obtain a bounding box which entirely contains the image contents,
-                as displayed on screen. The bounds returned do not account for
-                any viewport clipping or the fact that the image may be partially
-                or wholly obscured by other onscreen content. 
-                @param : coordType
-                If 0, the returned bounding box position is returned relative
-                to the screen; if 1, the bounding box position is returned relative
-                to the containing window. 
-                @return a BoundingBox enclosing the image's onscreen representation.
-                """
-                func = self.get_dbus_method("getImageExtents", dbus_interface=ATSPI_IMAGE)
-                return BoundingBox(*func(UInt32(coordType)))
-
-        def getImagePosition(self, coord_type):
-                """
-                Get the coordinates of the current image position on screen.
-                @param : x
-                Back-filled with the x coordinate of the onscreen image (i.e.
-                the minimum x coordinate) 
-                @param : y
-                Back-filled with the y coordinate of the onscreen image (i.e.
-                the minimum y coordinate) 
-                @param : coordType
-                If 0, the returned x and y coordinates are returned relative
-                to the screen; if 1, they are returned relative to the containing
-                window.
-                """
-                func = self.get_dbus_method("getImagePosition", dbus_interface=ATSPI_IMAGE)
-                return func(UInt32(coord_type))
-
-        def getImageSize(self):
-                """
-                Obtain the width and height of the current onscreen view of the
-                image. The extents returned do not account for any viewport clipping
-                or the fact that the image may be partially or wholly obscured
-                by other onscreen content. 
-                @param : width
-                Back-filled with the x extents of the onscreen image (i.e. the
-                image width in pixels) 
-                @param : height
-                Back-filled with the y extents of the onscreen image (i.e. the
-                image height in pixels)
-                """
-                func = self.get_dbus_method("getImageSize", dbus_interface=ATSPI_IMAGE)
-                return func()
-
-        def get_imageDescription(self):
-                return dbus.String(self._pgetter(self._dbus_interface, "imageDescription"))
-        _imageDescriptionDoc = \
-                """
-                A UTF-8 string providing a textual description of what is visually
-                depicted in the image.
-                """
-        imageDescription = property(fget=get_imageDescription, doc=_imageDescriptionDoc)
-
-        def get_imageLocale(self):
-                return dbus.String(self._pgetter(self._dbus_interface, "imageLocale"))
-        _imageLocaleDoc = \
-                """
-                A string corresponding to the POSIX LC_MESSAGES locale used by
-                the imageDescription.
-                """
-        imageLocale = property(fget=get_imageLocale, doc=_imageLocaleDoc)
-
-# Register the accessible class with the factory.
-accessible_factory.register_accessible_class(ATSPI_IMAGE, Image)
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/interfaces.py b/pyatspi/interfaces.py
deleted file mode 100644 (file)
index 0883fb9..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-ATSPI_ACCESSIBLE = 'org.freedesktop.atspi.Accessible'
-ATSPI_ACTION = 'org.freedesktop.atspi.Action'
-ATSPI_APPLICATION = 'org.freedesktop.atspi.Application'
-ATSPI_COMPONENT = 'org.freedesktop.atspi.Component'
-ATSPI_COLLECTION = 'org.freedesktop.atspi.Collection'
-ATSPI_DESKTOP = 'org.freedesktop.atspi.Desktop'
-ATSPI_DOCUMENT = 'org.freedesktop.atspi.Document'
-ATSPI_EDITABLE_TEXT = 'org.freedesktop.atspi.EditableText'
-ATSPI_HYPERLINK = 'org.freedesktop.atspi.Hyperlink'
-ATSPI_HYPERTEXT = 'org.freedesktop.atspi.Hypertext'
-ATSPI_IMAGE = 'org.freedesktop.atspi.Image'
-ATSPI_LOGIN_HELPER = 'org.freedesktop.atspi.LoginHelper'
-ATSPI_SELECTION = 'org.freedesktop.atspi.Selection'
-ATSPI_SELECTOR = 'org.freedesktop.atspi.Selector'
-ATSPI_STREAMABLE_CONTENT = 'org.freedesktop.atspi.Content'
-ATSPI_TABLE = 'org.freedesktop.atspi.Table'
-ATSPI_TEXT = 'org.freedesktop.atspi.Text'
-ATSPI_VALUE = 'org.freedesktop.atspi.Value'
-
-ATSPI_REGISTRY_INTERFACE = 'org.freedesktop.atspi.Registry'
-ATSPI_REGISTRY_PATH = '/org/freedesktop/atspi/registry'
-ATSPI_REGISTRY_NAME = 'org.freedesktop.atspi.Registry'
-
-ATSPI_DEVICE_EVENT_CONTROLLER_INTERFACE = 'org.freedesktop.atspi.DeviceEventController'
-ATSPI_DEVICE_EVENT_CONTROLLER_PATH = '/org/freedesktop/atspi/registry/deviceeventcontroller'
-ATSPI_DEVICE_EVENT_LISTENER_INTERFACE = 'org.freedesktop.atspi.DeviceEventListener'
diff --git a/pyatspi/loginhelper.py b/pyatspi/loginhelper.py
deleted file mode 100644 (file)
index a8b5183..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from interfaces import *
-from base import Enum
-from accessible import Accessible
-from factory import accessible_factory
-
-__all__ = [
-           "LoginHelper",
-          ]
-
-#------------------------------------------------------------------------------
-
-class LoginHelper(Accessible):
-        """
-        An interface for use by assistive technologies by which they
-        can access system information and services on a 'need to know'
-        basis while the screen is locked, during user authentication,
-        or during other sensitive operations.         
-        This interface is intended for use by assistive technologies
-        and related user-enabling services, and by applications and utilities
-        which may wish to restrict access to certain system devices and
-        services during security-sensitive states, e.g. when the screen
-        is locked or during authentication into some secure service.
-        Such 'applications' (for instance, screen lock dialogs and security-enabled
-        web browsers) use the LoginHelper client interfaces, and the
-        bonobo-activation query service, to query for assistive technologies
-        which advertise the LoginHelper service. The client then queries
-        these assistive technologies for their device I/O requirements,
-        via the getDeviceReqs call. The client may then issue the advisory
-        request setSafe (TRUE), which requests that the LoginHelper -implementing
-        service make a best-effort attempt to make itself more secure
-        (for instance, an onscreen keyboard might turn off word prediction,
-        and a screenreader may turn off keyboard echo via speech). The
-        return value of setSafe is an advisory indication of whether
-        this attempt was successful (no specific guarantees are implied).
-        Once the 'security sensitive' state is exited, the client should
-        call setSafe (FALSE).
-        The return values from getDeviceReqs inform the client of which
-        services the LoginHelper service (e. g. assistive technology)
-        needs in order to do its job. The client may use this information
-        to loosen any restrictions on access which it may currently have
-        in place (for instance, keyboard grabs, etc.). If it does not
-        do so, the likely outcome is that the end-user will experience
-        loss of access to the system.
-        """
-
-        def getDeviceReqs(self, *args, **kwargs):
-                """
-                getDeviceReqs:
-                Query a LoginHelper for the types of device I/O it requires,
-                in order to do its job. For instance, a LoginHelper which needs
-                to receive keyboard events will include Accessibility_LoginHelper_CORE_KEYBOARD
-                in this list.
-                @return : A sequence of LoginHelper_DeviceReq indicating the
-                device I/O required in order to facilitate end-user access to
-                the system.
-                """
-                func = self.get_dbus_method("getDeviceReqs", dbus_interface=ATSPI_LOGIN_HELPER)
-                return func(*args, **kwargs)
-
-        def getRaiseWindows(self, *args, **kwargs):
-                """
-                getRaiseWindows:
-                Get a list of window IDs that need raising on login.
-                @return : a sequence containing window IDS for toplevels which
-                need to be raised/made visible during user authentication, in
-                order for the LoginHelper to facilitate end-user access to the
-                system.
-                """
-                func = self.get_dbus_method("getRaiseWindows", dbus_interface=ATSPI_LOGIN_HELPER)
-                return func(*args, **kwargs)
-
-        def setSafe(self, *args, **kwargs):
-                """
-                setSafe: 
-                @param : safe_mode
-                TRUE if the client is requesting that 'safe mode' be initiated,
-                FALSE if the client is advising that 'safe mode' may be exited,
-                i.e. normal operation may be resumed.
-                Request a LoginHelper to enter "safe" mode, or inform LoginHelper
-                that "safe" mode may be exited. If safe_mode is TRUE, but the
-                return value is FALSE, the requesting client may wish to deny
-                services to the LoginHelper, for instance avoid raising its toplevels.
-                The return value is purely advisory, and no guarantees are intended
-                about what the implementing LoginHelper will do to improve security
-                when in "safe" mode.
-                @return : whether the LoginHelper is now "safe" or not.
-                """
-                func = self.get_dbus_method("setSafe", dbus_interface=ATSPI_LOGIN_HELPER)
-                return func(*args, **kwargs)
-
-        class DeviceReq(Enum):
-                _enum_lookup = {
-                        0:'GUI_EVENTS',
-                        1:'CORE_KEYBOARD',
-                        2:'CORE_POINTER',
-                        3:'EXT_INPUT',
-                        4:'POST_WINDOWS',
-                        5:'AUDIO_OUT',
-                        6:'AUDIO_IN',
-                        7:'NETWORK',
-                        8:'LOCALHOST',
-                        9:'SERIAL_OUT',
-                        10:'SERIAL_IN',
-                }
-
-        AUDIO_IN = DeviceReq(6)
-        AUDIO_OUT = DeviceReq(5)
-        CORE_KEYBOARD = DeviceReq(1)
-        CORE_POINTER = DeviceReq(2)
-        EXT_INPUT = DeviceReq(3)
-        GUI_EVENTS = DeviceReq(0)
-        LOCALHOST = DeviceReq(8)
-        NETWORK = DeviceReq(7)
-        POST_WINDOWS = DeviceReq(4)
-        SERIAL_IN = DeviceReq(10)
-        SERIAL_OUT = DeviceReq(9)
-
-        class WindowInfo(list):
-                def __new__(cls, winID):
-                        list.__new__(cls, (winID))
-                def __init__(self, winID):
-                        list.__init__(self, (winID))
-
-                def _get_winID(self):
-                        return self[0]
-                def _set_winID(self, val):
-                        self[0] = val
-                winID = property(fget=_get_winID, fset=_set_winID)
-
-# Register the accessible class with the factory.
-accessible_factory.register_accessible_class(ATSPI_LOGIN_HELPER, LoginHelper)
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/registry.py b/pyatspi/registry.py
deleted file mode 100644 (file)
index ab22053..0000000
+++ /dev/null
@@ -1,482 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-#copyright: Copyright (c) 2005, 2007 IBM Corporation
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-#Portions of this code originally licensed and copyright (c) 2005, 2007
-#IBM Corporation under the BSD license, available at
-#U{http://www.opensource.org/licenses/bsd-license.php}
-
-#authors: Peter Parente, Mark Doffman
-
-import os as _os
-import dbus as _dbus
-import gobject as _gobject
-
-from desktop import Desktop as _Desktop
-
-from event import EventType as _EventType
-from event import event_type_to_signal_reciever as _event_type_to_signal_reciever
-
-from applicationcache import TestApplicationCache, ApplicationCache
-
-from dbus.mainloop.glib import DBusGMainLoop as _DBusGMainLoop
-
-from Queue import Queue
-from deviceevent import *
-from deviceevent import _TestDeviceEventController
-
-_DBusGMainLoop(set_as_default=True)
-
-#------------------------------------------------------------------------------
-
-class _Registry(object):
-        """
-        Wraps the Accessibility.Registry to provide more Pythonic registration for
-        events.
-
-        This object should be treated as a singleton, but such treatment is not
-        enforced. You can construct another instance of this object and give it a
-        reference to the Accessibility.Registry singleton. Doing so is harmless and
-        has no point.
-
-        @ivar async: Should event dispatch to local listeners be decoupled from event
-                receiving from the registry?
-        @type async: boolean
-        @ivar reg: Reference to the real, wrapped registry object
-        @type reg: Accessibility.Registry
-        @ivar dev: Reference to the device controller
-        @type dev: Accessibility.DeviceEventController
-        @ivar queue: Queue of events awaiting local dispatch
-        @type queue: Queue.Queue
-        @ivar clients: Map of event names to client listeners
-        @type clients: dictionary
-        @ivar observers: Map of event names to AT-SPI L{_Observer} objects
-        @type observers: dictionary
-        """
-
-        def __init__(self):
-                """
-                Stores a reference to the AT-SPI registry. Gets and stores a reference
-                to the DeviceEventController.
-
-                @param reg: Reference to the AT-SPI registry daemon
-                @type reg: Accessibility.Registry
-                """
-                self._bus = _dbus.SessionBus()
-
-                app_name = None
-                if "ATSPI_TEST_APP_NAME" in _os.environ.keys():
-                        app_name = _os.environ["ATSPI_TEST_APP_NAME"]
-
-                if app_name:
-                        self._app_cache = TestApplicationCache(self, self._bus, app_name)
-                        self.dev = _TestDeviceEventController()
-                else:
-                        self._app_cache = ApplicationCache(self, self._bus)
-                        self.dev = DeviceEventController(self._bus)
-
-                self._event_listeners = {}
-
-                # All of this special casing is for the 'faked'
-                # events caused by cache updates.
-
-                self._name_type = _EventType("object:property-change:name")
-                self._name_listeners = {}
-                self._description_type = _EventType("object:property-change:description")
-                self._description_listeners = {}
-                self._parent_type = _EventType("object:property-change:parent")
-                self._parent_listeners = {}
-                self._children_changed_type = _EventType("object:children-changed")
-                self._children_changed_listeners = {}
-
-                self.clients = {}
-                self.deviceClients = {}
-
-        def __call__(self):
-                """
-                @return: This instance of the registry
-                @rtype: L{Registry}
-                """
-                return self
-
-        @property
-        def cache (self):
-                """
-                This is the accessible application cache through which
-                all accessible objects are accessed.
-                """
-                return self._app_cache
-
-        def start(self, async=False, gil=True):
-                """
-                Enter the main loop to start receiving and dispatching events.
-
-                @param async: Should event dispatch be asynchronous (decoupled) from 
-                        event receiving from the AT-SPI registry?
-                @type async: boolean
-                @param gil: Add an idle callback which releases the Python GIL for a few
-                        milliseconds to allow other threads to run? Necessary if other threads
-                        will be used in this process.
-                        Note - No Longer used.
-                @type gil: boolean
-                """
-                self._loop = _gobject.MainLoop()
-                try:
-                        self._loop.run()
-                except KeyboardInterrupt:
-                        pass
-
-        def stop(self, *args):
-                """Quits the main loop."""
-                self._loop.quit()
-                self.flushEvents()
-
-        def getDesktopCount(self):
-                """
-                Gets the number of available desktops.
-
-                @return: Number of desktops
-                @rtype: integer
-                """
-                return 1
-
-        def getDesktop(self, i):
-                """
-                Gets a reference to the i-th desktop.
-
-                @param i: Which desktop to get
-                @type i: integer
-                @return: Desktop reference
-                @rtype: Accessibility.Desktop
-                """
-                return _Desktop(self._app_cache)
-
-        # -------------------------------------------------------------------------------
-
-        def _callClients(self, register, event):
-                for client in register.keys():
-                        client(event)
-
-        def _notifyNameChange(self, event):
-                self._callClients(self._name_listeners, event)
-
-        def _notifyDescriptionChange(self, event):
-                self._callClients(self._description_listeners, event)
-
-        def _notifyParentChange(self, event):
-                self._callClients(self._parent_listeners, event)
-
-        def _notifyChildrenChange(self, event):
-                self._callClients(self._children_changed_listeners, event)
-
-        def _registerFake(self, type, register, client, *names):
-                """
-                Registers a client from a register of clients
-                for 'Fake' events emitted by the cache.
-                """
-                try:
-                        registered = register[client]
-                except KeyError:
-                        registered = []
-                        register[client] = registered
-
-                for name in names:
-                        new_type = _EventType(name)
-                        if new_type.is_subtype(type):
-                                registered.append(new_type.name)
-
-                if registered == []:
-                        del(register[client])
-
-        def _deregisterFake(self, type, register, client, *names):
-                """
-                Deregisters a client from a register of clients
-                for 'Fake' events emitted by the cache.
-                """
-                try:
-                        registered = register[client]
-                except KeyError:
-                        return True
-
-                for name in names:
-                        remove_type = _EventType(name)
-
-                        copy = registered[:]
-                        for i in range(0, len(copy)):
-                                type_name = copy[i]
-                                registered_type = _EventType(type_name)
-
-                                if remove_type.is_subtype(registered_type):
-                                        del(registered[i])
-
-                if registered == []:
-                        del(register[client])
-
-        # -------------------------------------------------------------------------------
-
-        def registerEventListener(self, client, *names):
-                """
-                Registers a new client callback for the given event names. Supports 
-                registration for all subevents if only partial event name is specified.
-                Do not include a trailing colon.
-
-                For example, 'object' will register for all object events, 
-                'object:property-change' will register for all property change events,
-                and 'object:property-change:accessible-parent' will register only for the
-                parent property change event.
-
-                Registered clients will not be automatically removed when the client dies.
-                To ensure the client is properly garbage collected, call 
-                L{deregisterEventListener}.
-
-                @param client: Callable to be invoked when the event occurs
-                @type client: callable
-                @param names: List of full or partial event names
-                @type names: list of string
-                """
-                try:
-                        registered = self._event_listeners[client]
-                except KeyError:
-                        registered = []
-                        self._event_listeners[client] = registered
-
-                for name in names:
-                        new_type = _EventType(name)
-                        registered.append((new_type.name,
-                                           _event_type_to_signal_reciever(self._bus, self._app_cache, client, new_type)))
-
-                self._registerFake(self._name_type, self._name_listeners, client, *names)
-                self._registerFake(self._description_type, self._description_listeners, client, *names)
-                self._registerFake(self._parent_type, self._parent_listeners, client, *names)
-                self._registerFake(self._children_changed_type, self._children_changed_listeners, client, *names)
-
-        def deregisterEventListener(self, client, *names):
-                """
-                Unregisters an existing client callback for the given event names. Supports 
-                unregistration for all subevents if only partial event name is specified.
-                Do not include a trailing colon.
-
-                This method must be called to ensure a client registered by
-                L{registerEventListener} is properly garbage collected.
-
-                @param client: Client callback to remove
-                @type client: callable
-                @param names: List of full or partial event names
-                @type names: list of string
-                @return: Were event names specified for which the given client was not
-                        registered?
-                @rtype: boolean
-                """
-                try:
-                        registered = self._event_listeners[client]
-                except KeyError:
-                        # Presumably if were trying to deregister a client with
-                        # no names then the return type is always true.
-                        return True
-
-                missing = False
-
-                for name in names:
-                        remove_type = _EventType(name)
-                        copy = registered[:]
-                        for i in range (0, len(copy)):
-                                type_name, signal_match = copy[i]
-                                registered_type = _EventType(type_name)
-
-                                if remove_type.is_subtype(registered_type):
-                                        signal_match.remove()
-                                        del(registered[i])
-                                else:
-                                        missing = True
-
-                if registered == []:
-                        del(self._event_listeners[client])
-
-                #TODO Do these account for missing also?
-                self._deregisterFake(self._name_type, self._name_listeners, client, *names)
-                self._deregisterFake(self._description_type, self._description_listeners, client, *names)
-                self._deregisterFake(self._parent_type, self._parent_listeners, client, *names)
-                self._deregisterFake(self._children_changed_type, self._children_changed_listeners, client, *names)
-
-                return missing
-
-        # -------------------------------------------------------------------------------
-
-        def registerKeystrokeListener(self,
-                                      client,
-                                      key_set=[],
-                                      mask=0,
-                                      kind=(KEY_PRESSED_EVENT, KEY_RELEASED_EVENT),
-                                      synchronous=True,
-                                      preemptive=True,
-                                      global_=False):
-                """
-                Registers a listener for key stroke events.
-
-                @param client: Callable to be invoked when the event occurs
-                @type client: callable
-                @param key_set: Set of hardware key codes to stop monitoring. Leave empty
-                        to indicate all keys.
-                @type key_set: list of integer
-                @param mask: When the mask is None, the codes in the key_set will be 
-                        monitored only when no modifier is held. When the mask is an 
-                        integer, keys in the key_set will be monitored only when the modifiers in
-                        the mask are held. When the mask is an iterable over more than one 
-                        integer, keys in the key_set will be monitored when any of the modifier
-                        combinations in the set are held.
-                @type mask: integer, iterable, None
-                @param kind: Kind of events to watch, KEY_PRESSED_EVENT or 
-                        KEY_RELEASED_EVENT.
-                @type kind: list
-                @param synchronous: Should the callback notification be synchronous, giving
-                        the client the chance to consume the event?
-                @type synchronous: boolean
-                @param preemptive: Should the callback be allowed to preempt / consume the
-                        event?
-                @type preemptive: boolean
-                @param global_: Should callback occur even if an application not supporting
-                        AT-SPI is in the foreground? (requires xevie)
-                @type global_: boolean
-                """
-                try:
-                        # see if we already have an observer for this client
-                        ob = self.deviceClients[client]
-                except KeyError:
-                        # create a new device observer for this client
-                        ob = KeyboardDeviceEventListener(self, synchronous, preemptive, global_)
-                        # store the observer to client mapping, and the inverse
-                        self.deviceClients[ob] = client
-                        self.deviceClients[client] = ob
-                if mask is None:
-                        # None means all modifier combinations
-                        mask = utils.allModifiers()
-                # register for new keystrokes on the observer
-                ob.register(self.dev, key_set, mask, kind)
-
-        def deregisterKeystrokeListener(self,
-                                        client,
-                                        key_set=[],
-                                        mask=0,
-                                        kind=(KEY_PRESSED_EVENT, KEY_RELEASED_EVENT)):
-                """
-                Deregisters a listener for key stroke events.
-
-                @param client: Callable to be invoked when the event occurs
-                @type client: callable
-                @param key_set: Set of hardware key codes to stop monitoring. Leave empty
-                        to indicate all keys.
-                @type key_set: list of integer
-                @param mask: When the mask is None, the codes in the key_set will be 
-                        monitored only when no modifier is held. When the mask is an 
-                        integer, keys in the key_set will be monitored only when the modifiers in
-                        the mask are held. When the mask is an iterable over more than one 
-                        integer, keys in the key_set will be monitored when any of the modifier
-                        combinations in the set are held.
-                @type mask: integer, iterable, None
-                @param kind: Kind of events to stop watching, KEY_PRESSED_EVENT or 
-                        KEY_RELEASED_EVENT.
-                @type kind: list
-                @raise KeyError: When the client isn't already registered for events
-                """
-                # see if we already have an observer for this client
-                ob = self.deviceClients[client]
-                if mask is None:
-                        # None means all modifier combinations
-                        mask = utils.allModifiers()
-                # register for new keystrokes on the observer
-                ob.unregister(self.dev, key_set, mask, kind)
-
-        def handleDeviceEvent(self, event, ob):
-                """
-                Dispatches L{event.DeviceEvent}s to registered clients. Clients are called
-                in the order they were registered for the given AT-SPI event. If any
-                client returns True, callbacks cease for the event for clients of this registry 
-                instance. Clients of other registry instances and clients in other processes may 
-                be affected depending on the values of synchronous and preemptive used when invoking
-                L{registerKeystrokeListener}. 
-
-                @note: Asynchronous dispatch of device events is not supported.
-
-                @param event: AT-SPI device event
-                @type event: L{event.DeviceEvent}
-                @param ob: Observer that received the event
-                @type ob: L{KeyboardDeviceEventListener}
-
-                @return: Should the event be consumed (True) or allowed to pass on to other
-                        AT-SPI observers (False)?
-                @rtype: boolean
-                """
-                try:
-                        # try to get the client registered for this event type
-                        client = self.deviceClients[ob]
-                except KeyError:
-                        # client may have unregistered recently, ignore event
-                        return False
-                # make the call to the client
-                try:
-                        return client(event) or event.consume
-                except Exception:
-                        # print the exception, but don't let it stop notification
-                        traceback.print_exc()
-
-        # -------------------------------------------------------------------------------
-
-        def pumpQueuedEvents (self):
-                """
-                No Longer needed all application events are asyncronous.
-                """
-                pass
-
-        def flushEvents (self):
-                """
-                No Longer needed all application events are asyncronous.
-                """
-                pass
-
-        # -------------------------------------------------------------------------------
-
-        def generateKeyboardEvent(self, keycode, keysym, kind):
-                """
-                Generates a keyboard event. One of the keycode or the keysym parameters
-                should be specified and the other should be None. The kind parameter is 
-                required and should be one of the KEY_PRESS, KEY_RELEASE, KEY_PRESSRELEASE,
-                KEY_SYM, or KEY_STRING.
-
-                @param keycode: Hardware keycode or None
-                @type keycode: integer
-                @param keysym: Symbolic key string or None
-                @type keysym: string
-                @param kind: Kind of event to synthesize
-                @type kind: integer
-                """
-                if keysym is None:
-                        self.dev.generateKeyboardEvent(keycode, '', kind)
-                else:
-                        self.dev.generateKeyboardEvent(None, keysym, kind)
-
-        def generateMouseEvent(self, x, y, name):
-                """
-                Generates a mouse event at the given absolute x and y coordinate. The kind
-                of event generated is specified by the name. For example, MOUSE_B1P 
-                (button 1 press), MOUSE_REL (relative motion), MOUSE_B3D (butten 3 
-                double-click).
-
-                @param x: Horizontal coordinate, usually left-hand oriented
-                @type x: integer
-                @param y: Vertical coordinate, usually left-hand oriented
-                @type y: integer
-                @param name: Name of the event to generate
-                @type name: string
-                """
-                self.dev.generateMouseEvent(_dbus.Int32(x), _dbus.Int32(y), name)
diff --git a/pyatspi/relation.py b/pyatspi/relation.py
deleted file mode 100644 (file)
index ef952c2..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-#copyright: Copyright (c) 2005, 2007 IBM Corporation
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-#Portions of this code originally licensed and copyright (c) 2005, 2007
-#IBM Corporation under the BSD license, available at
-#U{http://www.opensource.org/licenses/bsd-license.php}
-
-#authors: Peter Parente, Mark Doffman
-
-import interfaces
-from base import Enum as _Enum
-
-#------------------------------------------------------------------------------
-
-class RelationType(_Enum):
-        _enum_lookup = {
-                0:'RELATION_NULL',
-                1:'RELATION_LABEL_FOR',
-                2:'RELATION_LABELLED_BY',
-                3:'RELATION_CONTROLLER_FOR',
-                4:'RELATION_CONTROLLED_BY',
-                5:'RELATION_MEMBER_OF',
-                6:'RELATION_TOOLTIP_FOR',
-                7:'RELATION_NODE_CHILD_OF',
-                8:'RELATION_EXTENDED',
-                9:'RELATION_FLOWS_TO',
-                10:'RELATION_FLOWS_FROM',
-                11:'RELATION_SUBWINDOW_OF',
-                12:'RELATION_EMBEDS',
-                13:'RELATION_EMBEDDED_BY',
-                14:'RELATION_POPUP_FOR',
-                15:'RELATION_PARENT_WINDOW_OF',
-                16:'RELATION_DESCRIPTION_FOR',
-                17:'RELATION_DESCRIBED_BY',
-                18:'RELATION_LAST_DEFINED',
-        }
-
-#------------------------------------------------------------------------------
-
-RELATION_CONTROLLED_BY = RelationType(4)
-RELATION_CONTROLLER_FOR = RelationType(3)
-RELATION_DESCRIBED_BY = RelationType(17)
-RELATION_DESCRIPTION_FOR = RelationType(16)
-RELATION_EMBEDDED_BY = RelationType(13)
-RELATION_EMBEDS = RelationType(12)
-RELATION_EXTENDED = RelationType(8)
-RELATION_FLOWS_FROM = RelationType(10)
-RELATION_FLOWS_TO = RelationType(9)
-RELATION_LABELLED_BY = RelationType(2)
-RELATION_LABEL_FOR = RelationType(1)
-RELATION_LAST_DEFINED = RelationType(18)
-RELATION_MEMBER_OF = RelationType(5)
-RELATION_NODE_CHILD_OF = RelationType(7)
-RELATION_NULL = RelationType(0)
-RELATION_PARENT_WINDOW_OF = RelationType(15)
-RELATION_POPUP_FOR = RelationType(14)
-RELATION_SUBWINDOW_OF = RelationType(11)
-RELATION_TOOLTIP_FOR = RelationType(6)
-
-#------------------------------------------------------------------------------
-
-# Build a dictionary mapping relation values to names based on the prefix of the enum constants.
-
-RELATION_VALUE_TO_NAME = dict(((value, name[9:].lower().replace('_', ' ')) 
-                               for name, value 
-                               in globals().items()
-                               if name.startswith('RELATION_')))
-
-#------------------------------------------------------------------------------
-
-def _marshal_relation_set(cache, app_name, relation_set):
-        """
-        The D-Bus protocol has a relation set passed as an array of
-        relation types and object arrays.
-
-        This function marshals the D-Bus message into a list of relation
-        objects.
-        """
-        return [Relation(cache, app_name, *relation) for relation in relation_set]
-
-#------------------------------------------------------------------------------
-
-class Relation(object):
-        """
-        An interface via which objects' non-hierarchical relationships
-        to one another are indicated. An instance of Relations represents
-        a "one-to-many" correspondance.
-        """
-
-        def __init__(self, cache, app_name, type, objects):
-                self._type = type
-                self._objects = objects
-
-                self._cache = cache
-                self._app_name = app_name
-
-        def getNTargets(self):
-                """
-                @return the number of objects to which this relationship applies.
-                """
-                return len(self._objects)
-
-        def getRelationType(self):
-                """
-                @return the RelationType of this Relation.
-                """
-                return RelationType(self._type)
-
-        def getRelationTypeName(self):
-                """
-                @return an unlocalized string representing the relation type.
-                """
-                return RELATION_VALUE_TO_NAME[self._type]
-
-        def getTarget(self, index):
-                """
-                @return an Object which is the 'nth'target of this Relation,
-                e.g. the Object at index i in the list of Objects having the
-                specified relationship to this Accessible.
-                """
-                return self._cache.create_accessible(self._app_name,
-                                                     self._objects[index],
-                                                     interfaces.ATSPI_ACCESSIBLE)
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/role.py b/pyatspi/role.py
deleted file mode 100644 (file)
index a7dac27..0000000
+++ /dev/null
@@ -1,297 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from base import Enum as _Enum
-
-#------------------------------------------------------------------------------
-
-class Role(_Enum):
-        _enum_lookup = {
-                0:'ROLE_INVALID',
-                1:'ROLE_ACCELERATOR_LABEL',
-                2:'ROLE_ALERT',
-                3:'ROLE_ANIMATION',
-                4:'ROLE_ARROW',
-                5:'ROLE_CALENDAR',
-                6:'ROLE_CANVAS',
-                7:'ROLE_CHECK_BOX',
-                8:'ROLE_CHECK_MENU_ITEM',
-                9:'ROLE_COLOR_CHOOSER',
-                10:'ROLE_COLUMN_HEADER',
-                11:'ROLE_COMBO_BOX',
-                12:'ROLE_DATE_EDITOR',
-                13:'ROLE_DESKTOP_ICON',
-                14:'ROLE_DESKTOP_FRAME',
-                15:'ROLE_DIAL',
-                16:'ROLE_DIALOG',
-                17:'ROLE_DIRECTORY_PANE',
-                18:'ROLE_DRAWING_AREA',
-                19:'ROLE_FILE_CHOOSER',
-                20:'ROLE_FILLER',
-                21:'ROLE_FOCUS_TRAVERSABLE',
-                22:'ROLE_FONT_CHOOSER',
-                23:'ROLE_FRAME',
-                24:'ROLE_GLASS_PANE',
-                25:'ROLE_HTML_CONTAINER',
-                26:'ROLE_ICON',
-                27:'ROLE_IMAGE',
-                28:'ROLE_INTERNAL_FRAME',
-                29:'ROLE_LABEL',
-                30:'ROLE_LAYERED_PANE',
-                31:'ROLE_LIST',
-                32:'ROLE_LIST_ITEM',
-                33:'ROLE_MENU',
-                34:'ROLE_MENU_BAR',
-                35:'ROLE_MENU_ITEM',
-                36:'ROLE_OPTION_PANE',
-                37:'ROLE_PAGE_TAB',
-                38:'ROLE_PAGE_TAB_LIST',
-                39:'ROLE_PANEL',
-                40:'ROLE_PASSWORD_TEXT',
-                41:'ROLE_POPUP_MENU',
-                42:'ROLE_PROGRESS_BAR',
-                43:'ROLE_PUSH_BUTTON',
-                44:'ROLE_RADIO_BUTTON',
-                45:'ROLE_RADIO_MENU_ITEM',
-                46:'ROLE_ROOT_PANE',
-                47:'ROLE_ROW_HEADER',
-                48:'ROLE_SCROLL_BAR',
-                49:'ROLE_SCROLL_PANE',
-                50:'ROLE_SEPARATOR',
-                51:'ROLE_SLIDER',
-                52:'ROLE_SPIN_BUTTON',
-                53:'ROLE_SPLIT_PANE',
-                54:'ROLE_STATUS_BAR',
-                55:'ROLE_TABLE',
-                56:'ROLE_TABLE_CELL',
-                57:'ROLE_TABLE_COLUMN_HEADER',
-                58:'ROLE_TABLE_ROW_HEADER',
-                59:'ROLE_TEAROFF_MENU_ITEM',
-                60:'ROLE_TERMINAL',
-                61:'ROLE_TEXT',
-                62:'ROLE_TOGGLE_BUTTON',
-                63:'ROLE_TOOL_BAR',
-                64:'ROLE_TOOL_TIP',
-                65:'ROLE_TREE',
-                66:'ROLE_TREE_TABLE',
-                67:'ROLE_UNKNOWN',
-                68:'ROLE_VIEWPORT',
-                69:'ROLE_WINDOW',
-                70:'ROLE_EXTENDED',
-                71:'ROLE_HEADER',
-                72:'ROLE_FOOTER',
-                73:'ROLE_PARAGRAPH',
-                74:'ROLE_RULER',
-                75:'ROLE_APPLICATION',
-                76:'ROLE_AUTOCOMPLETE',
-                77:'ROLE_EDITBAR',
-                78:'ROLE_EMBEDDED',
-                79:'ROLE_ENTRY',
-                80:'ROLE_CHART',
-                81:'ROLE_CAPTION',
-                82:'ROLE_DOCUMENT_FRAME',
-                83:'ROLE_HEADING',
-                84:'ROLE_PAGE',
-                85:'ROLE_SECTION',
-                86:'ROLE_REDUNDANT_OBJECT',
-                87:'ROLE_FORM',
-                88:'ROLE_LINK',
-                89:'ROLE_INPUT_METHOD_WINDOW',
-                90:'ROLE_LAST_DEFINED',
-        }
-
-ROLE_ACCELERATOR_LABEL = Role(1)
-ROLE_ALERT = Role(2)
-ROLE_ANIMATION = Role(3)
-ROLE_APPLICATION = Role(75)
-ROLE_ARROW = Role(4)
-ROLE_AUTOCOMPLETE = Role(76)
-ROLE_CALENDAR = Role(5)
-ROLE_CANVAS = Role(6)
-ROLE_CAPTION = Role(81)
-ROLE_CHART = Role(80)
-ROLE_CHECK_BOX = Role(7)
-ROLE_CHECK_MENU_ITEM = Role(8)
-ROLE_COLOR_CHOOSER = Role(9)
-ROLE_COLUMN_HEADER = Role(10)
-ROLE_COMBO_BOX = Role(11)
-ROLE_DATE_EDITOR = Role(12)
-ROLE_DESKTOP_FRAME = Role(14)
-ROLE_DESKTOP_ICON = Role(13)
-ROLE_DIAL = Role(15)
-ROLE_DIALOG = Role(16)
-ROLE_DIRECTORY_PANE = Role(17)
-ROLE_DOCUMENT_FRAME = Role(82)
-ROLE_DRAWING_AREA = Role(18)
-ROLE_EDITBAR = Role(77)
-ROLE_EMBEDDED = Role(78)
-ROLE_ENTRY = Role(79)
-ROLE_EXTENDED = Role(70)
-ROLE_FILE_CHOOSER = Role(19)
-ROLE_FILLER = Role(20)
-ROLE_FOCUS_TRAVERSABLE = Role(21)
-ROLE_FONT_CHOOSER = Role(22)
-ROLE_FOOTER = Role(72)
-ROLE_FORM = Role(87)
-ROLE_FRAME = Role(23)
-ROLE_GLASS_PANE = Role(24)
-ROLE_HEADER = Role(71)
-ROLE_HEADING = Role(83)
-ROLE_HTML_CONTAINER = Role(25)
-ROLE_ICON = Role(26)
-ROLE_IMAGE = Role(27)
-ROLE_INPUT_METHOD_WINDOW = Role(89)
-ROLE_INTERNAL_FRAME = Role(28)
-ROLE_INVALID = Role(0)
-ROLE_LABEL = Role(29)
-ROLE_LAST_DEFINED = Role(90)
-ROLE_LAYERED_PANE = Role(30)
-ROLE_LINK = Role(88)
-ROLE_LIST = Role(31)
-ROLE_LIST_ITEM = Role(32)
-ROLE_MENU = Role(33)
-ROLE_MENU_BAR = Role(34)
-ROLE_MENU_ITEM = Role(35)
-ROLE_OPTION_PANE = Role(36)
-ROLE_PAGE = Role(84)
-ROLE_PAGE_TAB = Role(37)
-ROLE_PAGE_TAB_LIST = Role(38)
-ROLE_PANEL = Role(39)
-ROLE_PARAGRAPH = Role(73)
-ROLE_PASSWORD_TEXT = Role(40)
-ROLE_POPUP_MENU = Role(41)
-ROLE_PROGRESS_BAR = Role(42)
-ROLE_PUSH_BUTTON = Role(43)
-ROLE_RADIO_BUTTON = Role(44)
-ROLE_RADIO_MENU_ITEM = Role(45)
-ROLE_REDUNDANT_OBJECT = Role(86)
-ROLE_ROOT_PANE = Role(46)
-ROLE_ROW_HEADER = Role(47)
-ROLE_RULER = Role(74)
-ROLE_SCROLL_BAR = Role(48)
-ROLE_SCROLL_PANE = Role(49)
-ROLE_SECTION = Role(85)
-ROLE_SEPARATOR = Role(50)
-ROLE_SLIDER = Role(51)
-ROLE_SPIN_BUTTON = Role(52)
-ROLE_SPLIT_PANE = Role(53)
-ROLE_STATUS_BAR = Role(54)
-ROLE_TABLE = Role(55)
-ROLE_TABLE_CELL = Role(56)
-ROLE_TABLE_COLUMN_HEADER = Role(57)
-ROLE_TABLE_ROW_HEADER = Role(58)
-ROLE_TEAROFF_MENU_ITEM = Role(59)
-ROLE_TERMINAL = Role(60)
-ROLE_TEXT = Role(61)
-ROLE_TOGGLE_BUTTON = Role(62)
-ROLE_TOOL_BAR = Role(63)
-ROLE_TOOL_TIP = Role(64)
-ROLE_TREE = Role(65)
-ROLE_TREE_TABLE = Role(66)
-ROLE_UNKNOWN = Role(67)
-ROLE_VIEWPORT = Role(68)
-ROLE_WINDOW = Role(69)
-
-ROLE_NAMES = {
-        ROLE_INVALID:'invalid',
-        ROLE_ACCELERATOR_LABEL:'accelerator label',
-        ROLE_ALERT:'alert',
-        ROLE_ANIMATION:'animation',
-        ROLE_ARROW:'arrow',
-        ROLE_CALENDAR:'calendar',
-        ROLE_CANVAS:'canvas',
-        ROLE_CHECK_BOX:'check box',
-        ROLE_CHECK_MENU_ITEM:'check menu item',
-        ROLE_COLOR_CHOOSER:'color chooser',
-        ROLE_COLUMN_HEADER:'column header',
-        ROLE_COMBO_BOX:'combo box',
-        ROLE_DATE_EDITOR:'dateeditor',
-        ROLE_DESKTOP_ICON:'desktop icon',
-        ROLE_DESKTOP_FRAME:'desktop frame',
-        ROLE_DIAL:'dial',
-        ROLE_DIALOG:'dialog',
-        ROLE_DIRECTORY_PANE:'directory pane',
-        ROLE_DRAWING_AREA:'drawing area',
-        ROLE_FILE_CHOOSER:'file chooser',
-        ROLE_FILLER:'filler',
-        ROLE_FONT_CHOOSER:'font chooser',
-        ROLE_FRAME:'frame',
-        ROLE_GLASS_PANE:'glass pane',
-        ROLE_HTML_CONTAINER:'html container',
-        ROLE_ICON:'icon',
-        ROLE_IMAGE:'image',
-        ROLE_INTERNAL_FRAME:'internal frame',
-        ROLE_LABEL:'label',
-        ROLE_LAYERED_PANE:'layered pane',
-        ROLE_LIST:'list',
-        ROLE_LIST_ITEM:'list item',
-        ROLE_MENU:'menu',
-        ROLE_MENU_BAR:'menu bar',
-        ROLE_MENU_ITEM:'menu item',
-        ROLE_OPTION_PANE:'option pane',
-        ROLE_PAGE_TAB:'page tab',
-        ROLE_PAGE_TAB_LIST:'page tab list',
-        ROLE_PANEL:'panel',
-        ROLE_PASSWORD_TEXT:'password text',
-        ROLE_POPUP_MENU:'popup menu',
-        ROLE_PROGRESS_BAR:'progress bar',
-        ROLE_PUSH_BUTTON:'push button',
-        ROLE_RADIO_BUTTON:'radio button',
-        ROLE_RADIO_MENU_ITEM:'radio menu item',
-        ROLE_ROOT_PANE:'root pane',
-        ROLE_ROW_HEADER:'row header',
-        ROLE_SCROLL_BAR:'scroll bar',
-        ROLE_SCROLL_PANE:'scroll pane',
-        ROLE_SEPARATOR:'separator',
-        ROLE_SLIDER:'slider',
-        ROLE_SPLIT_PANE:'split pane',
-        ROLE_SPIN_BUTTON:'spin button',
-        ROLE_STATUS_BAR:'status bar',
-        ROLE_TABLE:'table',
-        ROLE_TABLE_CELL:'table cell',
-        ROLE_TABLE_COLUMN_HEADER:'table column header',
-        ROLE_TABLE_ROW_HEADER:'table row header',
-        ROLE_TEAROFF_MENU_ITEM:'tear off menu item',
-        ROLE_TERMINAL:'terminal',
-        ROLE_TEXT:'text',
-        ROLE_TOGGLE_BUTTON:'toggle button',
-        ROLE_TOOL_BAR:'tool bar',
-        ROLE_TOOL_TIP:'tool tip',
-        ROLE_TREE:'tree',
-        ROLE_TREE_TABLE:'tree table',
-        ROLE_UNKNOWN:'unknown',
-        ROLE_VIEWPORT:'viewport',
-        ROLE_WINDOW:'window',
-        ROLE_HEADER:'header',
-        ROLE_FOOTER:'footer',
-        ROLE_PARAGRAPH:'paragraph',
-        ROLE_RULER:'ruler',
-        ROLE_APPLICATION:'application',
-        ROLE_AUTOCOMPLETE:'autocomplete',
-        ROLE_EDITBAR:'edit bar',
-        ROLE_EMBEDDED:'embedded component',
-        ROLE_ENTRY:'entry',
-        ROLE_CHART:'chart',
-        ROLE_CAPTION:'caption',
-        ROLE_DOCUMENT_FRAME:'document frame',
-        ROLE_HEADING:'heading',
-        ROLE_PAGE:'page',
-        ROLE_SECTION:'section',
-        ROLE_REDUNDANT_OBJECT:'redundant object',
-        ROLE_FORM:'form',
-        ROLE_LINK:'link',
-        ROLE_INPUT_METHOD_WINDOW:'input method window',
-}
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/selection.py b/pyatspi/selection.py
deleted file mode 100644 (file)
index 4751ba5..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from interfaces import *
-from accessible import Accessible
-from factory import accessible_factory
-
-import dbus
-
-__all__ = [
-           "Selection",
-          ]
-
-#------------------------------------------------------------------------------
-
-class Selection(Accessible):
-        """
-        An interface which indicates that an object exposes a 'selection'
-        model, allowing the selection of one or more of its children.
-        Read-only Selection instances are possible, in which case the
-        interface is used to programmatically determine the selected-ness
-        of its children. A selected child has State::STATE_SELECTED,
-        and a child which may hypothetically be selected (though possibly
-        not programmatically selectable) has State::STATE_SELECTABLE.
-        """
-
-        def clearSelection(self):
-                """
-                Attempt to clear all selections (i.e. deselect all children)
-                of a Selection. Not all Selection implementations allow the removal
-                of all selections.
-                @return True if the selections were successfully cleared, False
-                otherwise.
-                """
-                func = self.get_dbus_method("clearSelection", dbus_interface=ATSPI_SELECTION)
-                return func()
-
-        def deselectChild(self, childIndex):
-                """
-                Remove a child from the selected children list of a Selection,
-                if the child is currently selected.
-                @param : childIndex
-                a long integer (the zero offset index into the Accessible object's
-                list of children) indicating which child of the Selection is
-                to be selected.
-                @return True if the child was successfully selected, False otherwise.
-                """
-                func = self.get_dbus_method("deselectChild", dbus_interface=ATSPI_SELECTION)
-                return func(childIndex)
-
-        def deselectSelectedChild(self, index):
-                """
-                Remove a child to the selected children list of a Selection.
-                @param : selectedChildIndex
-                a long integer indicating which of the selected children of the
-                Selection is to be deselected. The index is a zero-offset index
-                into the 'selected child list', not a zero-offset index into
-                the list of all children of the Selection.
-                @return True if the child was successfully deselected, False
-                otherwise.
-                """
-                func = self.get_dbus_method("deselectSelectedChild", dbus_interface=ATSPI_SELECTION)
-                return func(index)
-
-        def getSelectedChild(self, index):
-                """
-                Get the i-th selected Accessible child of a Selection. 
-                @param : selectedChildIndex
-                a long integer indicating which of the selected children of an
-                object is being requested. 
-                @return a pointer to a selected Accessible child object, specified
-                by selectedChildIndex.
-                """
-                func = self.get_dbus_method("getSelectedChild", dbus_interface=ATSPI_SELECTION)
-                return self._cache.create_accessible(self._app_name, func(index),
-                                                     interfaces.ATSPI_ACCESSIBLE)
-
-        def isChildSelected(self, index):
-                """
-                Determine whether a particular child of an Selection implementor
-                is currently selected. Note that childIndex is the zero-offset
-                index into the standard Accessible container's list of children.
-                @param : childIndex
-                an index into the Selection's list of children.
-                @return True if the specified child is currently selected, False
-                otherwise.
-                """
-                func = self.get_dbus_method("isChildSelected", dbus_interface=ATSPI_SELECTION)
-                return func(index)
-
-        def selectAll(self):
-                """
-                Attempt to select all of the children of a Selection implementor.
-                Not all Selection implementors support this operation (for instance,
-                implementations which support only "single selection" do not
-                support this operation).
-                @return True if successful, False otherwise.
-                """
-                func = self.get_dbus_method("selectAll", dbus_interface=ATSPI_SELECTION)
-                return func()
-
-        def selectChild(self, index):
-                """
-                Add a child to the selected children list of a Selection. 
-                @param : childIndex
-                a long integer indicating which child of the Selection is to
-                be selected.
-                @return True if the child was successfully selected, False otherwise.
-                """
-                func = self.get_dbus_method("selectChild", dbus_interface=ATSPI_SELECTION)
-                return func(index)
-
-        def get_nSelectedChildren(self):
-                return dbus.Int32(self._pgetter(self._dbus_interface, "nSelectedChildren"))
-        _nSelectedChildrenDoc = \
-                """
-                The number of children of a Selection implementor which are currently
-                selected.
-                """
-        nSelectedChildren = property(fget=get_nSelectedChildren, doc=_nSelectedChildrenDoc)
-
-# Register the accessible class with the factory.
-accessible_factory.register_accessible_class(ATSPI_SELECTION, Selection)
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/state.py b/pyatspi/state.py
deleted file mode 100644 (file)
index fdfb284..0000000
+++ /dev/null
@@ -1,256 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-#copyright: Copyright (c) 2005, 2007 IBM Corporation
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-#Portions of this code originally licensed and copyright (c) 2005, 2007
-#IBM Corporation under the BSD license, available at
-#U{http://www.opensource.org/licenses/bsd-license.php}
-
-#authors: Peter Parente, Mark Doffman
-
-from base import Enum as _Enum
-
-#------------------------------------------------------------------------------
-
-class StateType(_Enum):
-        _enum_lookup = {
-                0:'STATE_INVALID',
-                1:'STATE_ACTIVE',
-                2:'STATE_ARMED',
-                3:'STATE_BUSY',
-                4:'STATE_CHECKED',
-                5:'STATE_COLLAPSED',
-                6:'STATE_DEFUNCT',
-                7:'STATE_EDITABLE',
-                8:'STATE_ENABLED',
-                9:'STATE_EXPANDABLE',
-                10:'STATE_EXPANDED',
-                11:'STATE_FOCUSABLE',
-                12:'STATE_FOCUSED',
-                13:'STATE_HAS_TOOLTIP',
-                14:'STATE_HORIZONTAL',
-                15:'STATE_ICONIFIED',
-                16:'STATE_MODAL',
-                17:'STATE_MULTI_LINE',
-                18:'STATE_MULTISELECTABLE',
-                19:'STATE_OPAQUE',
-                20:'STATE_PRESSED',
-                21:'STATE_RESIZABLE',
-                22:'STATE_SELECTABLE',
-                23:'STATE_SELECTED',
-                24:'STATE_SENSITIVE',
-                25:'STATE_SHOWING',
-                26:'STATE_SINGLE_LINE',
-                27:'STATE_STALE',
-                28:'STATE_TRANSIENT',
-                29:'STATE_VERTICAL',
-                30:'STATE_VISIBLE',
-                31:'STATE_MANAGES_DESCENDANTS',
-                32:'STATE_INDETERMINATE',
-                33:'STATE_REQUIRED',
-                34:'STATE_TRUNCATED',
-                35:'STATE_ANIMATED',
-                36:'STATE_INVALID_ENTRY',
-                37:'STATE_SUPPORTS_AUTOCOMPLETION',
-                38:'STATE_SELECTABLE_TEXT',
-                39:'STATE_IS_DEFAULT',
-                40:'STATE_VISITED',
-                41:'STATE_LAST_DEFINED',
-        }
-
-#------------------------------------------------------------------------------
-
-STATE_ACTIVE = StateType(1)
-STATE_ANIMATED = StateType(35)
-STATE_ARMED = StateType(2)
-STATE_BUSY = StateType(3)
-STATE_CHECKED = StateType(4)
-STATE_COLLAPSED = StateType(5)
-STATE_DEFUNCT = StateType(6)
-STATE_EDITABLE = StateType(7)
-STATE_ENABLED = StateType(8)
-STATE_EXPANDABLE = StateType(9)
-STATE_EXPANDED = StateType(10)
-STATE_FOCUSABLE = StateType(11)
-STATE_FOCUSED = StateType(12)
-STATE_HAS_TOOLTIP = StateType(13)
-STATE_HORIZONTAL = StateType(14)
-STATE_ICONIFIED = StateType(15)
-STATE_INDETERMINATE = StateType(32)
-STATE_INVALID = StateType(0)
-STATE_INVALID_ENTRY = StateType(36)
-STATE_IS_DEFAULT = StateType(39)
-STATE_LAST_DEFINED = StateType(41)
-STATE_MANAGES_DESCENDANTS = StateType(31)
-STATE_MODAL = StateType(16)
-STATE_MULTISELECTABLE = StateType(18)
-STATE_MULTI_LINE = StateType(17)
-STATE_OPAQUE = StateType(19)
-STATE_PRESSED = StateType(20)
-STATE_REQUIRED = StateType(33)
-STATE_RESIZABLE = StateType(21)
-STATE_SELECTABLE = StateType(22)
-STATE_SELECTABLE_TEXT = StateType(38)
-STATE_SELECTED = StateType(23)
-STATE_SENSITIVE = StateType(24)
-STATE_SHOWING = StateType(25)
-STATE_SINGLE_LINE = StateType(26)
-STATE_STALE = StateType(27)
-STATE_SUPPORTS_AUTOCOMPLETION = StateType(37)
-STATE_TRANSIENT = StateType(28)
-STATE_TRUNCATED = StateType(34)
-STATE_VERTICAL = StateType(29)
-STATE_VISIBLE = StateType(30)
-STATE_VISITED = StateType(40)
-
-#------------------------------------------------------------------------------
-
-# Build a dictionary mapping state values to names based on the prefix of the enum constants.
-
-STATE_VALUE_TO_NAME = dict(((value, name[6:].lower().replace('_', ' '))
-                            for name, value
-                            in globals().items() 
-                            if name.startswith('STATE_')))
-
-#------------------------------------------------------------------------------
-
-def _marshal_state_set(bitfield):
-        """
-        The D-Bus protocol has a stateset object passed
-        as a 64bit bitfield. The Bits are passed as two 32bit
-        integers.
-
-        This function marshals the D-Bus message into a 
-        StateSet object that corresponds to these states.
-        """
-        (lower, upper) = bitfield
-
-        states = []
-
-        pos = 0
-        while (lower):
-                if (1L)&lower:
-                        states.append(StateType(pos))
-                pos+=1
-                lower >>= 1
-
-        pos = 32
-        while (upper):
-                if (1L)&upper:
-                        states.append(StateType(pos))
-                pos+=1
-                upper >>= 1
-
-        return StateSet(*states)
-
-#------------------------------------------------------------------------------
-
-class StateSet(object):
-        """
-        The StateSet object implements a wrapper around a
-        bitmap of Accessible states.
-
-        The StateSet object is the instantaneous state of
-        the Accessible object and is not updated with its
-        container Accessible. This behaviour is different
-        to the CORBA version of AT-SPI
-        """
-        def __init__(self, *states):
-                """
-                Initializes the state set with the given states.
-
-                @param states: States to add immediately
-                @type states: list
-                """
-                self.states = set()
-                map(self.add, states)
-
-        def contains(self, state):
-                """
-                Checks if this StateSet contains the given state.
-
-                @param state: State to check
-                @type state: Accessibility.StateType
-                @return: True if the set contains the given state
-                @rtype: boolean
-                """
-                return state in self.states
-
-        def add(self, *states):
-                """
-                Adds states to this set.
-
-                @param states: State(s) to add
-                @type states: Accessibility.StateType
-                """
-                for state in states:
-                        self.states.add(state)
-
-        def remove(self, state):
-                """
-                Removes states from this set.
-
-                @param states: State(s) to remove
-                @type states: Accessibility.StateType
-                """
-                self.states.remove(state)
-
-        def equals(self, state_set):
-                """
-                Checks if this StateSet contains exactly the same members as the given
-                StateSet.
-
-                @param state_set: Another set
-                @type state_set: Accessibility.StateSet
-                @return: Are the sets equivalent in terms of their contents?
-                @rtype: boolean
-                """
-                return set(state_set.getStates()) == self.states
-
-        def compare(self, state_set):
-                """
-                Finds the symmetric difference between this state set andthe one provided,
-                and returns it as a new StateSet.
-
-                @note: This does not use L{_StateSetImpl.compare} which cannot be
-                implemented at this time
-                @param state_set: Set to compare against
-                @type state_set: Accessibility.StateSet
-                @return: Proxy for the new set
-                @rtype: L{StateSet}
-                """
-                a = set(self.getStates())
-                b = set(state_set.getStates())
-                diff = a.symmetric_difference(b)
-                return StateSet(*diff)
-
-        def isEmpty(self):
-                """
-                Checks if this StateSet is empty.
-
-                @return: Is it empty?
-                @rtype: boolean
-                """
-                return len(self.states) == 0
-
-        def getStates(self):
-                """
-                Gets the sequence of all states in this set.
-
-                @return: List of states
-                @rtype: list
-                """
-                return list(self.states)
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/table.py b/pyatspi/table.py
deleted file mode 100644 (file)
index dd8879f..0000000
+++ /dev/null
@@ -1,376 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from interfaces import *
-from accessible import Accessible
-from factory import accessible_factory
-
-import dbus
-
-__all__ = [
-           "Table",
-          ]
-
-#------------------------------------------------------------------------------
-
-class Table(Accessible):
-        """
-        An interface used by containers whose contained data is arranged
-        in a "tabular" (i.e. row-column) fashion. Tables may resemble
-        a two-dimensional grid, as in a spreadsheet, or may feature objects
-        which span multiple rows and/or columns, but whose bounds are
-        aligned on a row/column matrix. Thus, the Table interface may
-        be used to represent "spreadsheets" as well as "frames".
-        Objects within tables are children of the Table instance, and
-        they may be referenced either via a child index or via a row/column
-        pair. Their role may be ROLE_TABLE_CELL, but table 'cells' may
-        have other roles as well. These 'cells' may implement other interfaces,
-        such as Text, Action, Image, and Component, and should do so
-        as appropriate to their onscreen representation and/or behavior.
-        """
-
-        def addColumnSelection(self, column):
-                """
-                Select the specified column, adding it to the current column
-                selection, if the table's selection model permits it.
-                @param : column
-                @return True if the specified column was successfully selected,
-                False if not.
-                """
-                func = self.get_dbus_method("addColumnSelection", dbus_interface=ATSPI_TABLE)
-                return func(column)
-
-        def addRowSelection(self, row):
-                """
-                Select the specified row, adding it to the current row selection,
-                if the table's selection model permits it.
-                @param : row
-                @return True if the specified row was successfully selected,
-                False if not.
-                """
-                func = self.get_dbus_method("addRowSelection", dbus_interface=ATSPI_TABLE)
-                return func(row)
-
-        def getAccessibleAt(self, row, column):
-                """
-                Get the table cell at the specified row and column indices. 
-                @param : row
-                the specified table row, zero-indexed. 
-                @param : column
-                the specified table column, zero-indexed.
-                @return an Accessible object representing the specified table
-                cell.
-                """
-                func = self.get_dbus_method("getAccessibleAt", dbus_interface=ATSPI_TABLE)
-                return self._cache.create_accessible(self._app_name, func(row, column),
-                                                     interfaces.ATSPI_ACCESSIBLE)
-
-        def getColumnAtIndex(self, index):
-                """
-                Get the table column index occupied by the child at a particular
-                1-D child index.
-                @param : index
-                the specified child index, zero-indexed.
-                @return a long integer indicating the first column spanned by
-                the child of a table, at the specified 1-D (zero-offset) index.
-                """
-                func = self.get_dbus_method("getColumnAtIndex", dbus_interface=ATSPI_TABLE)
-                return func(index)
-
-        def getColumnDescription(self, column):
-                """
-                Get a text description of a particular table column. This differs
-                from AccessibleTable_getColumnHeader, which returns an Accessible.
-                @param : column
-                the specified table column, zero-indexed.
-                @return a UTF-8 string describing the specified table column,
-                if available.
-                """
-                func = self.get_dbus_method("getColumnDescription", dbus_interface=ATSPI_TABLE)
-                return func(column)
-
-        def getColumnExtentAt(self, row, column):
-                """
-                Get the number of columns spanned by the table cell at the specific
-                row and column. (some tables can have cells which span multiple
-                rows and/or columns).
-                @param : row
-                the specified table row, zero-indexed. 
-                @param : column
-                the specified table column, zero-indexed.
-                @return a long integer indicating the number of columns spanned
-                by the specified cell.
-                """
-                func = self.get_dbus_method("getColumnExtentAt", dbus_interface=ATSPI_TABLE)
-                return func(row, column)
-
-        def getColumnHeader(self, index):
-                """
-                Get the header associated with a table column, if available,
-                as an instance of Accessible. This differs from getColumnDescription,
-                which returns a string.
-                @param : column
-                the specified table column, zero-indexed.
-                @return an Accessible representatin of the specified table column,
-                if available.
-                """
-                func = self.get_dbus_method("getColumnHeader", dbus_interface=ATSPI_TABLE)
-                return self._cache.create_accessible(self._app_name, func(index),
-                                                     interfaces.ATSPI_ACCESSIBLE)
-
-        def getIndexAt(self, row, column):
-                """
-                Get the 1-D child index corresponding to the specified 2-D row
-                and column indices. 
-                @param : row
-                the specified table row, zero-indexed. 
-                @param : column
-                the specified table column, zero-indexed.
-                @return a long integer which serves as the index of a specified
-                cell in the table, in a form usable by Accessible::getChildAtIndex.
-                """
-                func = self.get_dbus_method("getIndexAt", dbus_interface=ATSPI_TABLE)
-                return func(row, column)
-
-        def getRowAtIndex(self, index):
-                """
-                Get the table row index occupied by the child at a particular
-                1-D child index.
-                @param : index
-                the specified child index, zero-indexed.
-                @return a long integer indicating the first row spanned by the
-                child of a table, at the specified 1-D (zero-offset) index.
-                """
-                func = self.get_dbus_method("getRowAtIndex", dbus_interface=ATSPI_TABLE)
-                return func(index)
-
-        def getRowColumnExtentsAtIndex(self, index):
-                """
-                Given a child index, determine the row and column indices and
-                extents, and whether the cell is currently selected. If the child
-                at index is not a cell (for instance, if it is a summary, caption,
-                etc.), False is returned.
-                @param : index
-                the index of the Table child whose row/column extents are requested.
-                @param : row
-                back-filled with the first table row associated with the cell
-                with child index index. 
-                @param : col
-                back-filled with the first table column associated with the cell
-                with child index index. 
-                @param : row_extents
-                back-filled with the number of table rows across which child
-                i extends. 
-                @param : col_extents
-                back-filled with the number of table columns across which child
-                i extends. 
-                @param : is_selected
-                a boolean which is back-filled with True if the child at index
-                i corresponds to a selected table cell, False otherwise.
-                Example: If the Table child at index '6' extends across columns
-                5 and 6 of row 2 of a Table instance, and is currently selected,
-                then retval=table::getRowColumnExtentsAtIndex(6,row,col,
-                row_extents,
-                col_extents,
-                is_selected);
-                 will return True, and after the call row, col, row_extents,
-                col_extents, and is_selected will contain 2, 5, 1, 2, and True,
-                respectively.
-                @return True if the index is associated with a valid table cell,
-                False if the index does not correspond to a cell. If False is
-                returned, the values of the out parameters are undefined.
-                """
-                func = self.get_dbus_method("getRowColumnExtentsAtIndex", dbus_interface=ATSPI_TABLE)
-                return func(index)
-
-        def getRowDescription(self, index):
-                """
-                Get a text description of a particular table row. This differs
-                from AccessibleTable_getRowHeader, which returns an Accessible.
-                @param : row
-                the specified table row, zero-indexed.
-                @return a UTF-8 string describing the specified table row, if
-                available.
-                """
-                func = self.get_dbus_method("getRowDescription", dbus_interface=ATSPI_TABLE)
-                return func(index)
-
-        def getRowExtentAt(self, row, column):
-                """
-                Get the number of rows spanned by the table cell at the specific
-                row and column. (some tables can have cells which span multiple
-                rows and/or columns).
-                @param : row
-                the specified table row, zero-indexed. 
-                @param : column
-                the specified table column, zero-indexed.
-                @return a long integer indicating the number of rows spanned
-                by the specified cell.
-                """
-                func = self.get_dbus_method("getRowExtentAt", dbus_interface=ATSPI_TABLE)
-                return func(row, column)
-
-        def getRowHeader(self, row):
-                """
-                Get the header associated with a table row, if available. This
-                differs from getRowDescription, which returns a string.
-                @param : row
-                the specified table row, zero-indexed.
-                @return an Accessible representatin of the specified table row,
-                if available.
-                """
-                func = self.get_dbus_method("getRowHeader", dbus_interface=ATSPI_TABLE)
-                return self._cache.create_accessible(self._app_name, func(row),
-                                                     interfaces.ATSPI_ACCESSIBLE)
-
-        def getSelectedColumns(self):
-                """
-                Obtain the indices of all columns which are currently selected.
-                @return a sequence of integers comprising the indices of columns
-                currently selected.
-                """
-                func = self.get_dbus_method("getSelectedColumns", dbus_interface=ATSPI_TABLE)
-                return func()
-
-        def getSelectedRows(self):
-                """
-                Obtain the indices of all rows which are currently selected.
-                @return a sequence of integers comprising the indices of rows
-                currently selected.
-                """
-                func = self.get_dbus_method("getSelectedRows", dbus_interface=ATSPI_TABLE)
-                return func()
-
-        def isColumnSelected(self, column):
-                """
-                Determine whether a table column is selected. 
-                @param : column
-                the column being queried.
-                @return True if the specified column is currently selected, False
-                if not.
-                """
-                func = self.get_dbus_method("isColumnSelected", dbus_interface=ATSPI_TABLE)
-                return func(column)
-
-        def isRowSelected(self, row):
-                """
-                Determine whether a table row is selected. 
-                @param : row
-                the row being queried.
-                @return True if the specified row is currently selected, False
-                if not.
-                """
-                func = self.get_dbus_method("isRowSelected", dbus_interface=ATSPI_TABLE)
-                return func(row)
-
-        def isSelected(self, row, column):
-                """
-                Determine whether the cell at a specific row and column is selected.
-                @param : row
-                a row occupied by the cell whose state is being queried. 
-                @param : column
-                a column occupied by the cell whose state is being queried.
-                @return True if the specified cell is currently selected, False
-                if not.
-                """
-                func = self.get_dbus_method("isSelected", dbus_interface=ATSPI_TABLE)
-                return func(row, column)
-
-        def removeColumnSelection(self, column):
-                """
-                Remove the specified column from current column selection, if
-                the table's selection model permits it.
-                @param : column
-                @return True if the specified column was successfully de-selected,
-                False if not.
-                """
-                func = self.get_dbus_method("removeColumnSelection", dbus_interface=ATSPI_TABLE)
-                return func(column)
-
-        def removeRowSelection(self, row):
-                """
-                Remove the specified row from current row selection, if the table's
-                selection model permits it.
-                @param : row
-                @return True if the specified row was successfully de-selected,
-                False if not.
-                """
-                func = self.get_dbus_method("removeRowSelection", dbus_interface=ATSPI_TABLE)
-                return func(row)
-
-        def get_caption(self):
-                accessible = self._pgetter(self._dbus_interface, "caption")
-                return self._cache.create_accessible(self._app_name, accessible,
-                                                     interfaces.ATSPI_ACCESSIBLE)
-        _captionDoc = \
-                """
-                An Accessible which represents of a caption for a Table.
-                """
-        caption = property(fget=get_caption, doc=_captionDoc)
-
-        def get_nColumns(self):
-                return dbus.Int32(self._pgetter(self._dbus_interface, "nColumns"))
-        _nColumnsDoc = \
-                """
-                The total number of columns in this table (including empty columns),
-                exclusive of columns which are programmatically hidden. Columns
-                which are scrolled out of view or clipped by the current viewport
-                are included.
-                """
-        nColumns = property(fget=get_nColumns, doc=_nColumnsDoc)
-
-        def get_nRows(self):
-                return dbus.Int32(self._pgetter(self._dbus_interface, "nRows"))
-        _nRowsDoc = \
-                """
-                The total number of rows in this table (including empty rows),
-                exclusive of any rows which are programmatically hidden. Rows
-                which are merely scrolled out of view are included.
-                """
-        nRows = property(fget=get_nRows, doc=_nRowsDoc)
-
-        def get_nSelectedColumns(self):
-                return dbus.Int32(self._pgetter(self._dbus_interface, "nSelectedColumns"))
-        _nSelectedColumnsDoc = \
-                """
-                The number of columns currently selected. A selected column is
-                one in which all included cells are selected.
-                """
-        nSelectedColumns = property(fget=get_nSelectedColumns, doc=_nSelectedColumnsDoc)
-
-        def get_nSelectedRows(self):
-                return dbus.Int32(self._pgetter(self._dbus_interface, "nSelectedRows"))
-        _nSelectedRowsDoc = \
-                """
-                The number of rows currently selected. A selected row is one
-                in which all included cells are selected.
-                """
-        nSelectedRows = property(fget=get_nSelectedRows, doc=_nSelectedRowsDoc)
-
-        def get_summary(self):
-                accessible = self._pgetter(self._dbus_interface, "summary")
-                return self._cache.create_accessible(self._app_name, accessible,
-                                                     interfaces.ATSPI_ACCESSIBLE)
-        _summaryDoc = \
-                """
-                An accessible object which summarizes the contents of a Table.
-                This object is frequently itself a Table instance, albeit a simplified
-                one.
-                """
-        summary = property(fget=get_summary, doc=_summaryDoc)
-
-# Register the accessible class with the factory.
-accessible_factory.register_accessible_class(ATSPI_TABLE, Table)
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/text.py b/pyatspi/text.py
deleted file mode 100644 (file)
index 7b55ef7..0000000
+++ /dev/null
@@ -1,592 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import dbus
-
-from interfaces import *
-from accessible import Accessible
-from base import Enum
-from factory import accessible_factory
-
-from dbus.types import UInt32
-
-__all__ = [
-           "Text",
-           "TEXT_BOUNDARY_TYPE",
-           "TEXT_BOUNDARY_CHAR",
-           "TEXT_BOUNDARY_WORD_START",
-           "TEXT_BOUNDARY_WORD_END",
-           "TEXT_BOUNDARY_SENTENCE_START",
-           "TEXT_BOUNDARY_SENTENCE_END",
-           "TEXT_BOUNDARY_LINE_START",
-           "TEXT_BOUNDARY_LINE_END",
-           "TEXT_CLIP_TYPE",
-           "TEXT_CLIP_NONE",
-           "TEXT_CLIP_MIN",
-           "TEXT_CLIP_MAX",
-           "TEXT_CLIP_BOTH",
-          ]
-
-#------------------------------------------------------------------------------
-
-class TEXT_BOUNDARY_TYPE(Enum):
-        _enum_lookup = {
-                0:'TEXT_BOUNDARY_CHAR',
-                1:'TEXT_BOUNDARY_WORD_START',
-                2:'TEXT_BOUNDARY_WORD_END',
-                3:'TEXT_BOUNDARY_SENTENCE_START',
-                4:'TEXT_BOUNDARY_SENTENCE_END',
-                5:'TEXT_BOUNDARY_LINE_START',
-                6:'TEXT_BOUNDARY_LINE_END',
-        }
-
-TEXT_BOUNDARY_CHAR = TEXT_BOUNDARY_TYPE(0)
-TEXT_BOUNDARY_LINE_END = TEXT_BOUNDARY_TYPE(6)
-TEXT_BOUNDARY_LINE_START = TEXT_BOUNDARY_TYPE(5)
-TEXT_BOUNDARY_SENTENCE_END = TEXT_BOUNDARY_TYPE(4)
-TEXT_BOUNDARY_SENTENCE_START = TEXT_BOUNDARY_TYPE(3)
-TEXT_BOUNDARY_WORD_END = TEXT_BOUNDARY_TYPE(2)
-TEXT_BOUNDARY_WORD_START = TEXT_BOUNDARY_TYPE(1)
-
-#------------------------------------------------------------------------------
-
-class TEXT_CLIP_TYPE(Enum):
-        _enum_lookup = {
-                0:'TEXT_CLIP_NONE',
-                1:'TEXT_CLIP_MIN',
-                2:'TEXT_CLIP_MAX',
-                3:'TEXT_CLIP_BOTH',
-        }
-
-TEXT_CLIP_BOTH = TEXT_CLIP_TYPE(3)
-TEXT_CLIP_MAX = TEXT_CLIP_TYPE(2)
-TEXT_CLIP_MIN = TEXT_CLIP_TYPE(1)
-TEXT_CLIP_NONE = TEXT_CLIP_TYPE(0)
-
-#------------------------------------------------------------------------------
-
-class Text(Accessible):
-        """
-        The text interface should be implemented by objects which place
-        textual information onscreen as character strings or glyphs.
-        The text interface allows access to textual content, including
-        display attributes and semantic hints associated with runs of
-        text, and access to bounding box information for glyphs and substrings.
-        It also allows portions of textual content to be selected, if
-        the object's StateSet includes STATE_SELECTABLE_TEXT.
-        In some cases a Text object may have, as its content, an empty
-        string. In particular this can occur in the case of Hypertext
-        objects which do not display explicitly textual information onscreen,
-        as Hypertext is derived from the Text interface. 
-        Typographic and semantic attributes of onscreen textual content,
-        for instance typeface, weight, language, and such qualities as
-        'emphasis' or 'blockquote', are represented as text attributes.
-        Contiguous sequences of characters over which these attributes
-        are unchanged are referred to as "attribute runs", and are available
-        via Text::getAttributeRun. Where possible, implementing clients
-        will report textual attributes which are the same over the entire
-        text object, for instance those inherited from a default or document-scope
-        style, via getDefaultAttributes instead of reporting them explicitly
-        for each character. Therefore, for any span of text, the attributes
-        in effect are the union of the set returned by Text::getDefaultAttributes,
-        and the set returned at a particular character offset via Text::getAttributeRun.
-        """
-
-        def addSelection(self, index):
-                """
-                The result of calling addSelection on objects which already have
-                one selection present, and which do not include STATE_MULTISELECTABLE,
-                is undefined, other than the return value. 
-                @return True of the selection was successfully added, False otherwise.
-                Selection may fail if the object does not support selection of
-                text (see STATE_SELECTABLE_TEXT), if the object does not support
-                multiple selections and a selection is already defined, or for
-                other reasons (for instance if the user does not have permission
-                to copy the text into the relevant selection buffer).
-                """
-                func = self.get_dbus_method("addSelection", dbus_interface=ATSPI_TEXT)
-                return func(index)
-
-        def getAttributeRun(self, offset):
-                """
-                Query a particular text object for the text attributes defined
-                at a given offset, obtaining the start and end of the "attribute
-                run" over which these attributes are currently invariant. Text
-                attributes are those presentational, typographic, or semantic
-                attributes or qualitites which apply to a range of text specifyable
-                by starting and ending offsets. Attributes relevant to localization
-                should be provided in accordance with the w3c "Internationalization
-                and Localization Markup Requirements", http://www.w3.org/TR/2005/WD-itsreq-20051122/
-                Other text attributes should choose their names and value semantics
-                in accordance with relevant standards such as CSS level 2 (http://www.w3.org/TR/1998/REC-CSS2-19980512),
-                XHTML 1.0 (http://www.w3.org/TR/2002/REC-xhtml1-20020801), and
-                WICD (http://www.w3.org/TR/2005/WD-WICD-20051121/). Those attributes
-                from the aforementioned specifications and recommendations which
-                do not concern typographic, presentational, or semantic aspects
-                of text should be exposed via the more general Accessible::getAttributes()
-                API (if at all).
-                For example, CSS attributes which should be exposed on text (either
-                as default attributes, or as explicitly-set attributes when non-default
-                values are specified in the content view) include the Font attributes
-                (i.e. "css2:font-weight", "css2:font-style"), the "css2:color"
-                and "css2:background-color" attributes, and "css2:text-decoration"
-                attribute.
-                If includeDefaults is TRUE, then this AttributeSet should include
-                the default attributes as well as those which are explicitly
-                assigned to the attribute run in question. startOffset and endOffset
-                will be back-filled to indicate the start and end of the attribute
-                run which contains 'offset' - an attribute run is a contiguous
-                section of text whose attributes are homogeneous. 
-                @param : offset
-                the offset of the character whose attributes will be reported.
-                @param : startOffset
-                backfilled with the starting offset of the character range over
-                which all text attributes match those of offset, i.e. the start
-                of the homogeneous attribute run including offset. 
-                @param : endOffset
-                backfilled with the offset of the first character past the character
-                range over which all text attributes match those of offset, i.e.
-                the character immediately after the homogeneous attribute run
-                including offset. 
-                @param : includeDefaults
-                if False, the call should only return those attributes which
-                are explicitly set on the current attribute run, omitting any
-                attributes which are inherited from the default values. See also
-                Text::getDefaultAttributes.
-                @return the AttributeSet defined at offset, optionally including
-                the 'default' attributes.
-                """
-                func = self.get_dbus_method("getAttributeRun", dbus_interface=ATSPI_TEXT)
-                [attrs, startOffset, endOffset] = func(offset, includeDefaults)
-                dict = [key + ':' + value for key, value in attrs.values()]
-                return [dict, startOffset, endOffset]
-
-        def getAttributeValue(self, offset, attributeName):
-                """
-                Get the string value of a named attribute at a given offset,
-                if defined. 
-                @param : offset
-                the offset of the character for which the attribute run is to
-                be obtained. 
-                @param : attributeName
-                the name of the attribute for which the value is to be returned,
-                if defined. 
-                @param : startOffset
-                back-filled with the offset of the first character in the attribute
-                run containing the character at offset. 
-                @param : endOffset
-                back-filled with the offset of the first character past the end
-                of the attribute run containing the character at offset. 
-                @param : defined
-                back-filled with True if the attributeName has a defined value
-                at offset, False otherwise. 
-                @return the value of attribute (name-value pair) corresponding
-                to "name", if defined.
-                """
-                func = self.get_dbus_method("getAttributeValue", dbus_interface=ATSPI_TEXT)
-                return func(offset, attributeName)
-
-        def getAttributes(self, offset):
-                """
-                getAttributes is deprecated in favor of getAttributeRun. 
-                @return the attributes at offset, as a semicolon-delimited set
-                of colon-delimited name-value pairs.
-                """
-                func = self.get_dbus_method("getAttributes", dbus_interface=ATSPI_TEXT)
-                [attrs, startOffset, endOffset] = func(dbus.Int32(offset))
-                dict = [key + ':' + value for key, value in attrs]
-                return [dict, startOffset, endOffset]
-
-        def getBoundedRanges(self, x, y, width, height, coordType, xClipType, yClipType):
-                #TODO Return a list of range structures
-                """
-                Return the text content within a bounding box, as a list of Range
-                structures. Depending on the TEXT_CLIP_TYPE parameters, glyphs
-                which are clipped by the bounding box (i.e. which lie partially
-                inside and partially outside it) may or may not be included in
-                the ranges returned. 
-                @param : x
-                the minimum x ( i.e. leftmost) coordinate of the bounding box.
-                @param : y
-                the minimum y coordinate of the bounding box. 
-                @param : width
-                the horizontal size of the bounding box. The rightmost bound
-                of the bounding box is (x + width); 
-                @param : height
-                the vertical size of the bounding box. The maximum y value of
-                the bounding box is (y + height); 
-                @param : coordType
-                If 0, the above coordinates are interpreted as pixels relative
-                to corner of the screen; if 1, the coordinates are interpreted
-                as pixels relative to the corner of the containing toplevel window.
-                @param : xClipType
-                determines whether text which intersects the bounding box in
-                the x direction is included. 
-                @param : yClipType
-                determines whether text which intersects the bounding box in
-                the y direction is included.
-                """
-                func = self.get_dbus_method("getBoundedRanges", dbus_interface=ATSPI_TEXT)
-                return func(x, y, width, height, UInt32(coordType), xClipType, yClipType)
-
-        def getCharacterAtOffset(self, offset):
-                """
-                @param : offset
-                position
-                @return an unsigned long integer whose value corresponds to the
-                UCS-4 representation of the character at the specified text offset,
-                or 0 if offset is out of range.
-                """
-                func = self.get_dbus_method("getCharacterAtOffset", dbus_interface=ATSPI_TEXT)
-                return func(offset)
-
-        def getCharacterExtents(self, offset, x, y, width, height, coordType):
-                """
-                Obtain a the bounding box, as x, y, width, and height, of the
-                character or glyph at a particular character offset in this object's
-                text content. The coordinate system in which the results are
-                reported is specified by coordType. If an onscreen glyph corresponds
-                to multiple character offsets, for instance if the glyph is a
-                ligature, the bounding box reported will include the entire glyph
-                and therefore may apply to more than one character offset. 
-                @param : offset
-                the character offset of the character or glyph being queried.
-                @param : x
-                the minimum horizontal coordinate of the bounding box of the
-                glyph representing the character at offset. 
-                @param : y
-                the minimum vertical coordinate of the bounding box of the glyph
-                representing the character at offset. 
-                @param : width
-                the horizontal extent of the bounding box of the glyph representing
-                the character at offset. 
-                @param : height
-                the vertical extent of the bounding box of the glyph representing
-                the character at offset. 
-                @param : coordType
-                If 0, the results will be reported in screen coordinates, i.e.
-                in pixels relative to the upper-left corner of the screen, with
-                the x axis pointing right and the y axis pointing down. If 1,
-                the results will be reported relative to the containing toplevel
-                window, with the x axis pointing right and the y axis pointing
-                down.
-                """
-                func = self.get_dbus_method("getCharacterExtents", dbus_interface=ATSPI_TEXT)
-                return func(offset, x, y, width, height, UInt32(coordType))
-
-        def getDefaultAttributeSet(self):
-                """
-                Return an AttributeSet containing the text attributes which apply
-                to all text in the object by virtue of the default settings of
-                the document, view, or user agent; e.g. those attributes which
-                are implied rather than explicitly applied to the text object.
-                For instance, an object whose entire text content has been explicitly
-                marked as 'bold' will report the 'bold' attribute via getAttributeRun(),
-                whereas an object whose text weight is inspecified may report
-                the default or implied text weight in the default AttributeSet.
-                """
-                func = self.get_dbus_method("getDefaultAttributeSet", dbus_interface=ATSPI_TEXT)
-                return [key + ':' + value for key, value in func().values()]
-
-        def getDefaultAttributes(self):
-                """
-                Deprecated in favor of getDefaultAttributeSet. 
-                @return the attributes which apply to the entire text content,
-                but which were not explicitly specified by the content creator.
-                """
-                func = self.get_dbus_method("getDefaultAttributes", dbus_interface=ATSPI_TEXT)
-                return ';'.join([key + ':' + value for key, value in func().iteritems()])
-
-        def getNSelections(self):
-                """
-                Obtain the number of separate, contiguous selections in the current
-                Text object. Text objects which do not implement selection of
-                discontiguous text regions will always return '0' or '1'. Note
-                that "contiguous" is defined by continuity of the offsets, i.e.
-                a text 'selection' is defined by a start/end offset pair. In
-                the case of bidirectional text, this means that a continguous
-                selection may appear visually discontiguous, and vice-versa.
-                @return the number of contiguous selections in the current Text
-                object.
-                """
-                func = self.get_dbus_method("getNSelections", dbus_interface=ATSPI_TEXT)
-                return func()
-
-        def getOffsetAtPoint(self, x, y, coordType):
-                """
-                Get the offset of the character at a given onscreen coordinate.
-                The coordinate system used to interpret x and y is determined
-                by parameter coordType. 
-                @param : x
-                @param : y
-                @param : coordType
-                if 0, the input coordinates are interpreted relative to the entire
-                screen, if 1, they are relative to the toplevel window containing
-                this Text object. 
-                @return the text offset (as an offset into the character array)
-                of the glyph whose onscreen bounds contain the point x,y, or
-                -1 if the point is outside the bounds of any glyph.
-                """
-                func = self.get_dbus_method("getOffsetAtPoint", dbus_interface=ATSPI_TEXT)
-                return func(x, y, UInt32(coordType))
-
-        def getRangeExtents(self, startOffset, endOffset, coordType):
-                """
-                Obtain the bounding box which entirely contains a given text
-                range. Negative values may be returned for the bounding box parameters
-                in the event that all or part of the text range is offscreen
-                or not mapped to the screen. 
-                @param : startOffset
-                the offset of the first character in the specified range. 
-                @param : endOffset
-                the offset of the character immediately after the last character
-                in the specified range. 
-                @param : x
-                an integer parameter which is back-filled with the minimum horizontal
-                coordinate of the resulting bounding box. 
-                @param : y
-                an integer parameter which is back-filled with the minimum vertical
-                coordinate of the resulting bounding box. 
-                @param : width
-                an integer parameter which is back-filled with the horizontal
-                extent of the bounding box. 
-                @param : height
-                an integer parameter which is back-filled with the vertical extent
-                of the bounding box. 
-                @param : coordType
-                If 0, the above coordinates are reported in pixels relative to
-                corner of the screen; if 1, the coordinates are reported relative
-                to the corner of the containing toplevel window.
-                """
-                func = self.get_dbus_method("getRangeExtents", dbus_interface=ATSPI_TEXT)
-                return func(startOffset, endOffset, UInt32(coordType))
-
-        def getSelection(self, selectionNum):
-                """
-                The result of calling getSelection with an out-of-range selectionNum
-                (i.e. for a selection which does not exist) is not strictly defined,
-                but should set endOffset equal to startOffset.
-                @param : selectionNum
-                indicates which of a set of non-contiguous selections to modify.
-                @param : startOffset
-                back-filled with the starting offset of the resulting substring,
-                if one exists. 
-                @param : endOffset
-                back-filled with the offset of the character immediately following
-                the resulting substring, if one exists. 
-                """
-                func = self.get_dbus_method("getSelection", dbus_interface=ATSPI_TEXT)
-                return func(selectionNum)
-
-        def getText(self, startOffset, endOffset):
-                """
-                Obtain all or part of the onscreen textual content of a Text
-                object. If endOffset is specified as "-1", then this method will
-                return the entire onscreen textual contents of the Text object.
-                @param : startOffset
-                back-filled with the starting offset of the resulting substring,
-                if one exists. 
-                @param : endOffset
-                back-filled with the offset of the character immediately following
-                the resulting substring, if one exists. 
-                @return the textual content of the current Text object beginning
-                startOffset (inclusive) up to but not including the character
-                at endOffset.
-                """
-                func = self.get_dbus_method("getText", dbus_interface=ATSPI_TEXT)
-                if not endOffset:
-                        endOffset = -1
-                return func(dbus.Int32(startOffset), dbus.Int32(endOffset))
-
-        def getTextAfterOffset(self, offset, type):
-                """
-                Obtain a subset of the text content of an object which entirely
-                follows offset, delimited by character, word, line, or sentence
-                boundaries as specified by type. The starting and ending offsets
-                of the resulting substring are returned in startOffset and endOffset.
-                By definition, if such a substring exists, startOffset must be
-                greater than offset. 
-                @param : offset
-                the offset from which the substring search begins, and which
-                must lie before the returned substring. 
-                @param : type
-                the text-boundary delimiter which determines whether the returned
-                text constitures a character, word, line, or sentence (and possibly
-                attendant whitespace), and whether the start or ending of such
-                a substring forms the boundary condition. 
-                @param : startOffset
-                back-filled with the starting offset of the resulting substring,
-                if one exists. 
-                @param : endOffset
-                back-filled with the offset of the character immediately following
-                the resulting substring, if one exists. 
-                @return a string which is a substring of the text content of
-                the object, delimited by the specified boundary condition.
-                """
-                func = self.get_dbus_method("getTextAfterOffset", dbus_interface=ATSPI_TEXT)
-                return func(offset, type)
-
-        def getTextAtOffset(self, offset, type):
-                """
-                Obtain a subset of the text content of an object which includes
-                the specified offset, delimited by character, word, line, or
-                sentence boundaries as specified by type. The starting and ending
-                offsets of the resulting substring are returned in startOffset
-                and endOffset. 
-                @param : offset
-                the offset from which the substring search begins, and which
-                must lie within the returned substring. 
-                @param : type
-                the text-boundary delimiter which determines whether the returned
-                text constitures a character, word, line, or sentence (and possibly
-                attendant whitespace), and whether the start or ending of such
-                a substring forms the boundary condition. 
-                @param : startOffset
-                back-filled with the starting offset of the resulting substring,
-                if one exists. 
-                @param : endOffset
-                back-filled with the offset of the character immediately following
-                the resulting substring, if one exists. 
-                @return a string which is a substring of the text content of
-                the object, delimited by the specified boundary condition.
-                """
-                func = self.get_dbus_method("getTextAtOffset", dbus_interface=ATSPI_TEXT)
-                return func(offset, type)
-
-        def getTextBeforeOffset(self, offset, type):
-                """
-                Obtain a subset of the text content of an object which entirely
-                precedes offset, delimited by character, word, line, or sentence
-                boundaries as specified by type. The starting and ending offsets
-                of the resulting substring are returned in startOffset and endOffset.
-                By definition, if such a substring exists, endOffset is less
-                than or equal to offset. 
-                @param : offset
-                the offset from which the substring search begins. 
-                @param : type
-                the text-boundary delimiter which determines whether the returned
-                text constitures a character, word, line, or sentence (and possibly
-                attendant whitespace), and whether the start or ending of such
-                a substring forms the boundary condition. 
-                @param : startOffset
-                back-filled with the starting offset of the resulting substring,
-                if one exists. 
-                @param : endOffset
-                back-filled with the offset of the character immediately following
-                the resulting substring, if one exists. 
-                @return a string which is a substring of the text content of
-                the object, delimited by the specified boundary condition.
-                """
-                func = self.get_dbus_method("getTextBeforeOffset", dbus_interface=ATSPI_TEXT)
-                return func(offset, type)
-
-        def removeSelection(self, selectionNum):
-                """
-                Deselect the text contained in the specified selectionNum, if
-                such a selection exists, otherwise do nothing. Removal of a non-existant
-                selectionNum has no effect. 
-                @param : selectionNum
-                indicates which of a set of non-contiguous selections to modify.
-                @return True if the selection was successfully removed, False
-                otherwise.
-                """
-                func = self.get_dbus_method("removeSelection", dbus_interface=ATSPI_TEXT)
-                return func(selectionNum)
-
-        def setCaretOffset(self, offset):
-                """
-                Programmatically move the text caret (visible or virtual, as
-                above) to a given position. 
-                @param : offset
-                a long int indicating the desired character offset. Not all implementations
-                of Text will honor setCaretOffset requests, so the return value
-                below should be checked by the client. 
-                @return TRUE if the request was carried out, or FALSE if the
-                caret could not be moved to the requested position.
-                """
-                func = self.get_dbus_method("setCaretOffset", dbus_interface=ATSPI_TEXT)
-                return func(offset)
-
-        def setSelection(self, selectionNum, startOffset, endOffset):
-                """
-                Modify an existing selection's start or ending offset.
-                Calling setSelection for a selectionNum that is not already defined
-                has no effect. The result of calling setSelection with a selectionNum
-                greater than 0 for objects that do not include STATE_MULTISELECTABLE
-                is undefined. 
-                @param : selectionNum
-                indicates which of a set of non-contiguous selections to modify.
-                @param : startOffset
-                the new starting offset for the selection 
-                @param : endOffset
-                the new ending offset for the selection 
-                @return True if the selection corresponding to selectionNum is
-                successfully modified, False otherwise.
-                """
-                func = self.get_dbus_method("setSelection", dbus_interface=ATSPI_TEXT)
-                return func(selectionNum, startOffset, endOffset)
-
-        def get_caretOffset(self):
-                return dbus.Int32(self._pgetter(self._dbus_interface, "caretOffset"))
-        _caretOffsetDoc = \
-                """
-                The current offset of the text caret in the Text object. This
-                caret may be virtual, e.g. non-visual and notional-only, but
-                if an onscreen representation of the caret position is visible,
-                it will correspond to this offset. The caret offset is given
-                as a character offset, as opposed to a byte offset into a text
-                buffer or a column offset.
-                """
-        caretOffset = property(fget=get_caretOffset, doc=_caretOffsetDoc)
-
-        def get_characterCount(self):
-                return dbus.Int32(self._pgetter(self._dbus_interface, "characterCount"))
-        _characterCountDoc = \
-                """
-                The total current number of characters in the Text object, including
-                whitespace and non-spacing characters.
-                """
-        characterCount = property(fget=get_characterCount, doc=_characterCountDoc)
-
-        class Range(list):
-                def __new__(cls, startOffset, endOffset, content, data):
-                        list.__new__(cls, (startOffset, endOffset, content, data))
-                def __init__(self, startOffset, endOffset, content, data):
-                        list.__init__(self, (startOffset, endOffset, content, data))
-
-                def _get_startOffset(self):
-                        return self[0]
-                def _set_startOffset(self, val):
-                        self[0] = val
-                startOffset = property(fget=_get_startOffset, fset=_set_startOffset)
-                def _get_endOffset(self):
-                        return self[1]
-                def _set_endOffset(self, val):
-                        self[1] = val
-                endOffset = property(fget=_get_endOffset, fset=_set_endOffset)
-                def _get_content(self):
-                        return self[2]
-                def _set_content(self, val):
-                        self[2] = val
-                content = property(fget=_get_content, fset=_set_content)
-                def _get_data(self):
-                        return self[3]
-                def _set_data(self, val):
-                        self[3] = val
-                data = property(fget=_get_data, fset=_set_data)
-
-# Register the accessible class with the factory.
-accessible_factory.register_accessible_class(ATSPI_TEXT, Text)
-
-#END----------------------------------------------------------------------------
diff --git a/pyatspi/utils.py b/pyatspi/utils.py
deleted file mode 100644 (file)
index 61cad1e..0000000
+++ /dev/null
@@ -1,331 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-#copyright: Copyright (c) 2005, 2007 IBM Corporation
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-#Portions of this code originally licensed and copyright (c) 2005, 2007
-#IBM Corporation under the BSD license, available at
-#U{http://www.opensource.org/licenses/bsd-license.php}
-
-#authors: Peter Parente, Mark Doffman
-
-import relation
-import state
-import registry
-
-__all__ = [
-                "setCacheLevel",
-                "getCacheLevel",
-                "clearCache",
-                "printCache",
-                "getInterfaceIID",
-                "getInterfaceName",
-                "listInterfaces",
-                "stringToConst",
-                "stateToString",
-                "relationToString",
-                "allModifiers",
-                "findDescendant",
-                "findAllDescendants",
-                "findAncestor",
-                "getPath",
-         ]
-
-def setCacheLevel(level):
-        pass
-
-def getCacheLevel():
-        return None
-
-def clearCache():
-        pass
-
-def printCache():
-        print "Print cache function is deprecated";
-
-def getInterfaceIID(obj):
-        """
-        Gets the ID of an interface class or object in string format for use in
-        queryInterface.
-
-        @param obj: Class representing an AT-SPI interface or instance
-        @type obj: object
-        @return: IID for the interface
-        @rtype: string
-        @raise AttributeError: When the parameter does not provide typecode info
-
-        WARNING!! DEPRECATED!!
-
-        In current D-Bus version of pyatspi this simply returns a null string.
-        """
-        return ""
-
-def getInterfaceName(obj):
-        """
-        Gets the human readable name of an interface class or object in string
-        format.
-
-        @param obj: Class representing an AT-SPI interface or instance
-        @type obj: class
-        @return: Name of the interface
-        @rtype: string
-        @raise AttributeError: When the parameter does not provide typecode info
-        """
-        return obj._dbus_interface.lstrip("org.freedesktop.atspi.")
-
-def listInterfaces(obj):
-        """
-        Gets a list of the names of all interfaces supported by this object. The
-        names are the short-hand interface names like "Accessible" and "Component",
-        not the full interface identifiers.
-
-        @param obj: Arbitrary object to query for all accessibility related
-        interfaces. Must provide a queryInterface method.
-        @type obj: object
-        @return: Set of supported interface names
-        @rtype: set
-        @raise AttributeError: If the object provide does not implement
-        queryInterface
-        """
-        return [itf.lstrip("org.freedesktop.atspi.") for itf in obj.interfaces]
-
-def stringToConst(prefix, suffix):
-        """
-        Maps a string name to an AT-SPI constant. The rules for the mapping are as 
-        follows:
-                - The prefix is captalized and has an _ appended to it.
-                - All spaces in the suffix are mapped to the _ character. 
-                - All alpha characters in the suffix are mapped to their uppercase.
-
-        The resulting name is used with getattr to look up a constant with that name
-        in the L{constants} module. If such a constant does not exist, the string
-        suffix is returned instead.
-
-        This method allows strings to be used to refer to roles, relations, etc.
-        without direct access to the constants. It also supports the future expansion
-        of roles, relations, etc. by allowing arbitrary strings which may or may not
-        map to the current standard set of roles, relations, etc., but may still
-        match some non-standard role, relation, etc. being reported by an
-        application.
-
-        @param prefix: Prefix of the constant name such as role, relation, state, 
-                text, modifier, key
-        @type prefix: string
-        @param suffix: Name of the role, relation, etc. to use to lookup the constant
-        @type suffix: string
-        @return: The matching constant value
-        @rtype: object
-        """
-        name = prefix.upper()+'_'+suffix.upper().replace(' ', '_')
-        return getattr(constants, name, suffix)
-
-def stateToString(value):
-        """
-        Converts a state value to a string based on the name of the state constant in
-        the L{constants} module that has the given value.
-
-        @param value: An AT-SPI state
-        @type value: Accessibility.StateType
-        @return: Human readable, untranslated name of the state
-        @rtype: string
-        """
-        return state.STATE_VALUE_TO_NAME.get(value)
-
-def relationToString(value):
-        """
-        Converts a relation value to a string based on the name of the state constant
-        in the L{constants} module that has the given value.
-
-        @param value: An AT-SPI relation
-        @type value: Accessibility.RelationType
-        @return: Human readable, untranslated name of the relation
-        @rtype: string
-        """
-        return relation.RELATION_VALUE_TO_NAME.get(value)
-
-def allModifiers():
-        """
-        Generates all possible keyboard modifiers for use with 
-        L{registry.Registry.registerKeystrokeListener}.
-        """
-        mask = 0
-        while mask <= (1 << registry.MODIFIER_NUMLOCK):
-                yield mask
-                mask += 1
-
-def findDescendant(acc, pred, breadth_first=False):
-        """
-        Searches for a descendant node satisfying the given predicate starting at 
-        this node. The search is performed in depth-first order by default or
-        in breadth first order if breadth_first is True. For example,
-
-        my_win = findDescendant(lambda x: x.name == 'My Window')
-
-        will search all descendants of x until one is located with the name 'My
-        Window' or all nodes are exausted. Calls L{_findDescendantDepth} or
-        L{_findDescendantBreadth} to start the recursive search.
-
-        @param acc: Root accessible of the search
-        @type acc: Accessibility.Accessible
-        @param pred: Search predicate returning True if accessible matches the 
-                        search criteria or False otherwise
-        @type pred: callable
-        @param breadth_first: Search breadth first (True) or depth first (False)?
-        @type breadth_first: boolean
-        @return: Accessible matching the criteria or None if not found
-        @rtype: Accessibility.Accessible or None
-        """
-        if breadth_first:
-                return _findDescendantBreadth(acc, pred)
-
-        for child in acc:
-                try:
-                        ret = _findDescendantDepth(acc, pred)
-                except Exception:
-                        ret = None
-                if ret is not None: return ret
-
-def _findDescendantBreadth(acc, pred):
-        """
-        Internal function for locating one descendant. Called by L{findDescendant} to
-        start the search.
-
-        @param acc: Root accessible of the search
-        @type acc: Accessibility.Accessible
-        @param pred: Search predicate returning True if accessible matches the 
-                        search criteria or False otherwise
-        @type pred: callable
-        @return: Matching node or None to keep searching
-        @rtype: Accessibility.Accessible or None
-        """
-        for child in acc:
-                try:
-                        if pred(child): return child
-                except Exception:
-                        pass
-        for child in acc:
-                try:
-                        ret = _findDescendantBreadth(child, pred)
-                except Exception:
-                        ret = None
-                if ret is not None: return ret
-
-def _findDescendantDepth(acc, pred):
-        """
-        Internal function for locating one descendant. Called by L{findDescendant} to
-        start the search.
-
-        @param acc: Root accessible of the search
-        @type acc: Accessibility.Accessible
-        @param pred: Search predicate returning True if accessible matches the 
-                search criteria or False otherwise
-        @type pred: callable
-        @return: Matching node or None to keep searching
-        @rtype: Accessibility.Accessible or None
-        """
-        try:
-                if pred(acc): return acc
-        except Exception:
-                pass
-        for child in acc:
-                try:
-                        ret = _findDescendantDepth(child, pred)
-                except Exception:
-                        ret = None
-                if ret is not None: return ret
-
-def findAllDescendants(acc, pred):
-        """
-        Searches for all descendant nodes satisfying the given predicate starting at 
-        this node. Does an in-order traversal. For example,
-
-        pred = lambda x: x.getRole() == pyatspi.ROLE_PUSH_BUTTON
-        buttons = pyatspi.findAllDescendants(node, pred)
-
-        will locate all push button descendants of node.
-
-        @param acc: Root accessible of the search
-        @type acc: Accessibility.Accessible
-        @param pred: Search predicate returning True if accessible matches the 
-                        search criteria or False otherwise
-        @type pred: callable
-        @return: All nodes matching the search criteria
-        @rtype: list
-        """
-        matches = []
-        _findAllDescendants(acc, pred, matches)
-        return matches
-
-def _findAllDescendants(acc, pred, matches):
-        """
-        Internal method for collecting all descendants. Reuses the same matches
-        list so a new one does not need to be built on each recursive step.
-        """
-        for child in acc:
-                try:
-                        if pred(child): matches.append(child)
-                except Exception:
-                        pass
-                _findAllDescendants(child, pred, matches)
-        
-def findAncestor(acc, pred):
-        """
-        Searches for an ancestor satisfying the given predicate. Note that the
-        AT-SPI hierarchy is not always doubly linked. Node A may consider node B its
-        child, but B is not guaranteed to have node A as its parent (i.e. its parent
-        may be set to None). This means some searches may never make it all the way
-        up the hierarchy to the desktop level.
-
-        @param acc: Starting accessible object
-        @type acc: Accessibility.Accessible
-        @param pred: Search predicate returning True if accessible matches the 
-                search criteria or False otherwise
-        @type pred: callable
-        @return: Node matching the criteria or None if not found
-        @rtype: Accessibility.Accessible
-        """
-        if acc is None:
-                # guard against bad start condition
-                return None
-        while 1:
-                if acc.parent is None:
-                        # stop if there is no parent and we haven't returned yet
-                        return None
-                try:
-                        if pred(acc.parent): return acc.parent
-                except Exception:
-                        pass
-                # move to the parent
-                acc = acc.parent
-
-def getPath(acc):
-        """
-        Gets the path from the application ancestor to the given accessible in
-        terms of its child index at each level.
-
-        @param acc: Target accessible
-        @type acc: Accessibility.Accessible
-        @return: Path to the target
-        @rtype: list of integer
-        @raise LookupError: When the application accessible cannot be reached
-        """
-        path = []
-        while 1:
-                if acc.parent is None:
-                        path.reverse()
-                        return path
-                try:
-                        path.append(acc.getIndexInParent())
-                except Exception:
-                        raise LookupError
-                acc = acc.parent
diff --git a/pyatspi/value.py b/pyatspi/value.py
deleted file mode 100644 (file)
index 121d5c8..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#Copyright (C) 2008 Codethink Ltd
-
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License version 2 as published by the Free Software Foundation.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
-#You should have received a copy of the GNU Lesser General Public License
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-from interfaces import *
-from accessible import Accessible
-from factory import accessible_factory
-
-import dbus
-
-__all__ = [
-           "Value",
-          ]
-
-#------------------------------------------------------------------------------
-
-class Value(Accessible):
-        """
-        An interface supporting controls which allow a one-dimensional,
-        scalar quantity to be modified or which reflect a scalar quantity.
-        (If STATE_EDITABLE is not present, the valuator is treated as
-        "read only".
-        """
-
-        def get_currentValue(self):
-                return dbus.Double(self._pgetter(self._dbus_interface, "currentValue"))
-        def set_currentValue(self, value):
-                self._psetter(self._dbus_interface, "currentValue", dbus.Double(value, variant_level=1))
-        _currentValueDoc = \
-                """
-                The current value of the valuator.
-                """
-        currentValue = property(fget=get_currentValue, fset=set_currentValue, doc=_currentValueDoc)
-
-        def get_maximumValue(self):
-                return dbus.Double(self._pgetter(self._dbus_interface, "maximumValue"))
-        _maximumValueDoc = \
-                """
-                The maximum value allowed by this valuator.
-                """
-        maximumValue = property(fget=get_maximumValue, doc=_maximumValueDoc)
-
-        def get_minimumIncrement(self):
-                return dbus.Double(self._pgetter(self._dbus_interface, "minimumIncrement"))
-        _minimumIncrementDoc = \
-                """
-                The smallest incremental change which this valuator allows. If
-                0, the incremental changes to the valuator are limited only by
-                the precision of a double precision value on the platform.
-                """
-        minimumIncrement = property(fget=get_minimumIncrement, doc=_minimumIncrementDoc)
-
-        def get_minimumValue(self):
-                return dbus.Double(self._pgetter(self._dbus_interface, "minimumValue"))
-        _minimumValueDoc = \
-                """
-                The minimum value allowed by this valuator.
-                """
-        minimumValue = property(fget=get_minimumValue, doc=_minimumValueDoc)
-
-# Register the accessible class with the factory.
-accessible_factory.register_accessible_class(ATSPI_VALUE, Value)
-
-#END----------------------------------------------------------------------------
diff --git a/tests/Makefile.am b/tests/Makefile.am
deleted file mode 100644 (file)
index 8daea17..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-SUBDIRS = dummyatk apps data pyatspi cspi
-
-#TESTS=testrunner.py
-TESTS_ENVIRONMENT = PYTHONPATH=$(abs_top_srcdir)/python                                        \
-                   ATSPI_INTROSPECTION_PATH=$(top_srcdir)/xml/introspection            \
-                   TEST_DATA_DIRECTORY=$(abs_top_srcdir)/tests/data                    \
-                   TEST_ATSPI_LIBRARY=$(abs_top_srcdir)/atk-adaptor/.libs/libspiatk.so \
-                   TEST_MODULES_DIRECTORY=$(abs_top_srcdir)/tests/apps/.libs           \
-                   TEST_APPLICATION=$(abs_top_srcdir)/tests/apps/test-application
-
-CLEANFILES = *.pyc
diff --git a/tests/apps/Makefile.am b/tests/apps/Makefile.am
deleted file mode 100644 (file)
index 12a3257..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-check_PROGRAMS = test-application
-check_LTLIBRARIES = libnoopapp.la \
-                   libaccessibleapp.la \
-                   libcomponentapp.la \
-                   libactionapp.la \
-                   librelationapp.la
-
-test_application_CFLAGS = $(DBUS_GLIB_CFLAGS)  \
-                         $(ATK_CFLAGS)         \
-                         $(GMODULE_CFLAGS)     \
-                         -I$(top_srcdir)
-
-test_application_LDADD = $(DBUS_GLIB_LIBS)     \
-                        $(GMODULE_LIBS)        \
-                        $(ATK_LIBS)
-
-test_application_SOURCES = test-application.c
-
-
-TEST_APP_CFLAGS = $(ATK_CFLAGS) $(GMODULE_CFLAGS) -I$(top_srcdir) -I$(top_srcdir)/tests/dummyatk/
-TEST_APP_LDFLAGS = -no-undefined -module -avoid-version -rpath /a/fake/path
-TEST_APP_LIBADD = $(ATK_LIBS) $(GMODULE_LIBS) $(top_builddir)/tests/dummyatk/libdummyatk.la
-
-libnoopapp_la_CFLAGS = $(TEST_APP_CFLAGS)
-libnoopapp_la_LDFLAGS = $(TEST_APP_LDFLAGS)
-libnoopapp_la_LIBADD = $(TEST_APP_LIBADD)
-libnoopapp_la_SOURCES = noop-app.c
-
-libaccessibleapp_la_CFLAGS = $(TEST_APP_CFLAGS) $(LIB_XML_CFLAGS)
-libaccessibleapp_la_LDFLAGS = $(TEST_APP_LDFLAGS)
-libaccessibleapp_la_LIBADD = $(TEST_APP_LIBADD) $(LIB_XML_LIBS)
-libaccessibleapp_la_SOURCES = accessible-app.c atk-object-xml-loader.c atk-object-xml-loader.h
-
-libcomponentapp_la_CFLAGS = $(TEST_APP_CFLAGS)
-libcomponentapp_la_LDFLAGS = $(TEST_APP_LDFLAGS)
-libcomponentapp_la_LIBADD = $(TEST_APP_LIBADD)
-libcomponentapp_la_SOURCES = component-app.c
-
-libactionapp_la_CFLAGS = $(TEST_APP_CFLAGS)
-libactionapp_la_LDFLAGS = $(TEST_APP_LDFLAGS)
-libactionapp_la_LIBADD = $(TEST_APP_LIBADD)
-libactionapp_la_SOURCES = action-app.c
-
-librelationapp_la_CFLAGS = $(TEST_APP_CFLAGS)
-librelationapp_la_LDFLAGS = $(TEST_APP_LDFLAGS)
-librelationapp_la_LIBADD = $(TEST_APP_LIBADD)
-librelationapp_la_SOURCES = relation-app.c
diff --git a/tests/apps/accessible-app.c b/tests/apps/accessible-app.c
deleted file mode 100644 (file)
index 2796bf5..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-#include <gmodule.h>
-#include <atk/atk.h>
-#include <my-atk.h>
-
-#include "atk-object-xml-loader.h"
-
-static gchar *tdata_path = NULL;
-
-static AtkObject *root_accessible;
-
-static AtkStateType states[] =
-{
-  ATK_STATE_MULTI_LINE,
-  ATK_STATE_MODAL,
-  ATK_STATE_INDETERMINATE,
-  ATK_STATE_SUPPORTS_AUTOCOMPLETION,
-  ATK_STATE_VERTICAL
-};
-
-#define OBJECT_TEST_1 "accessible-test.xml"
-
-G_MODULE_EXPORT void
-test_init (gchar *path)
-{
-  AtkStateSet *ss;
-  gchar *td;
-
-  if (path == NULL)
-     g_error("No test data path provided");
-  tdata_path = path;
-
-  td = g_build_path(G_DIR_SEPARATOR_S, tdata_path, OBJECT_TEST_1, NULL);
-  root_accessible = ATK_OBJECT(atk_object_xml_parse(td));
-  g_free(td);
-
-  ss = atk_object_ref_state_set(ATK_OBJECT(root_accessible));
-  atk_state_set_add_states(ss, states, 5);
-  g_object_unref(G_OBJECT(ss));
-}
-
-G_MODULE_EXPORT void
-test_next (int argc, char *argv[])
-{
-  ;
-}
-
-G_MODULE_EXPORT void
-test_finished (int argc, char *argv[])
-{
-  ;
-}
-
-G_MODULE_EXPORT AtkObject *
-test_get_root (void)
-{
-  return root_accessible;
-}
diff --git a/tests/apps/action-app.c b/tests/apps/action-app.c
deleted file mode 100644 (file)
index 612cd59..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <gmodule.h>
-#include <atk/atk.h>
-#include <my-atk.h>
-
-static AtkObject *root_accessible;
-
-G_MODULE_EXPORT void
-test_init (gchar *path)
-{
-  root_accessible  = g_object_new(MY_TYPE_ATK_ACTION, NULL);
-}
-
-G_MODULE_EXPORT void
-test_next (int argc, char *argv[])
-{
-  g_print("Moving to next stage\n");
-}
-
-G_MODULE_EXPORT void
-test_finished (int argc, char *argv[])
-{
-  g_print("Test has completed\n");
-}
-
-G_MODULE_EXPORT AtkObject *
-test_get_root (void)
-{
-  return root_accessible;
-}
diff --git a/tests/apps/atk-object-xml-loader.c b/tests/apps/atk-object-xml-loader.c
deleted file mode 100644 (file)
index 5fa2354..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright 2008 Codethink Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include <glib.h>
-#include <libxml/parser.h>
-#include <libxml/tree.h>
-
-#include <my-atk.h>
-
-#define ACCESSIBLE_NODE ((const xmlChar *) "accessible")
-#define INTERFACE_NODE  ((const xmlChar *) "interface")
-
-#define NAME_ATTR ((const xmlChar *) "name")
-#define DESC_ATTR ((const xmlChar *) "description")
-#define ROLE_ATTR ((const xmlChar *) "role")
-
-static MyAtkObject *
-create_atk_object_from_element(xmlNode *element)
-{
-  xmlNode *child_node;
-
-  MyAtkObject *obj = NULL;
-  MyAtkObject *child_obj;
-
-  xmlChar *name;
-  xmlChar *description;
-  xmlChar *role_text; 
-  gint role;
-
-  name = xmlGetProp(element, NAME_ATTR);
-  description = xmlGetProp(element, DESC_ATTR);
-  role_text = xmlGetProp(element, ROLE_ATTR);
-  role = atoi(role_text);
-
-  obj = MY_ATK_OBJECT(g_object_new(MY_TYPE_ATK_OBJECT,
-                                  "accessible-name", name,
-                                  "accessible-description", description,
-                                  "accessible-role", role,
-                                  NULL));
-
-  child_node = element->xmlChildrenNode;
-  while (child_node != NULL)
-    {
-      if (!xmlStrcmp(child_node->name, ACCESSIBLE_NODE))  
-       {
-         child_obj = create_atk_object_from_element(child_node); 
-         my_atk_object_add_child(obj, child_obj);
-       }
-      child_node = child_node->next;
-    }
-  return obj;
-}
-
-/*
- * Reads the XML from filename and uses it
- * to create a tree of MyAtkObjects.
- * 
- * returns: The root object of the tree.
- */
-MyAtkObject *
-atk_object_xml_parse(gchar *filename)
-{
-  xmlDoc *doc;
-  xmlNode *root_element;
-  MyAtkObject *new_atk_object = NULL;
-
-  doc = xmlReadFile(filename, NULL, 0);
-  g_assert(doc != NULL);
-
-  root_element = xmlDocGetRootElement(doc);
-
-  if (!xmlStrcmp(root_element->name, ACCESSIBLE_NODE))  
-    new_atk_object = create_atk_object_from_element(root_element); 
-
-  xmlFreeDoc(doc);
-  return new_atk_object;
-}
diff --git a/tests/apps/atk-object-xml-loader.h b/tests/apps/atk-object-xml-loader.h
deleted file mode 100644 (file)
index ce707bd..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2008 Codethink Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef ATK_OBJECT_XML_LOADER_H
-#define ATK_OBJECT_XML_LOADER_H
-
-#include <glib.h>
-#include <my-atk.h>
-
-MyAtkObject *
-atk_object_xml_parse(gchar *filename);
-
-#endif /*ATK_OBJECT_XML_LOADER_H*/
diff --git a/tests/apps/component-app.c b/tests/apps/component-app.c
deleted file mode 100644 (file)
index d51e1ac..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#include <gmodule.h>
-#include <atk/atk.h>
-#include <my-atk.h>
-
-static gchar *tdata_path = NULL;
-
-static AtkComponent *comps[] = {NULL, NULL, NULL};
-static const AtkRectangle extents[] = {{0,0,30,20}, {40,30,30,40}, {0,0,70,70}};
-static const AtkLayer layers[] = {ATK_LAYER_WINDOW, ATK_LAYER_WIDGET, ATK_LAYER_MDI};
-static const guint zorders[] = {0, -100, 100};
-static const gboolean extent_may_changed[] = {TRUE, FALSE, TRUE};
-
-G_MODULE_EXPORT void
-test_init (gchar *path)
-{
-  int i;
-
-  if (path == NULL)
-     g_error("No test data path provided");
-  tdata_path = path;
-
-  g_type_init();
-  for(i = 0; i < sizeof(comps) / sizeof(comps[0]); i++)
-    {
-      MyAtkComponent *mycomp = MY_ATK_COMPONENT(g_object_new(MY_TYPE_ATK_COMPONENT, NULL));
-        
-      mycomp->extent = extents[i];
-      mycomp->is_extent_may_changed = extent_may_changed[i];
-      mycomp->layer = layers[i];
-      mycomp->zorder = zorders[i];
-      
-      comps[i] = ATK_COMPONENT(mycomp);
-    }
-    
-  my_atk_object_add_child(MY_ATK_OBJECT(comps[2]), MY_ATK_OBJECT(comps[0]));
-  my_atk_object_add_child(MY_ATK_OBJECT(comps[2]), MY_ATK_OBJECT(comps[1]));
-}
-
-G_MODULE_EXPORT void
-test_next (int argc, char *argv[])
-{
-  g_print("Moving to next stage\n");
-}
-
-G_MODULE_EXPORT void
-test_finished (int argc, char *argv[])
-{
-  g_print("Test has completed\n");
-}
-
-G_MODULE_EXPORT AtkObject *
-test_get_root (void)
-{
-  return ATK_COMPONENT(comps[2]);
-}
diff --git a/tests/apps/noop-app.c b/tests/apps/noop-app.c
deleted file mode 100644 (file)
index f2a5f51..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#include <gmodule.h>
-#include <atk/atk.h>
-
-G_MODULE_EXPORT void
-test_init (int argc, char *argv[])
-{
-  ;
-}
-
-G_MODULE_EXPORT void
-test_next (int argc, char *argv[])
-{
-  ;
-}
-
-G_MODULE_EXPORT void
-test_finished (int argc, char *argv[])
-{
-  ;
-}
-
-G_MODULE_EXPORT AtkObject *
-test_get_root (void)
-{
-  return NULL;
-}
diff --git a/tests/apps/relation-app.c b/tests/apps/relation-app.c
deleted file mode 100644 (file)
index 5734ffe..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-#include <gmodule.h>
-#include <atk/atk.h>
-#include <my-atk.h>
-
-static AtkObject *root_accessible;
-
-G_MODULE_EXPORT void
-test_init (gchar *path)
-{
-  AtkObject *r1, *r2, *r