Interface AppLaunchContext.LaunchStartedCallback

All Superinterfaces:
FunctionPointer
Enclosing class:
AppLaunchContext
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface AppLaunchContext.LaunchStartedCallback extends FunctionPointer

Functional interface declaration of the LaunchStartedCallback callback.

See Also:
  • Method Details

    • run

      void run(@Nullable AppInfo info, @Nullable Variant platformData)

      The Gio.AppLaunchContext::launch-started signal is emitted when a AppInfo is about to be launched. If non-null the platformData 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 Gio.AppLaunchContext::launched or Gio.AppLaunchContext::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.

      Since:
      2.72
    • upcall

      default void upcall(MemorySegment sourceAppLaunchContext, MemorySegment info, MemorySegment platformData)
      The upcall method is called from native code. The parameters are marshaled and run(AppInfo, Variant) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Creates a native function pointer to the upcall(MemorySegment, MemorySegment, MemorySegment) method.
      Specified by:
      toCallback in interface FunctionPointer
      Parameters:
      arena - the arena in which the function pointer is allocated
      Returns:
      the native function pointer