From f614119056169f16d61e0ed46d17ae62ffc643cc Mon Sep 17 00:00:00 2001 From: Mark Doffman Date: Wed, 27 Aug 2008 17:38:22 +0100 Subject: [PATCH] 2008-08-27 Mark Doffman * pyatspi/ Import all Accessible interfaces with pyatspi. Fix import errors on assorted interfaces. --- pyatspi/__init__.py | 19 ++++++++++++++++++- pyatspi/collection.py | 8 ++++---- pyatspi/loginhelper.py | 4 ++-- pyatspi/selector.py | 4 ++-- pyatspi/streamablecontent.py | 4 ++-- pyatspi/text.py | 6 +++--- 6 files changed, 31 insertions(+), 14 deletions(-) diff --git a/pyatspi/__init__.py b/pyatspi/__init__.py index ed9ba49..12be5df 100644 --- a/pyatspi/__init__.py +++ b/pyatspi/__init__.py @@ -23,10 +23,27 @@ from constants import * from accessible import * from action import * from application import * +from collection import * from component import * +from constants import * from desktop import * -from state import * +from document import * +from editabletext 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 selector import * +from state import * +from streamablecontent import * +from table import * +from test import * +from text import * +from utils import * +from value import * #from utils import * diff --git a/pyatspi/collection.py b/pyatspi/collection.py index 1d0fb3f..d3b4f11 100644 --- a/pyatspi/collection.py +++ b/pyatspi/collection.py @@ -13,7 +13,7 @@ #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import interfaces -from base import BaseProxy +from base import BaseProxy, Enum from factory import add_accessible_class __all__ = [ @@ -52,7 +52,7 @@ class Collection(BaseProxy): func = self.get_dbus_method("isAncestorOf") return func(*args, **kwargs) - class MatchType(_Enum): + class MatchType(Enum): _enum_lookup = { 0:'MATCH_INVALID', 1:'MATCH_ALL', @@ -74,7 +74,7 @@ class Collection(BaseProxy): MATCH_NONE = MatchType(3) - class SortOrder(_Enum): + class SortOrder(Enum): _enum_lookup = { 0:'SORT_ORDER_INVALID', 1:'SORT_ORDER_CANONICAL', @@ -102,7 +102,7 @@ class Collection(BaseProxy): SORT_ORDER_TAB = SortOrder(3) - class TreeTraversalType(_Enum): + class TreeTraversalType(Enum): _enum_lookup = { 0:'TREE_RESTRICT_CHILDREN', 1:'TREE_RESTRICT_SIBLING', diff --git a/pyatspi/loginhelper.py b/pyatspi/loginhelper.py index 5028903..5d50820 100644 --- a/pyatspi/loginhelper.py +++ b/pyatspi/loginhelper.py @@ -13,7 +13,7 @@ #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import interfaces -from base import BaseProxy +from base import BaseProxy, Enum from factory import add_accessible_class __all__ = [ @@ -101,7 +101,7 @@ class LoginHelper(BaseProxy): func = self.get_dbus_method("setSafe") return func(*args, **kwargs) - class DeviceReq(_Enum): + class DeviceReq(Enum): _enum_lookup = { 0:'GUI_EVENTS', 1:'CORE_KEYBOARD', diff --git a/pyatspi/selector.py b/pyatspi/selector.py index 96fbabd..65cc50b 100644 --- a/pyatspi/selector.py +++ b/pyatspi/selector.py @@ -13,7 +13,7 @@ #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import interfaces -from base import BaseProxy +from base import BaseProxy, Enum from factory import add_accessible_class __all__ = [ @@ -143,7 +143,7 @@ class Selector(BaseProxy): """ supportsReplace = property(fget=get_supportsReplace, fset=set_supportsReplace, doc=_supportsReplaceDoc) - class CommandResult(_Enum): + class CommandResult(Enum): """ A code returned by a call to activateCommand, indicating the result of the activation request. diff --git a/pyatspi/streamablecontent.py b/pyatspi/streamablecontent.py index 9a7b382..6ee3419 100644 --- a/pyatspi/streamablecontent.py +++ b/pyatspi/streamablecontent.py @@ -13,7 +13,7 @@ #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import interfaces -from base import BaseProxy +from base import BaseProxy, Enum from factory import add_accessible_class __all__ = [ @@ -82,7 +82,7 @@ class ContentStream(BaseProxy): class NotSupported(Exception): pass - class SeekType(_Enum): + class SeekType(Enum): """ Specifies the meaning of a seek 'offset'. Not all SeekTypes are supported by all StreamableContent data sources, for instance diff --git a/pyatspi/text.py b/pyatspi/text.py index 2884f97..28aca21 100644 --- a/pyatspi/text.py +++ b/pyatspi/text.py @@ -13,7 +13,7 @@ #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import interfaces -from base import BaseProxy +from base import BaseProxy, Enum from factory import add_accessible_class __all__ = [ @@ -35,7 +35,7 @@ __all__ = [ #------------------------------------------------------------------------------ -class TEXT_BOUNDARY_TYPE(_Enum): +class TEXT_BOUNDARY_TYPE(Enum): _enum_lookup = { 0:'TEXT_BOUNDARY_CHAR', 1:'TEXT_BOUNDARY_WORD_START', @@ -56,7 +56,7 @@ TEXT_BOUNDARY_WORD_START = TEXT_BOUNDARY_TYPE(1) #------------------------------------------------------------------------------ -class TEXT_CLIP_TYPE(_Enum): +class TEXT_CLIP_TYPE(Enum): _enum_lookup = { 0:'TEXT_CLIP_NONE', 1:'TEXT_CLIP_MIN', -- 2.7.4