1 #Copyright (C) 2008 Codethink Ltd
3 #This library is free software; you can redistribute it and/or
4 #modify it under the terms of the GNU Lesser General Public
5 #License version 2 as published by the Free Software Foundation.
7 #This program is distributed in the hope that it will be useful,
8 #but WITHOUT ANY WARRANTY; without even the implied warranty of
9 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 #GNU General Public License for more details.
11 #You should have received a copy of the GNU Lesser General Public License
12 #along with this program; if not, write to the Free Software
13 #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16 from base import BaseProxy
17 from factory import add_accessible_class
23 #------------------------------------------------------------------------------
25 class Collection(BaseProxy):
27 def createMatchRule(self, *args, **kwargs):
28 func = self.get_dbus_method("createMatchRule")
29 return func(*args, **kwargs)
31 def freeMatchRule(self, *args, **kwargs):
32 func = self.get_dbus_method("freeMatchRule")
33 return func(*args, **kwargs)
35 def getActiveDescendant(self, *args, **kwargs):
36 func = self.get_dbus_method("getActiveDescendant")
37 return func(*args, **kwargs)
39 def getMatches(self, *args, **kwargs):
40 func = self.get_dbus_method("getMatches")
41 return func(*args, **kwargs)
43 def getMatchesFrom(self, *args, **kwargs):
44 func = self.get_dbus_method("getMatchesFrom")
45 return func(*args, **kwargs)
47 def getMatchesTo(self, *args, **kwargs):
48 func = self.get_dbus_method("getMatchesTo")
49 return func(*args, **kwargs)
51 def isAncestorOf(self, *args, **kwargs):
52 func = self.get_dbus_method("isAncestorOf")
53 return func(*args, **kwargs)
55 class MatchType(_Enum):
62 5:'MATCH_LAST_DEFINED',
65 MATCH_ALL = MatchType(1)
67 MATCH_ANY = MatchType(2)
69 MATCH_EMPTY = MatchType(4)
71 MATCH_INVALID = MatchType(0)
73 MATCH_LAST_DEFINED = MatchType(5)
75 MATCH_NONE = MatchType(3)
77 class SortOrder(_Enum):
79 0:'SORT_ORDER_INVALID',
80 1:'SORT_ORDER_CANONICAL',
83 4:'SORT_ORDER_REVERSE_CANONICAL',
84 5:'SORT_ORDER_REVERSE_FLOW',
85 6:'SORT_ORDER_REVERSE_TAB',
86 7:'SORT_ORDER_LAST_DEFINED',
89 SORT_ORDER_CANONICAL = SortOrder(1)
91 SORT_ORDER_FLOW = SortOrder(2)
93 SORT_ORDER_INVALID = SortOrder(0)
95 SORT_ORDER_LAST_DEFINED = SortOrder(7)
97 SORT_ORDER_REVERSE_CANONICAL = SortOrder(4)
99 SORT_ORDER_REVERSE_FLOW = SortOrder(5)
101 SORT_ORDER_REVERSE_TAB = SortOrder(6)
103 SORT_ORDER_TAB = SortOrder(3)
105 class TreeTraversalType(_Enum):
107 0:'TREE_RESTRICT_CHILDREN',
108 1:'TREE_RESTRICT_SIBLING',
110 3:'TREE_LAST_DEFINED',
113 TREE_INORDER = TreeTraversalType(2)
115 TREE_LAST_DEFINED = TreeTraversalType(3)
117 TREE_RESTRICT_CHILDREN = TreeTraversalType(0)
119 TREE_RESTRICT_SIBLING = TreeTraversalType(1)
121 # ATTENTION - Register the Application class with the accessible factory.
122 add_accessible_class(interfaces.ATSPI_COLLECTION, Collection)
124 #END----------------------------------------------------------------------------