Interface NavigationView.GetNextPageCallback

All Superinterfaces:
FunctionPointer
Enclosing class:
NavigationView
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 NavigationView.GetNextPageCallback extends FunctionPointer

Functional interface declaration of the GetNextPageCallback callback.

Since:
1.4
See Also:
  • Method Details

    • run

      Emitted when a push shortcut or a gesture is triggered.

      To support the push shortcuts and gestures, the application is expected to return the page to push in the handler.

      This signal can be emitted multiple times for the gestures, for example when the gesture is cancelled by the user. As such, the application must not make any irreversible changes in the handler, such as removing the page from a forward stack.

      Instead, it should be done in the NavigationView::pushed handler.

      Since:
      1.4
    • upcall

      default MemorySegment upcall(MemorySegment sourceNavigationView)
      The upcall method is called from native code. The parameters are marshaled and run() is executed.
    • toCallback

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