Class

GioAppLaunchContext

Description [src]

class Gio.AppLaunchContext : GObject.Object {
  parent_instance: GObject
}

Integrating the launch with the launching application. This is used to handle for instance startup notification and launching the new application on the same screen as the launching window.

Hierarchy

hierarchy this GAppLaunchContext ancestor_0 GObject ancestor_0--this

Ancestors

Constructors

g_app_launch_context_new

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

Instance methods

g_app_launch_context_get_display

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.

g_app_launch_context_get_environment

Gets the complete environment variable list to be passed to the child process when context is used to launch an application. This is a NULL-terminated array of strings, where each string has the form KEY=VALUE.

Available since: 2.32

g_app_launch_context_get_startup_notify_id

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

g_app_launch_context_launch_failed

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

g_app_launch_context_setenv

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

Available since: 2.32

g_app_launch_context_unsetenv

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

Available since: 2.32

Methods inherited from GObject (43)

Signals

Gio.AppLaunchContext::launch-failed

The ::launch-failed signal is emitted when a GAppInfo launch fails. The startup notification id is provided, so that the launcher can cancel the startup notification.

Available since: 2.36

Gio.AppLaunchContext::launched

The ::launched signal is emitted when a GAppInfo is successfully launched. The platform_data is an GVariant dictionary mapping strings to variants (ie a{sv}), which contains additional, platform-specific data about this launch. On UNIX, at least the “pid” and “startup-notification-id” keys will be present.

Available since: 2.36

Signals inherited from GObject (1)

Class structure

struct GioAppLaunchContextClass {
  GObjectClass parent_class;
  char* (* get_display) (
    GAppLaunchContext* context,
    GAppInfo* info,
    GList* files
  );
  char* (* get_startup_notify_id) (
    GAppLaunchContext* context,
    GAppInfo* info,
    GList* files
  );
  void (* launch_failed) (
    GAppLaunchContext* context,
    const char* startup_notify_id
  );
  void (* launched) (
    GAppLaunchContext* context,
    GAppInfo* info,
    GVariant* platform_data
  );
  void (* _g_reserved1) (
void
  );
  void (* _g_reserved2) (
void
  );
  void (* _g_reserved3) (
void
  );
  void (* _g_reserved4) (
void
  );
  
}
Class members
parent_class
GObjectClass
  No description available.
get_display
char* (* get_display) (
    GAppLaunchContext* context,
    GAppInfo* info,
    GList* files
  )
  No description available.
get_startup_notify_id
char* (* get_startup_notify_id) (
    GAppLaunchContext* context,
    GAppInfo* info,
    GList* files
  )
  No description available.
launch_failed
void (* launch_failed) (
    GAppLaunchContext* context,
    const char* startup_notify_id
  )
  No description available.
launched
void (* launched) (
    GAppLaunchContext* context,
    GAppInfo* info,
    GVariant* platform_data
  )
  No description available.
_g_reserved1
void (* _g_reserved1) (
void
  )
  No description available.
_g_reserved2
void (* _g_reserved2) (
void
  )
  No description available.
_g_reserved3
void (* _g_reserved3) (
void
  )
  No description available.
_g_reserved4
void (* _g_reserved4) (
void
  )
  No description available.

Virtual methods

Gio.AppLaunchContextClass.get_display

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.

Gio.AppLaunchContextClass.get_startup_notify_id

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

Gio.AppLaunchContextClass.launch_failed

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

Gio.AppLaunchContextClass.launched
No description available.