Interface WebView.ShowNotificationCallback

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

Functional interface declaration of the ShowNotificationCallback callback.

See Also:
  • Method Details

    • run

      boolean run(@Nullable Notification notification)

      This signal is emitted when a notification should be presented to the user. The notification is kept alive until either: 1) the web page cancels it or 2) a navigation happens.

      The default handler will emit a notification using libnotify, if built with support for it.

      Since:
      2.8
    • upcall

      default int upcall(MemorySegment sourceWebView, MemorySegment notification)
      The upcall method is called from native code. The parameters are marshaled and run(Notification) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Creates a native function pointer to the upcall(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