Last active
July 14, 2017 03:02
-
-
Save ptomato/ebc34ef0c3870d992fd759f88e53f674 to your computer and use it in GitHub Desktop.
Inventing GObject ES6 Classes (1)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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