Imported Upstream version 3.13.92
[platform/upstream/pygobject2.git] / tests / testmodule.py
1 from gi.repository import GObject
2
3
4 class PyGObject(GObject.GObject):
5     __gtype_name__ = 'PyGObject'
6     __gproperties__ = {
7         'label': (GObject.TYPE_STRING,
8                   'label property',
9                   'the label of the object',
10                   'default', GObject.PARAM_READWRITE),
11         }
12
13     def __init__(self):
14         self._props = {}
15         GObject.GObject.__init__(self)
16         self.set_property('label', 'hello')
17
18     def do_set_property(self, name, value):
19         self._props[name] = value
20
21     def do_get_property(self, name):
22         return self._props[name]