Gio.AppLaunchContext¶
| Subclasses: | None |
|---|
Methods¶
| Inherited: | GObject.Object (37) |
|---|---|
| Structs: | GObject.ObjectClass (5) |
| class | new () |
get_display (info, files) |
|
get_environment () |
|
get_startup_notify_id (info, files) |
|
launch_failed (startup_notify_id) |
|
setenv (variable, value) |
|
unsetenv (variable) |
Virtual Methods¶
| Inherited: | GObject.Object (7) |
|---|
do_get_display (info, files) |
|
do_get_startup_notify_id (info, files) |
|
do_launch_failed (startup_notify_id) |
|
do_launched (info, platform_data) |
Properties¶
None
Signals¶
| Inherited: | GObject.Object (1) |
|---|
| Name | Short Description |
|---|---|
launch-failed |
The ::launch-failed signal is emitted when a Gio.AppInfo launch fails. |
launched |
The ::launched signal is emitted when a Gio.AppInfo is successfully launched. |
Class Details¶
-
class
Gio.AppLaunchContext(**kwargs)¶ Bases: GObject.ObjectAbstract: No Structure: Gio.AppLaunchContextClassIntegrating 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.
-
classmethod
new()[source]¶ Returns: a Gio.AppLaunchContext.Return type: Gio.AppLaunchContextCreates a new application launch context. This is not normally used, instead you instantiate a subclass of this, such as #GdkAppLaunchContext.
-
get_display(info, files)[source]¶ Parameters: - info (
Gio.AppInfo) – aGio.AppInfo - files ([
Gio.File]) – aGLib.ListofGio.Fileobjects
Returns: a display string for the display.
Return type: Gets the display string for the self. This is used to ensure new applications are started on the same display as the launching application, by setting the
DISPLAYenvironment variable.- info (
-
get_environment()[source]¶ Returns: the child’s environment Return type: [ str]Gets the complete environment variable list to be passed to the child process when self is used to launch an application. This is a
None-terminated array of strings, where each string has the formKEY=VALUE.New in version 2.32.
-
get_startup_notify_id(info, files)[source]¶ Parameters: - info (
Gio.AppInfo) – aGio.AppInfo - files ([
Gio.File]) – aGLib.Listof ofGio.Fileobjects
Returns: a startup notification ID for the application, or
Noneif not supported.Return type: Initiates startup notification for the application and returns the
DESKTOP_STARTUP_IDfor the launched operation, if supported.Startup notification IDs are defined in the FreeDesktop.Org Startup Notifications standard.
- info (
-
launch_failed(startup_notify_id)[source]¶ Parameters: startup_notify_id ( str) – the startup notification id that was returned byGio.AppLaunchContext.get_startup_notify_id().Called when an application has failed to launch, so that it can cancel the application startup notification started in
Gio.AppLaunchContext.get_startup_notify_id().
-
setenv(variable, value)[source]¶ Parameters: Arranges for variable to be set to value in the child’s environment when self is used to launch an application.
New in version 2.32.
-
unsetenv(variable)[source]¶ Parameters: variable ( str) – the environment variable to removeArranges for variable to be unset in the child’s environment when self is used to launch an application.
New in version 2.32.
-
do_get_display(info, files) virtual¶ Parameters: - info (
Gio.AppInfo) – aGio.AppInfo - files ([
Gio.File]) – aGLib.ListofGio.Fileobjects
Returns: a display string for the display.
Return type: 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
DISPLAYenvironment variable.- info (
-
do_get_startup_notify_id(info, files) virtual¶ Parameters: - info (
Gio.AppInfo) – aGio.AppInfo - files ([
Gio.File]) – aGLib.Listof ofGio.Fileobjects
Returns: a startup notification ID for the application, or
Noneif not supported.Return type: Initiates startup notification for the application and returns the
DESKTOP_STARTUP_IDfor the launched operation, if supported.Startup notification IDs are defined in the FreeDesktop.Org Startup Notifications standard.
- info (
-
do_launch_failed(startup_notify_id) virtual¶ Parameters: startup_notify_id ( str) – the startup notification id that was returned byGio.AppLaunchContext.get_startup_notify_id().Called when an application has failed to launch, so that it can cancel the application startup notification started in
Gio.AppLaunchContext.get_startup_notify_id().
-
do_launched(info, platform_data) virtual¶ Parameters: - info (
Gio.AppInfo) – - platform_data (
GLib.Variant) –
- info (
-
classmethod
Signal Details¶
-
Gio.AppLaunchContext.signals.launch_failed(app_launch_context, startup_notify_id)¶ Signal Name: launch-failedFlags: Parameters: - app_launch_context (
Gio.AppLaunchContext) – The object which received the signal - startup_notify_id (
str) – the startup notification id for the failed launch
The
::launch-failedsignal is emitted when aGio.AppInfolaunch fails. The startup notification id is provided, so that the launcher can cancel the startup notification.New in version 2.36.
- app_launch_context (
-
Gio.AppLaunchContext.signals.launched(app_launch_context, info, platform_data)¶ Signal Name: launchedFlags: Parameters: - app_launch_context (
Gio.AppLaunchContext) – The object which received the signal - info (
Gio.AppInfo) – theGio.AppInfothat was just launched - platform_data (
GLib.Variant) – additional platform-specific data for this launch
The
::launchedsignal is emitted when aGio.AppInfois successfully launched. The platform_data is anGLib.Variantdictionary 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.New in version 2.36.
- app_launch_context (