Skip to content

API Reference / @gtkx/runtime / createApplication

Variable: createApplication

const createApplication: <T, P>(base, props) => T

Defined in: packages/runtime/dist/application-class.d.ts:30

Constructs an application GTKX can shut down. GLib parses an application's command line at most once per instance and crashes on a second parse, so runApplication and quitApplication only accept an application built here.

Type Parameters

T

T extends CommandLineApplication

P

P

Parameters

base

ApplicationClass<T, P>

The application class to construct, such as Gtk.Application.

props

P

Construct properties, passed through unchanged.

Returns

T

An instance of a class derived from base, registered once per base class as its own GType.

Released under the MPL-2.0 License.