Skip to content

Draft: Gtk.defineChildren

Evan Welsh requested to merge ewlsh/define-children into master

Proposed API Additions

namespace Gtk {
    /**
     * Classes which use `.register()` instead of `GObject.registerClass()` can use
     * `Gtk.defineChildren(this, MyWidget)` to emulate the behavior of `GObject.registerClass()`.
     *
     * `target` is an optional parameter to define the children on and defaults to `widget`.
     */
    export function defineChildren(widget: Gtk.Widget, Class: Function, target?: object): void;
}

Merge request reports