1 from gi.repository import GObject
4 class C(GObject.GObject):
6 'my_signal': (GObject.SIGNAL_RUN_FIRST, GObject.TYPE_NONE,
10 def do_my_signal(self, arg):
11 print "C: class closure for `my_signal' called with argument", arg
15 def do_my_signal(self, arg):
16 print "D: class closure for `my_signal' called. Chaining up to C"
17 C.do_my_signal(self, arg)
20 def my_signal_handler(object, arg, *extra):
21 print "handler for `my_signal' called with argument", arg, \
22 "and extra args", extra
27 inst.connect("my_signal", my_signal_handler, 1, 2, 3)
28 inst.emit("my_signal", 42)
29 inst2.emit("my_signal", 42)