Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hydrate objects constructed from GtkBuilder
This runs JS constructors on objects that were not constructed from JavaScript. This is effectively objects constructed from GtkBuilder. This is done by tracking all objects currently being constructed in a variable named `ConstructContext`. If an object's `TypeInfo`'s `instance_init` method (see https://docs.gtk.org/gobject/struct.TypeInfo.html) while it's gType is not the currently being constructed type (i.e. the last element of `ConstructContext`), it is assumed that the object is being constructed from GtkBuilder and the object's constructor is called, but instead of creating a new `GObject`, the constructed object's `gi:ref` (pointer) is passed instead, and the javascript "construction" continues.
- Loading branch information