3 class MyObject(gobject.GObject):
5 foo = gobject.property(type=str, default='bar')
6 boolprop = gobject.property(type=bool, default=False)
9 gobject.GObject.__init__(self)
15 gobject.type_register(MyObject)
17 print "MyObject properties: ", list(MyObject.props)
21 print "obj.foo ==", obj.foo
24 print "obj.foo = spam"
26 print "obj.foo == ", obj.foo
28 print "obj.boolprop == ", obj.boolprop
31 obj.readonly = 'does-not-work'