Skip to content

API Reference / @gtkx/runtime / newObjectWithProperties

Function: newObjectWithProperties()

newObjectWithProperties(gtype, props): ExternalObject<Handle>

Defined in: runtime/dist/object.d.ts:11

Constructs a new GObject of the given type, setting the supplied construct properties. Entries whose value is undefined or not a [descriptor, value] pair are skipped.

Parameters

gtype

bigint

The GType of the object to construct.

props

Record<string, unknown>

Property names mapped to [descriptor, value] pairs.

Returns

ExternalObject<Handle>

The handle of the newly created object.

Released under the MPL-2.0 License.