Application


Description:

[ CCode ( has_construct_function = false ) ]
public Application (string? application_id, ApplicationFlags flags)

Creates a new application instance.

When using `GtkApplication`, it is not necessary to call [func@Gtk.init] manually. It is called as soon as the application gets registered as the primary instance.

Concretely, [func@Gtk.init] is called in the default handler for the `GApplication:GtkApplication:startup` signal. Therefore, `GtkApplication` subclasses should always chain up in their [vfunc@GIO.Application.startup] handler before using any GTK API.

Note that commandline arguments are not passed to [func@Gtk.init].

If `application_id` is not `NULL`, then it must be valid. See [func@Gio.Application.id_is_valid].

If no application ID is given then some features (most notably application uniqueness) will be disabled.

Parameters:

application_id

The application ID

flags

the application flags

Returns:

a new `GtkApplication` instance