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

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

The #GAppLaunchContext::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.

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

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, files: <Error class: unknown class>): String?

Initiates startup notification for the application and returns the 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 g_app_launch_context_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 @context is used to launch an application.

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.