summaryrefslogtreecommitdiff
path: root/examples/signal.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/signal.py')
-rw-r--r--examples/signal.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/signal.py b/examples/signal.py
index d1b7357b..057addae 100644
--- a/examples/signal.py
+++ b/examples/signal.py
@@ -1,18 +1,22 @@
from gi.repository import GObject
+
class C(GObject.GObject):
__gsignals__ = {
'my_signal': (GObject.SIGNAL_RUN_FIRST, GObject.TYPE_NONE,
(GObject.TYPE_INT,))
}
+
def do_my_signal(self, arg):
print "C: class closure for `my_signal' called with argument", arg
+
class D(C):
def do_my_signal(self, arg):
print "D: class closure for `my_signal' called. Chaining up to C"
C.do_my_signal(self, arg)
+
def my_signal_handler(object, arg, *extra):
print "handler for `my_signal' called with argument", arg, \
"and extra args", extra