5 class Connection (ibus
.Object
):
8 gobject
.SIGNAL_RUN_FIRST
,
10 (gobject
.TYPE_PYOBJECT
, )
13 def __init__ (self
, dbusconn
):
14 ibus
.Object
.__init
__ (self
)
15 self
._dbusconn
= dbusconn
17 def get_object (self
, path
):
18 return self
._dbusconn
.get_object ("no.name", path
)
20 def emit_dbus_signal (self
, name
, *args
):
21 message
= dbus
.lowlevel
.SignalMessage (ibus
.IBUS_PATH
, ibus
.IBUS_IFACE
, name
)
22 message
.append (*args
)
23 self
._dbusconn
.send_message (message
)
24 self
._dbusconn
.flush ()
26 def do_destroy (self
):
29 def dispatch_dbus_signal (self
, message
):
30 self
.emit ("dbus-signal", message
)
32 gobject
.type_register (Connection
)