Package ch.bailu.gtk.gio
Class AppLaunchContext
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.gio.AppLaunchContext
- All Implemented Interfaces:
PointerInterface
- Direct Known Subclasses:
AppLaunchContext
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.
handle for instance startup notification and launching the new application
on the same screen as the launching window.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
static interface
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
ConstructorDescriptionCreates a new application launch context.AppLaunchContext
(PointerContainer pointer) -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassHandler
getDisplay
(AppInfo info, List files) Gets the display string for the @context.Gets the complete environment variable list to be passed to
the child process when @context is used to launch an application.static int
static long
static TypeSystem.TypeSize
getStartupNotifyId
(AppInfo info, List files) Initiates startup notification for the application and returns the
`DESKTOP_STARTUP_ID` for the launched operation, if supported.static long
static TypeSystem.TypeSize
void
launchFailed
(Str startup_notify_id) 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().void
launchFailed
(String startup_notify_id) 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().Connect to signal "launched".Connect to signal "launch-failed".Connect to signal "launch-started".void
Arranges for @variable to be set to @value in the child's
environment when @context is used to launch an application.void
Arranges for @variable to be set to @value in the child's
environment when @context is used to launch an application.void
Arranges for @variable to be unset in the child's environment
when @context is used to launch an application.void
Arranges for @variable to be unset in the child's environment
when @context is used to launch an application.Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Field Details
-
SIGNAL_ON_LAUNCH_FAILED
- See Also:
-
SIGNAL_ON_LAUNCH_STARTED
- See Also:
-
SIGNAL_ON_LAUNCHED
- See Also:
-
-
Constructor Details
-
AppLaunchContext
-
AppLaunchContext
public AppLaunchContext()Creates a new application launch context. This is not normally used,
instead you instantiate a subclass of this, such as #GdkAppLaunchContext.
-
-
Method Details
-
getClassHandler
-
getDisplay
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.- Parameters:
info
- a #GAppInfofiles
- a #GList of #GFile objects- Returns:
- a display string for the display.
-
getEnvironment
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`.- Returns:
- the child's environment
-
getStartupNotifyId
Initiates startup notification for the application and returns the
`DESKTOP_STARTUP_ID` for the launched operation, if supported.
Startup notification IDs are defined in the
[FreeDesktop.Org Startup Notifications standard](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt).- Parameters:
info
- a #GAppInfofiles
- a #GList of of #GFile objects- Returns:
- a startup notification ID for the application, or %NULL if not supported.
-
launchFailed
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().- Parameters:
startup_notify_id
- the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().
-
launchFailed
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().- Parameters:
startup_notify_id
- the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().
-
setenv
Arranges for @variable to be set to @value in the child's
environment when @context is used to launch an application.- Parameters:
variable
- the environment variable to setvalue
- the value for to set the variable to.
-
setenv
Arranges for @variable to be set to @value in the child's
environment when @context is used to launch an application.- Parameters:
variable
- the environment variable to setvalue
- the value for to set the variable to.
-
unsetenv
Arranges for @variable to be unset in the child's environment
when @context is used to launch an application.- Parameters:
variable
- the environment variable to remove
-
unsetenv
Arranges for @variable to be unset in the child's environment
when @context is used to launch an application.- Parameters:
variable
- the environment variable to remove
-
onLaunchFailed
Connect to signal "launch-failed".
SeeAppLaunchContext.OnLaunchFailed.onLaunchFailed(ch.bailu.gtk.type.Str)
for signal description.
FieldSIGNAL_ON_LAUNCH_FAILED
contains original signal name and can be used as resource reference.- Parameters:
signal
- callback function (lambda).- Returns:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
onLaunchStarted
Connect to signal "launch-started".
SeeAppLaunchContext.OnLaunchStarted.onLaunchStarted(ch.bailu.gtk.gio.AppInfo, ch.bailu.gtk.glib.Variant)
for signal description.
FieldSIGNAL_ON_LAUNCH_STARTED
contains original signal name and can be used as resource reference.- Parameters:
signal
- callback function (lambda).- Returns:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
onLaunched
Connect to signal "launched".
SeeAppLaunchContext.OnLaunched.onLaunched(ch.bailu.gtk.gio.AppInfo, ch.bailu.gtk.glib.Variant)
for signal description.
FieldSIGNAL_ON_LAUNCHED
contains original signal name and can be used as resource reference.- Parameters:
signal
- callback function (lambda).- Returns:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-