Application


Description:

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

Creates a new Application instance.

When using Application, it is not necessary to call init manually. It is called as soon as the application gets registered as the primary instance.

Concretely, init is called in the default handler for the startup signal. Therefore, Application subclasses should chain up in their startup handler before using any GTK+ API.

Note that commandline arguments are not passed to init. All GTK+ functionality that is available via commandline arguments can also be achieved by setting suitable environment variables such as `G_DEBUG`, so this should not be a big problem. If you absolutely must support GTK+ commandline arguments, you can explicitly call init before creating the application instance.

If non-null, the application ID must be valid. See id_is_valid.

If no application ID is given then some features (most notably application uniqueness) will be disabled. A null application ID is only allowed with GTK+ 3.6 or later.

Parameters:

application_id

The application ID.

flags

the application flags

Returns:

a new Application instance