AppLaunchContextRef

public struct AppLaunchContextRef : AppLaunchContextProtocol, GWeakCapturing

The AppLaunchContextRef type acts as a lightweight Swift reference to an underlying GdkAppLaunchContext instance. It exposes methods that can operate on this data type through AppLaunchContextProtocol conformance. Use AppLaunchContextRef only as an unowned reference to an existing GdkAppLaunchContext instance.

GdkAppLaunchContext handles launching an application in a graphical context.

It is an implementation of GAppLaunchContext that provides startup notification and allows to launch applications on a specific screen or workspace.

Launching an application

GdkAppLaunchContext *context;

context = gdk_display_get_app_launch_context (display);

gdk_app_launch_context_set_display (display);
gdk_app_launch_context_set_timestamp (gdk_event_get_time (event));

if (!g_app_info_launch_default_for_uri ("http://www.gtk.org", context, &error))
  g_warning ("Launching failed: `s`\n", error->message);

g_object_unref (context);
  • ptr
    Untyped pointer to the underlying `GdkAppLaunchContext` instance.
    

    For type-safe access, use the generated, typed pointer app_launch_context_ptr property instead.

    Declaration

    Swift

    public let ptr: UnsafeMutableRawPointer!

AppLaunchContext Class