Interface WebView.ShowOptionMenuCallback

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.ShowOptionMenuCallback extends FunctionPointer

Functional interface declaration of the ShowOptionMenuCallback callback.

See Also:
  • Method Details

    • run

      boolean run(@Nullable OptionMenu menu, @Nullable Rectangle rectangle)

      This signal is emitted when a select element in webView needs to display a dropdown menu. This signal can be used to show a custom menu, using menu to get the details of all items that should be displayed. The area of the element in the WebKitWebView is given as rectangle parameter, it can be used to position the menu. To handle this signal asynchronously you should keep a ref of the menu.

      The default signal handler will pop up a GtkMenu.

      Since:
      2.18
    • upcall

      default int upcall(MemorySegment sourceWebView, MemorySegment menu, MemorySegment rectangle)
      The upcall method is called from native code. The parameters are marshaled and run(OptionMenu, Rectangle) 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