ApplicationSignalName

public enum ApplicationSignalName : String, SignalNameProtocol

Undocumented

  • The activate signal is emitted on the primary instance when an activation occurs. See g_application_activate().

    Declaration

    Swift

    case activate = "activate"
  • The command-line signal is emitted on the primary instance when a commandline is not handled locally. See g_application_run() and the GApplicationCommandLine 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() and g_application_add_option_group().

    Signal handlers can inspect options (along with values pointed to from the arg_data of an installed GOptionEntrys) 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 the options dictionary to the primary instance where it can be read with g_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 by g_application_activate(). One or more arguments results in a call to g_application_open().

    If you want to handle the local commandline arguments for yourself by converting them to calls to g_application_open() or g_action_group_activate_action() then you must be sure to register the application first. You should probably not call g_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 the G_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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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. See g_application_open() for more information.

    Declaration

    Swift

    case open = "open"
  • Emitted when the session manager is about to end the session.

    This signal is only emitted if [propertyGtk.Application:register-session] is TRUE. Applications can connect to this signal and call [methodGtk.Application.inhibit] with GTK_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. See g_application_register().

    Declaration

    Swift

    case startup = "startup"
  • Emitted when a [classGtk.Window] is added to application through [methodGtk.Application.add_window].

    Declaration

    Swift

    case windowAdded = "window-added"
  • Emitted when a [classGtk.Window] is removed from application.

    This can happen as a side-effect of the window being destroyed or explicitly through [methodGtk.Application.remove_window].

    Declaration

    Swift

    case windowRemoved = "window-removed"
  • Undocumented

    Declaration

    Swift

    case notifyActionGroup = "notify::action-group"
  • The currently focused window of the application.

    Declaration

    Swift

    case notifyActiveWindow = "notify::active-window"
  • 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() or g_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"
  • The GMenuModel to be used for the application’s menu bar.

    Declaration

    Swift

    case notifyMenubar = "notify::menubar"
  • Set this property to TRUE to register with the session manager.

    This will make GTK track the session state (such as the [propertyGtk.Application:screensaver-active] property).

    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) when [propertyGtk.Application:register-session] is set to true.

    Tracking the screensaver state is currently only supported on Linux.

    Declaration

    Swift

    case notifyScreensaverActive = "notify::screensaver-active"