summaryrefslogtreecommitdiffstats
path: root/examples/signal.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/signal.py')
-rw-r--r--examples/signal.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/signal.py b/examples/signal.py
index c52f0ad..3d72e75 100644
--- a/examples/signal.py
+++ b/examples/signal.py
@@ -1,14 +1,15 @@
import gobject
class C(gobject.GObject):
+ __gsignals__ = {
+ 'my_signal': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ (gobject.TYPE_INT,))
+ }
def __init__(self):
self.__gobject_init__() # default constructor using our new GType
def do_my_signal(self, arg):
print "C: class closure for `my_signal' called with argument", arg
-
gobject.type_register(C)
-gobject.signal_new("my_signal", C, gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, (gobject.TYPE_INT, ))
class D(C):
def do_my_signal(self, arg):