Class AppLaunchContext

All Implemented Interfaces:
PointerInterface
Direct Known Subclasses:
AppLaunchContext

public class AppLaunchContext extends Object
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.

https://docs.gtk.org/gio/class.AppLaunchContext.html

  • Field Details

  • Constructor Details

    • AppLaunchContext

      public AppLaunchContext(PointerContainer pointer)
    • 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

      public static ClassHandler getClassHandler()
    • getDisplay

      public Str getDisplay(@Nonnull AppInfo info, @Nonnull List files)
      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 #GAppInfo
      files - a #GList of #GFile objects
      Returns:
      a display string for the display.
    • getEnvironment

      public Strs 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

      public Str getStartupNotifyId(@Nonnull AppInfo info, @Nonnull List files)
      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 #GAppInfo
      files - a #GList of of #GFile objects
      Returns:
      a startup notification ID for the application, or %NULL if not supported.
    • launchFailed

      public void launchFailed(@Nonnull 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().
      Parameters:
      startup_notify_id - the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().
    • launchFailed

      public 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().
      Parameters:
      startup_notify_id - the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().
    • setenv

      public void setenv(@Nonnull Str variable, @Nonnull Str value)
      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 set
      value - the value for to set the variable to.
    • setenv

      public void setenv(String variable, String value)
      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 set
      value - the value for to set the variable to.
    • unsetenv

      public void unsetenv(@Nonnull Str variable)
      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

      public void unsetenv(String variable)
      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

      public SignalHandler onLaunchFailed(AppLaunchContext.OnLaunchFailed signal)
      Connect to signal "launch-failed".
      See AppLaunchContext.OnLaunchFailed.onLaunchFailed(ch.bailu.gtk.type.Str) for signal description.
      Field SIGNAL_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

      public SignalHandler onLaunchStarted(AppLaunchContext.OnLaunchStarted signal)
      Connect to signal "launch-started".
      See AppLaunchContext.OnLaunchStarted.onLaunchStarted(ch.bailu.gtk.gio.AppInfo, ch.bailu.gtk.glib.Variant) for signal description.
      Field SIGNAL_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

      public SignalHandler onLaunched(AppLaunchContext.OnLaunched signal)
      Connect to signal "launched".
      See AppLaunchContext.OnLaunched.onLaunched(ch.bailu.gtk.gio.AppInfo, ch.bailu.gtk.glib.Variant) for signal description.
      Field SIGNAL_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

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()