Class: Gio::AppLaunchContext

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#environmentArray<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`.

Returns:

  • (Array<Gio::filename>)

    the child’s environment

#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.

Parameters:

  • info (Gio::AppInfo)

    a GApp::Info

  • files (GLib::List)

    a #GList of #GFile objects

Returns:

  • (String)

    a display string for the display.

#get_startup_notify_id(info, files) ⇒ String

Initiates startup notification for the application and returns the ‘DESKTOP_STARTUP_ID` for the launched operation, if supported.

Startup notification IDs are defined in the [FreeDesktop.Org Startup Notifications standard](standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt).

Parameters:

  • info (Gio::AppInfo)

    a GApp::Info

  • files (GLib::List)

    a #GList of of #GFile objects

Returns:

  • (String)

    a startup notification ID for the application, or nil if not supported.

#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().

Parameters:

  • startup_notify_id (String)

    the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().

Returns:

  • (nil)

#newGio::AppLaunchContext

Creates a new application launch context. This is not normally used, instead you instantiate a subclass of this, such as Gdk::AppLaunchContext.

Returns:

#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.

Parameters:

  • variable (Gio::filename)

    the environment variable to set

  • value (Gio::filename)

    the value for to set the variable to.

Returns:

  • (nil)

#unsetenv(variable) ⇒ nil

Arranges for variable to be unset in the child’s environment when context is used to launch an application.

Parameters:

  • variable (Gio::filename)

    the environment variable to remove

Returns:

  • (nil)