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 -- a g:application-flags value with the application flags

Return Value

The new gtk:application instance.

Details

Creates a new application. When using the gtk:application class, it is not necessary to call the gtk:init function manually. It 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 "GApplication::startup" signal. Therefore, gtk:application subclasses should always chain up in their "GApplication::startup" handler before using any GTK API. Note that commandline arguments are not passed to the gtk:init function.

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

2024-10-7