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.
type Cb_Gapp_Launch_Context_Gapp_Info_Gvariant_Or_Null_Void is not null access procedure
(Self : access Gapp_Launch_Context_Record'Class;
Info : Glib.App_Info.Gapp_Info;
Platform_Data : Glib.Variant.Gvariant);
type Cb_Gapp_Launch_Context_Gapp_Info_Gvariant_Void is not null access procedure
(Self : access Gapp_Launch_Context_Record'Class;
Info : Glib.App_Info.Gapp_Info;
Platform_Data : Glib.Variant.Gvariant);
type Cb_Gapp_Launch_Context_UTF8_String_Void is not null access procedure
(Self : access Gapp_Launch_Context_Record'Class;
Startup_Notify_Id : UTF8_String);
type Cb_GObject_Gapp_Info_Gvariant_Or_Null_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class;
Info : Glib.App_Info.Gapp_Info;
Platform_Data : Glib.Variant.Gvariant);
type Cb_GObject_Gapp_Info_Gvariant_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class;
Info : Glib.App_Info.Gapp_Info;
Platform_Data : Glib.Variant.Gvariant);
type Cb_GObject_UTF8_String_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class;
Startup_Notify_Id : UTF8_String);
procedure G_New (Self : out Gapp_Launch_Context)
Creates a new application launch context. This is not normally used, instead you instantiate a subclass of this, such as Gdk.App_Launch_Context.Gdk_App_Launch_Context.
type Gapp_Launch_Context is access all Gapp_Launch_Context_Record'Class;
function Gapp_Launch_Context_New return Gapp_Launch_Context
Creates a new application launch context. This is not normally used, instead you instantiate a subclass of this, such as Gdk.App_Launch_Context.Gdk_App_Launch_Context.
type Gapp_Launch_Context_Record is new GObject_Record with null record;
function Get_Display
(Self : not null access Gapp_Launch_Context_Record;
Info : Glib.App_Info.Gapp_Info;
Files : Glib.GFile.Gfile_List.Glist) return UTF8_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.
a Glib.App_Info.Gapp_Info
a GList of Glib.GFile.Gfile objects
a display string for the display.
function Get_Environment
(Self : not null access Gapp_Launch_Context_Record)
return GNAT.Strings.String_List
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. Since: gtk+ 2.32
the child's environment
function Get_Startup_Notify_Id
(Self : not null access Gapp_Launch_Context_Record;
Info : Glib.App_Info.Gapp_Info;
Files : Glib.GFile.Gfile_List.Glist) return UTF8_String
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.
a Glib.App_Info.Gapp_Info
a GList of Glib.GFile.Gfile objects
a startup notification ID for the application, or null if not supported.
function Get_Type return Glib.GType
procedure Initialize
(Self : not null access Gapp_Launch_Context_Record'Class)
Creates a new application launch context. This is not normally used, instead you instantiate a subclass of this, such as Gdk.App_Launch_Context.Gdk_App_Launch_Context. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
procedure Launch_Failed
(Self : not null access Gapp_Launch_Context_Record;
Startup_Notify_Id : UTF8_String)
Called when an application has failed to launch, so that it can cancel the application startup notification started in Glib.App_Launch_Context.Get_Startup_Notify_Id.
the startup notification id that was returned by Glib.App_Launch_Context.Get_Startup_Notify_Id.
procedure On_Launch_Failed
(Self : not null access Gapp_Launch_Context_Record;
Call : Cb_Gapp_Launch_Context_UTF8_String_Void;
After : Boolean := False)
The Glib.App_Launch_Context.Gapp_Launch_Context::launch-failed signal is emitted when a Glib.App_Info.Gapp_Info 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.
procedure On_Launch_Failed
(Self : not null access Gapp_Launch_Context_Record;
Call : Cb_GObject_UTF8_String_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
The Glib.App_Launch_Context.Gapp_Launch_Context::launch-failed signal is emitted when a Glib.App_Info.Gapp_Info 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.
procedure On_Launch_Started
(Self : not null access Gapp_Launch_Context_Record;
Call : Cb_Gapp_Launch_Context_Gapp_Info_Gvariant_Or_Null_Void;
After : Boolean := False)
The Glib.App_Launch_Context.Gapp_Launch_Context::launch-started signal is emitted when a Glib.App_Info.Gapp_Info 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. It allows tracking the progress of the launchee through startup.
It is guaranteed that this signal is followed by either a Glib.App_Launch_Context.Gapp_Launch_Context::launched or Glib.App_Launch_Context.Gapp_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.
Callback parameters: -- @param Info the Glib.App_Info.Gapp_Info that is about to be launched -- @param Platform_Data additional platform-specific data for this launch
procedure On_Launch_Started
(Self : not null access Gapp_Launch_Context_Record;
Call : Cb_GObject_Gapp_Info_Gvariant_Or_Null_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
The Glib.App_Launch_Context.Gapp_Launch_Context::launch-started signal is emitted when a Glib.App_Info.Gapp_Info 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. It allows tracking the progress of the launchee through startup.
It is guaranteed that this signal is followed by either a Glib.App_Launch_Context.Gapp_Launch_Context::launched or Glib.App_Launch_Context.Gapp_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.
Callback parameters: -- @param Info the Glib.App_Info.Gapp_Info that is about to be launched -- @param Platform_Data additional platform-specific data for this launch
procedure On_Launched
(Self : not null access Gapp_Launch_Context_Record;
Call : Cb_Gapp_Launch_Context_Gapp_Info_Gvariant_Void;
After : Boolean := False)
The Glib.App_Launch_Context.Gapp_Launch_Context::launched signal is emitted when a Glib.App_Info.Gapp_Info 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 Glib.App_Launch_Context.Gapp_Launch_Context::launched signal emission; after the signal is emitted, GLib will call Glib.Spawn.Spawn_Close_Pid. If you need to keep the GPid after the signal has been emitted, then you can duplicate pid using DuplicateHandle.
Callback parameters: -- @param Info the Glib.App_Info.Gapp_Info that was just launched -- @param Platform_Data additional platform-specific data for this launch
procedure On_Launched
(Self : not null access Gapp_Launch_Context_Record;
Call : Cb_GObject_Gapp_Info_Gvariant_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
The Glib.App_Launch_Context.Gapp_Launch_Context::launched signal is emitted when a Glib.App_Info.Gapp_Info 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 Glib.App_Launch_Context.Gapp_Launch_Context::launched signal emission; after the signal is emitted, GLib will call Glib.Spawn.Spawn_Close_Pid. If you need to keep the GPid after the signal has been emitted, then you can duplicate pid using DuplicateHandle.
Callback parameters: -- @param Info the Glib.App_Info.Gapp_Info that was just launched -- @param Platform_Data additional platform-specific data for this launch
procedure Setenv
(Self : not null access Gapp_Launch_Context_Record;
Variable : UTF8_String;
Value : UTF8_String)
Arranges for Variable to be set to Value in the child's environment when Context is used to launch an application. Since: gtk+ 2.32
the environment variable to set
the value for to set the variable to.
Signal_Launch_Failed : constant Glib.Signal_Name := "launch-failed";
The Glib.App_Launch_Context.Gapp_Launch_Context::launch-failed signal is emitted when a Glib.App_Info.Gapp_Info 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.
Signal_Launch_Started : constant Glib.Signal_Name := "launch-started";
The Glib.App_Launch_Context.Gapp_Launch_Context::launch-started signal is emitted when a Glib.App_Info.Gapp_Info 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. It allows tracking the progress of the launchee through startup.
It is guaranteed that this signal is followed by either a Glib.App_Launch_Context.Gapp_Launch_Context::launched or Glib.App_Launch_Context.Gapp_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.
Callback parameters: -- @param Info the Glib.App_Info.Gapp_Info that is about to be launched -- @param Platform_Data additional platform-specific data for this launch
Signal_Launched : constant Glib.Signal_Name := "launched";
The Glib.App_Launch_Context.Gapp_Launch_Context::launched signal is emitted when a Glib.App_Info.Gapp_Info 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 Glib.App_Launch_Context.Gapp_Launch_Context::launched signal emission; after the signal is emitted, GLib will call Glib.Spawn.Spawn_Close_Pid. If you need to keep the GPid after the signal has been emitted, then you can duplicate pid using DuplicateHandle.
Callback parameters: -- @param Info the Glib.App_Info.Gapp_Info that was just launched -- @param Platform_Data additional platform-specific data for this launch
procedure Unsetenv
(Self : not null access Gapp_Launch_Context_Record;
Variable : UTF8_String)
Arranges for Variable to be unset in the child's environment when Context is used to launch an application. Since: gtk+ 2.32
the environment variable to remove