Package: gio

GFlags g-application-flags

Details

Flags used to define the behaviour of a g-application instance.
(define-g-flags "GApplicationFlags" g-application-flags
  (:export t
   :type-initializer "g_application_flags_get_type")
  (:none 0)
  (:is-service 1)
  (:is-launcher 2)
  (:handles-open 4)
  (:handles-command-line 8)
  (:send-enviroment 16)
  (:non-unique 32)
  (:can-override-app-id 64)
  (:allow-replacement 128)
  (:replace 256))  
:none
Default.
:is-service
Run as a service. In this mode, registration fails if the service is already running, and the application will initially wait up to 10 seconds for an initial activation message to arrive.
:is-launcher
Do not try to become the primary instance.
:handles-open
This application handles opening files in the primary instance. Note that this flag only affects the default implementation of the local_command_line() virtual function, and has no effect if the :handles-command-line flag is given. See the g-application-run function for details.
:handles-command-line
This application handles command line arguments in the primary instance. Note that this flag only affect the default implementation of the local_command_line() virtual function. See the g-application-run function for details.
:send-enviroment
Send the environment of the launching process to the primary instance. Set this flag if your application is expected to behave differently depending on certain environment variables. For instance, an editor might be expected to use the GIT_COMMITTER_NAME environment variable when editing a GIT commit message. The environment is available to the "command-line" signal handler via the g-application-command-line-getenv function.
:non-unique
Make no attempts to do any of the typical single-instance application negotiation. The application neither attempts to become the owner of the application ID nor does it check if an existing owner already exists. Everything occurs in the local process.
:can-override-app-id
Allow users to override the application ID from the command line with the --gapplication-app-id option.
:allow-replacement
Allow another instance to take over the bus name. Since 2.60
:replace
Take over from another instance. This flag is usually set by passing the --gapplication-replace option on the command line. Since 2.60
 

See also

*2021-10-8