ApplicationSignalName
public enum ApplicationSignalName : String, SignalNameProtocol
Undocumented
-
The
activate
signal is emitted on the primary instance when an activation occurs. Seeg_application_activate()
.Declaration
Swift
case activate = "activate"
-
The
command-line
signal is emitted on the primary instance when a commandline is not handled locally. Seeg_application_run()
and theGApplicationCommandLine
documentation for more information.Declaration
Swift
case commandLine = "command-line"
-
The
handle-local-options
signal is emitted on the local instance after the parsing of the commandline options has occurred.You can add options to be recognised during commandline option parsing using
g_application_add_main_option_entries()
andg_application_add_option_group()
.Signal handlers can inspect
options
(along with values pointed to from thearg_data
of an installedGOptionEntrys
) in order to decide to perform certain actions, including direct local handling (which may be useful for options like –version).In the event that the application is marked
G_APPLICATION_HANDLES_COMMAND_LINE
the “normal processing” will send theoptions
dictionary to the primary instance where it can be read withg_application_command_line_get_options_dict()
. The signal handler can modify the dictionary before returning, and the modified dictionary will be sent.In the event that
G_APPLICATION_HANDLES_COMMAND_LINE
is not set, “normal processing” will treat the remaining uncollected command line arguments as filenames or URIs. If there are no arguments, the application is activated byg_application_activate()
. One or more arguments results in a call tog_application_open()
.If you want to handle the local commandline arguments for yourself by converting them to calls to
g_application_open()
org_action_group_activate_action()
then you must be sure to register the application first. You should probably not callg_application_activate()
for yourself, however: just return -1 and allow the default handler to do it for you. This will ensure that the--gapplication-service
switch works properly (i.e. no activation in that case).Note that this signal is emitted from the default implementation of
local_command_line()
. If you override that function and don’t chain up then this signal will never be emitted.You can override
local_command_line()
if you need more powerful capabilities than what is provided here, but this should not normally be required.Declaration
Swift
case handleLocalOptions = "handle-local-options"
-
The
name-lost
signal is emitted only on the registered primary instance when a new instance has taken over. This can only happen if the application is using theG_APPLICATION_ALLOW_REPLACEMENT
flag.The default handler for this signal calls
g_application_quit()
.Declaration
Swift
case nameLost = "name-lost"
-
The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property()
,g_object_set()
, et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY
, then any call tog_object_set_property()
results innotify
being emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY
, then this signal is emitted only when they explicitly callg_object_notify()
org_object_notify_by_pspec()
, and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()
call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)
It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Declaration
Swift
case notify = "notify"
-
The
open
signal is emitted on the primary instance when there are files to open. Seeg_application_open()
for more information.Declaration
Swift
case open = "open"
-
Emitted when the session manager is about to end the session, only if
GtkApplication::register-session
istrue
. Applications can connect to this signal and callgtk_application_inhibit()
withGTK_APPLICATION_INHIBIT_LOGOUT
to delay the end of the session until state has been saved.Declaration
Swift
case queryEnd = "query-end"
-
The
shutdown
signal is emitted only on the registered primary instance immediately after the main loop terminates.Declaration
Swift
case shutdown = "shutdown"
-
The
startup
signal is emitted on the primary instance immediately after registration. Seeg_application_register()
.Declaration
Swift
case startup = "startup"
-
Emitted when a
GtkWindow
is added toapplication
throughgtk_application_add_window()
.Declaration
Swift
case windowAdded = "window-added"
-
Emitted when a
GtkWindow
is removed fromapplication
, either as a side-effect of being destroyed or explicitly throughgtk_application_remove_window()
.Declaration
Swift
case windowRemoved = "window-removed"
-
Undocumented
Declaration
Swift
case notifyActionGroup = "notify::action-group"
-
Undocumented
Declaration
Swift
case notifyActiveWindow = "notify::active-window"
-
Undocumented
Declaration
Swift
case notifyAppMenu = "notify::app-menu"
-
Undocumented
Declaration
Swift
case notifyApplicationID = "notify::application-id"
-
Undocumented
Declaration
Swift
case notifyFlags = "notify::flags"
-
Undocumented
Declaration
Swift
case notifyInactivityTimeout = "notify::inactivity-timeout"
-
Whether the application is currently marked as busy through
g_application_mark_busy()
org_application_bind_busy_property()
.Declaration
Swift
case notifyIsBusy = "notify::is-busy"
-
Undocumented
Declaration
Swift
case notifyIsRegistered = "notify::is-registered"
-
Undocumented
Declaration
Swift
case notifyIsRemote = "notify::is-remote"
-
Undocumented
Declaration
Swift
case notifyMenubar = "notify::menubar"
-
Set this property to
true
to register with the session manager.Declaration
Swift
case notifyRegisterSession = "notify::register-session"
-
Undocumented
Declaration
Swift
case notifyResourceBasePath = "notify::resource-base-path"
-
This property is
true
if GTK+ believes that the screensaver is currently active. GTK+ only tracks session state (including this) whenGtkApplication::register-session
is set totrue
.Tracking the screensaver state is supported on Linux.
Declaration
Swift
case notifyScreensaverActive = "notify::screensaver-active"