Package: gtk

Function gtk-application-new

Lambda List

gtk-application-new (id flags)

Arguments

id -- a string with the application ID, or nil for no application ID
flags -- the g-application-flags application flags

Return Value

A new gtk-application instance.

Details

Creates a new application.

The gtk_init() function is called as soon as the application gets registered as the primary instance. Concretely, the gtk_init() function is called in the default handler for the "startup" signal. Therefore, gtk-application subclasses should chain up in their "startup" handler before using any GTK API.

Note that command line arguments are not passed to the gtk_init() function. All GTK functionality that is available via command line 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 command line arguments, you can explicitly call the gtk_init() function before creating the application instance.

The application ID must be valid. See the g-application-id-is-valid function.

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

See also

2021-9-3