4 TREE_UPDATE_ACCESSIBLE = 0
5 TREE_REMOVE_ACCESSIBLE = 1
7 class AccessibleTree(dbus.service.Object):
9 The Accessible tree provides the interface,
10 for accessing all the accessible objects
11 available on a particular application.
14 def __init__(self, bus, path):
18 bus - The D-Bus bus object to use
19 path - The object path this interface should use
21 dbus.service.Object.__init__(self, bus, path)
26 @dbus.service.method(dbus_interface='org.freedesktop.atspi.Tree',
31 @dbus.service.method(dbus_interface='org.freedesktop.atspi.Tree',
32 out_signature='a(qooaoassus)')
35 for object in self._objects.values():
36 wireObjects.append((TREE_UPDATE_ACCESSIBLE,) + object)
39 @dbus.service.signal(dbus_interface='org.freedesktop.atspi.Tree',
40 signature='a(qooaoassus)')
41 def updateTree(self, values):
42 #There are some locking issues here.
43 #Need to make sure that updates are not missed.
44 oldSend = self._toSend.values()
48 def updateObject(self, path, object):
49 self._objects[path] = object
50 self._toSend[path] = (TREE_UPDATE_ACCESSIBLE,) + object
52 def removeObject(self, path):
53 self._toSend[path] = (TREE_REMOVE_ACCESSIBLE,) + self._objects[path]
54 del(self._objects[path])
56 def setRoot(self, root):