AppLaunchContext

open class AppLaunchContext(pointer: <Error class: unknown class><<Error class: unknown class>>)

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.

Constructors

Link copied to clipboard
constructor()

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

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val gioAppLaunchContextPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun connectLaunched(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (info: AppInfo, <Error class: unknown class>) -> Unit): <Error class: unknown class>

The signal@Gio.AppLaunchContext::launched signal is emitted when a iface@Gio.AppInfo is successfully launched.

Link copied to clipboard
fun connectLaunchFailed(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (startupNotifyId: String) -> Unit): <Error class: unknown class>

The signal@Gio.AppLaunchContext::launch-failed signal is emitted when a iface@Gio.AppInfo launch fails. The startup notification id is provided, so that the launcher can cancel the startup notification.

Link copied to clipboard
fun connectLaunchStarted(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (info: AppInfo, <Error class: unknown class>?) -> Unit): <Error class: unknown class>

The signal@Gio.AppLaunchContext::launch-started signal is emitted when a iface@Gio.AppInfo is about to be launched. If non-null the

Link copied to clipboard
open fun getDisplay(info: AppInfo, files: <Error class: unknown class>): 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.

Link copied to clipboard

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.

Link copied to clipboard
open fun getStartupNotifyId(info: AppInfo? = null, files: <Error class: unknown class>? = null): String?

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

Link copied to clipboard
open fun launchFailed(startupNotifyId: String)

Called when an application has failed to launch, so that it can cancel the application startup notification started in method@Gio.AppLaunchContext.get_startup_notify_id.

Link copied to clipboard
open fun setenv(variable: String, value: String)

Arranges for @variable to be set to @value in the child’s environment when

Link copied to clipboard
open fun unsetenv(variable: String)

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