DBusGMainLoop(set_as_default=True)
-class Emitter (dbus.service.Object):
- def __init__(self, bus, object_path):
- dbus.service.Object.__init__(self, bus, object_path)
-
- @dbus.service.signal(dbus_interface='org.freedekstop.atspi.Tree', signature='s')
- def registerApplication(self, app_name):
- pass
-
- @dbus.service.signal(dbus_interface='org.freedekstop.atspi.Tree', signature='s')
- def deregisterApplication(self, app_name):
- pass
-
class IdleStateM (object):
def __init__(self, bus, loop):
self._bus = bus
return True
def setup(self):
- self.emit = Emitter(self._bus, "/org/freedesktop/atspi/tree")
- self.obj = self._bus.get_object("org.freedesktop.atspi.Registry", "/org/freedesktop/atspi/Registry")
- self.itf = dbus.Interface(self.obj, dbus_interface="org.freedesktop.atspi.Registry")
- return self.emit_registers
-
- def emit_registers(self):
- self.emit.registerApplication(":R123")
- self.emit.registerApplication(":R456")
+ self.obj = self._bus.get_object("org.a11y.atspi.Registry",
+ "/org/a11y/atspi/registry",
+ introspect=False)
+ self.itf = dbus.Interface(self.obj, dbus_interface="org.a11y.atspi.Registry")
+ return self.register_apps
+
+ def register_apps(self):
+ #self.itf.registerApplication(":R456", ignore_reply=True)
+ #self.itf.registerApplication(":R123", ignore_reply=True)
return self.print_applications
def print_applications(self):