Skip to content

API Reference / @gtkx/runtime / registerInterface

Function: registerInterface() ​

registerInterface(cls, type, mixin, layout?): void

Defined in: packages/runtime/src/registry.ts:394

Registers a GInterface, associating its GType with a mixin used to compose the interface onto wrapper classes and, when introspection describes its vtable, that layout.

Parameters ​

cls ​

AnyClass

Class carrying the interface's GType tag.

type ​

bigint

GType of the interface.

mixin ​

Mixin

Mixin that applies the interface to a wrapper class.

layout? ​

InterfaceLayout

The interface's vtable struct, so registerClass can bind the slots an implementing class overrides and take over the ones it leaves alone.

Returns ​

void