Class AppLaunchContext.Builder<B extends AppLaunchContext.Builder<B>>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Direct Known Subclasses:
AppLaunchContext.Builder
- Enclosing class:
AppLaunchContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theAppLaunchContextobject.TheGio.AppLaunchContext::launchedsignal is emitted when aAppInfois successfully launched.TheGio.AppLaunchContext::launch-failedsignal is emitted when aAppInfolaunch fails.TheGio.AppLaunchContext::launch-startedsignal is emitted when aAppInfois about to be launched.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theAppLaunchContextobject. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])to create a new GObject instance, which is then cast toAppLaunchContext.- Overrides:
buildin classGObject.Builder<B extends AppLaunchContext.Builder<B>>- Returns:
- a new instance of
AppLaunchContextwith the properties that were set in the Builder object.
-
onLaunchFailed
TheGio.AppLaunchContext::launch-failedsignal is emitted when aAppInfolaunch 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.
- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.36
- See Also:
-
onLaunchStarted
TheGio.AppLaunchContext::launch-startedsignal is emitted when aAppInfois about to be launched. If non-null theplatformDatais an GVariant dictionary mapping strings to variants (iea{sv}), which contains additional, platform-specific data about this launch. On UNIX, at least thestartup-notification-idkeys will be present.The value of the
startup-notification-idkey (types) 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
Gio.AppLaunchContext::launchedorGio.AppLaunchContext::launch-failedsignal.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.
- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.72
- See Also:
-
onLaunched
TheGio.AppLaunchContext::launchedsignal is emitted when aAppInfois 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
platformDatais an GVariant dictionary mapping strings to variants (iea{sv}), which contains additional, platform-specific data about this launch. On UNIX, at least thepidandstartup-notification-idkeys will be present.Since 2.72 the
pidmay be 0 if the process id wasn’t known (for example if the process was launched via D-Bus). Thepidmay not be set at all in subsequent releases.On Windows,
pidis guaranteed to be valid only for the duration of theGio.AppLaunchContext::launchedsignal emission; after the signal is emitted, GLib will callGLib.spawnClosePid(org.gnome.glib.Pid). If you need to keep theGLib.Pidafter the signal has been emitted, then you can duplicatepidusingDuplicateHandle().- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 2.36
- See Also:
-