Class: Gio::AppLaunchContext
- Inherits:
-
Object
- Object
- Gio::AppLaunchContext
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#environment ⇒ Array<Gio::filename>
Gets the complete environment variable list to be passed to the child process when context is used to launch an application.
-
#get_display(info, files) ⇒ String
Gets the display string for the context.
-
#get_startup_notify_id(info, files) ⇒ String
Initiates startup notification for the application and returns the
XDG_ACTIVATION_TOKENorDESKTOP_STARTUP_IDfor the launched operation, if supported. -
#initialize ⇒ Gio::AppLaunchContext
constructor
Creates a new application launch context.
-
#launch_failed(startup_notify_id) ⇒ nil
Called when an application has failed to launch, so that it can cancel the application startup notification started in g_app_launch_context_get_startup_notify_id().
-
#setenv(variable, value) ⇒ nil
Arranges for variable to be set to value in the child's environment when context is used to launch an application.
-
#unsetenv(variable) ⇒ nil
Arranges for variable to be unset in the child's environment when context is used to launch an application.
Constructor Details
#initialize ⇒ Gio::AppLaunchContext
Creates a new application launch context. This is not normally used, instead you instantiate a subclass of this, such as Gdk::AppLaunchContext.
Instance Method Details
#environment ⇒ Array<Gio::filename>
Gets the complete environment variable list to be passed to
the child process when context is used to launch an application.
This is an array of strings, where each string has
the form KEY=VALUE.
#get_display(info, files) ⇒ String
Gets the display string for the context. This is used to ensure new
applications are started on the same display as the launching
application, by setting the DISPLAY environment variable.
#get_startup_notify_id(info, files) ⇒ String
Initiates startup notification for the application and returns the
XDG_ACTIVATION_TOKEN or DESKTOP_STARTUP_ID for the launched operation,
if supported.
The returned token may be referred to equivalently as an ‘activation token’ (using Wayland terminology) or a ‘startup sequence ID’ (using X11 terminology). The two are interoperable.
Activation tokens are defined in the XDG Activation Protocol, and startup notification IDs are defined in the freedesktop.org Startup Notification Protocol.
Support for the XDG Activation Protocol was added in GLib 2.76.
#launch_failed(startup_notify_id) ⇒ nil
Called when an application has failed to launch, so that it can cancel the application startup notification started in g_app_launch_context_get_startup_notify_id().
#setenv(variable, value) ⇒ nil
Arranges for variable to be set to value in the child's environment when context is used to launch an application.
#unsetenv(variable) ⇒ nil
Arranges for variable to be unset in the child's environment when context is used to launch an application.