Allow binding class fields to GObject properties
We should enable "binding" class fields to GObject properties. The goal of this API is to allow hooking in the accessors for GObject properties to classes using fields.
bindPropertyFields
will re-define class fields using the accessors defined by registerClass
with the default value specified for the field.
class Foo extends GObject.Object {
bar = true;
constructor() {
super();
this.bindPropertyFields();
}
}
GObject.registerClass(Foo, {
Bar: {
'bar': GObject.ParamSpec.boolean(...)
}
});
Edited by Evan Welsh