package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.gio/Ocgtk_gio/Gio/Wrappers/App_launch_context/index.html

Module Wrappers.App_launch_context

type t = [ `app_launch_context | `object_ ] Gobject.obj
val new_ : unit -> t

Create a new AppLaunchContext

val unsetenv : t -> string -> unit

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

val setenv : t -> string -> string -> unit

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

val launch_failed : t -> string -> unit

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

val get_startup_notify_id : t -> [ `app_info ] Gobject.obj -> [ `file ] Gobject.obj list -> string option

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(https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/xdg-activation/x11-interoperation.rst).

Activation tokens are defined in the XDG Activation Protocol(https://wayland.app/protocols/xdg-activation-v1), and startup notification IDs are defined in the freedesktop.org Startup Notification Protocol(http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt).

Support for the XDG Activation Protocol was added in GLib 2.76.

val get_environment : t -> string array

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`.

val get_display : t -> [ `app_info ] Gobject.obj -> [ `file ] Gobject.obj list -> string option

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.

val on_launch_failed : ?after:bool -> t -> callback:(startup_notify_id:string -> unit) -> Gobject.Signal.handler_id
val on_launch_started : ?after:bool -> t -> callback:(info:[ `app_info ] Gobject.obj -> platform_data:Gvariant.t -> unit) -> Gobject.Signal.handler_id
val on_launched : ?after:bool -> t -> callback:(info:[ `app_info ] Gobject.obj -> platform_data:Gvariant.t -> unit) -> Gobject.Signal.handler_id