Inventing GObject ES6 Classes (1)
const MyClass = new Lang.Class({ | |
Name: 'MyClass', | |
GTypeName: 'MyNamespaceMyClass', | |
Extends: GObject.Object, | |
Implements: [Gio.Initable, MyCustomInterface], | |
Properties: { | |
'prop': GObject.ParamSpec.int( /* etc., etc. */ ), | |
}, | |
Signals: { | |
'signal': { param_types: [ /* etc., etc. */ ] }, | |
}, | |
_init(props={}) { | |
this.parent(props); | |
// etc. | |
}, | |
get prop() { /* ... */ }, | |
method(arg) { /* ... */ }, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment