summaryrefslogtreecommitdiff
path: root/tests/testmodule.py
blob: 5fc29b385a2e50afcba43c0d6f4510048ae390ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import gobject

class PyGObject(gobject.GObject):
    __gtype_name__ = 'PyGObject'
    __gproperties__ = {
        'label': (gobject.TYPE_STRING,
                  'label property',
                  'the label of the object',
                  'default', gobject.PARAM_READWRITE),
        }

    def __init__(self):
        self._props = {}
        gobject.GObject.__init__(self)
        self.set_property('label', 'hello')

    def do_set_property(self, name, value):
        self._props[name] = value

    def do_get_property(self, name):
        return self._props[name]