It derives from <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.
parent-instanceGets the display string for the self. This is used to ensure new
applications are started on the same display as the launching
application, by setting the DISPLAY environment variable.
Passed: a <GAppLaunchContext>.
the launch context
Passed: a <GAppInfo>.
the app info
Passed: a list, each a <GFile>.
a list of <GFile> objects
Returned: a string, or #f.
a display string for the display.
Gets the complete environment variable list to be passed to the child
process when self is used to launch an application. This is a
NULL-terminated array of strings, where each string has the form
KEY=VALUE.
Passed: a <GAppLaunchContext>.
the launch context
Returned: a vector, each a file name, as a string.
the child’s environment
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. Since
GLib 2.82 info and files can be NULL. If that’s not
supported by the backend, the returned token will be NULL.
Passed: a <GAppLaunchContext>.
the launch context
Passed, or left out: a <GAppInfo>, or #f.
the app info
Passed, or left out: a list, each a <GFile>, or
#f.
a list of <GFile> objects
Returned: a string, or #f.
a startup notification ID for the application, or NULL if not
supported.
Called when an application has failed to launch, so that it can cancel
the application startup notification started in
app-launch-context:get-startup-notify-id.
Passed: a <GAppLaunchContext>.
the launch context
Passed: a string.
the startup notification id that was returned by
app-launch-context:get-startup-notify-id.
Creates a new application launch context. This is not normally used, instead you instantiate a subclass of this, such as ‘GdkAppLaunchContext‘.
Returned: a <GAppLaunchContext>.
a launch context.
Arranges for variable to be set to value in the child’s environment when self is used to launch an application.
Passed: a <GAppLaunchContext>.
the launch context
Passed: a file name, as a string.
the environment variable to set
Passed: a file name, as a string.
the value for to set the variable to.
Arranges for variable to be unset in the child’s environment when self is used to launch an application.
Passed: a <GAppLaunchContext>.
the launch context
Passed: a file name, as a string.
the environment variable to remove
Connect a handler with (connect object
app-launch-context:launch-failed handler). It is called as
(handler self startup-notify-id).
The app-launch-context: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.
Because a launch operation may involve spawning multiple instances of the target application, you should expect this signal to be emitted multiple times, one for each spawned instance.
Passed: a <GAppLaunchContext>.
Passed: a string.
the startup notification id for the failed launch
Connect a handler with (connect object
app-launch-context:launch-started handler). It is called as
(handler self info platform-data).
The app-launch-context:launch-started signal is emitted
when a <GAppInfo> is about to be launched. If
non-null 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
startup-notification-id keys will be present.
The value of the startup-notification-id key (type s) is a
startup notification ID corresponding to the format from the
[startup-notification
specification](https://specifications.freedesktop.org/startup-notification-spec/startup-notification-0.1.txt).
It allows tracking the progress of the launchee through startup.
It is guaranteed that this signal is followed by either a
app-launch-context:launched or app-launch-context:launch-failed signal.
Because a launch operation may involve spawning multiple instances of the target application, you should expect this signal to be emitted multiple times, one for each spawned instance.
Passed: a <GAppLaunchContext>.
Passed: a <GAppInfo>.
the <GAppInfo> that is about to be launched
Passed: a <GVariant>, or #f.
additional platform-specific data for this launch
Connect a handler with (connect object app-launch-context:launched
handler). It is called as (handler self info platform-data).
The app-launch-context:launched signal is emitted when a
<GAppInfo> is successfully launched.
Because a launch operation may involve spawning multiple instances of the target application, you should expect this signal to be emitted multiple times, one time for each spawned instance.
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.
Since 2.72 the pid may be 0 if the process id wasn’t known (for
example if the process was launched via D-Bus). The pid may not
be set at all in subsequent releases.
On Windows, pid is guaranteed to be valid only for the duration
of the app-launch-context:launched signal emission; after the
signal is emitted, GLib will call
spawn-close-pid. If you need to keep
the GLib.Pid after the signal has been emitted, then you can
duplicate pid using DuplicateHandle().
Passed: a <GAppLaunchContext>.
Passed: a <GAppInfo>.
the <GAppInfo> that was just launched
Passed: a <GVariant>.
additional platform-specific data for this launch
Gets the display string for the self. This is used to ensure new
applications are started on the same display as the launching
application, by setting the DISPLAY environment variable.
To override it in a new class, give register-type #:vfuncs
`((get-display . ,procedure)). The procedure is called as
(procedure self info files) ⇒ %return.
Passed: the class whose implementation to call:
<GAppLaunchContext>, or a class that
derives from it, or its GType number.
Passed: a <GAppLaunchContext>.
the launch context
Passed: a <GAppInfo>.
the app info
Passed: a list, each a <GFile>.
a list of <GFile> objects
Returned: a string, or #f.
a display string for the display.
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. Since
GLib 2.82 info and files can be NULL. If that’s not
supported by the backend, the returned token will be NULL.
To override it in a new class, give register-type #:vfuncs
`((get-startup-notify-id . ,procedure)). The procedure is called as
(procedure self info files) ⇒ %return.
Passed: the class whose implementation to call:
<GAppLaunchContext>, or a class that
derives from it, or its GType number.
Passed: a <GAppLaunchContext>.
the launch context
Passed, or left out: a <GAppInfo>, or #f.
the app info
Passed, or left out: a list, each a <GFile>, or
#f.
a list of <GFile> objects
Returned: a string, or #f.
a startup notification ID for the application, or NULL if not
supported.
Called when an application has failed to launch, so that it can cancel
the application startup notification started in
app-launch-context:get-startup-notify-id.
To override it in a new class, give register-type #:vfuncs
`((launch-failed . ,procedure)). The procedure is called as
(procedure self startup-notify-id).
Passed: the class whose implementation to call:
<GAppLaunchContext>, or a class that
derives from it, or its GType number.
Passed: a <GAppLaunchContext>.
the launch context
Passed: a string.
the startup notification id that was returned by
app-launch-context:get-startup-notify-id.
To override it in a new class, give register-type #:vfuncs
`((launch-started . ,procedure)). The procedure is called as
(procedure self info platform-data).
Passed: the class whose implementation to call:
<GAppLaunchContext>, or a class that
derives from it, or its GType number.
Passed: a <GAppLaunchContext>.
Passed: a <GAppInfo>.
Passed: a <GVariant>.
To override it in a new class, give register-type #:vfuncs
`((launched . ,procedure)). The procedure is called as
(procedure self info platform-data).
Passed: the class whose implementation to call:
<GAppLaunchContext>, or a class that
derives from it, or its GType number.
Passed: a <GAppLaunchContext>.
Passed: a <GAppInfo>.
Passed: a <GVariant>.