Package org.gnome.webkit
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.
Functional interface declaration of the
ShowOptionMenuCallback
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
run
(OptionMenu menu, Rectangle rectangle) This signal is emitted when a select element inwebView
needs to display a dropdown menu.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.default int
upcall
(MemorySegment sourceWebView, MemorySegment menu, MemorySegment rectangle) Theupcall
method is called from native code.
-
Method Details
-
run
This signal is emitted when a select element inwebView
needs to display a dropdown menu. This signal can be used to show a custom menu, usingmenu
to get the details of all items that should be displayed. The area of the element in theWebKitWebView
is given asrectangle
parameter, it can be used to position the menu. To handle this signal asynchronously you should keep a ref of themenu
.The default signal handler will pop up a
GtkMenu
. -
upcall
Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.webkit.OptionMenu, org.gnome.gdk.Rectangle)
is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.- Specified by:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-