Package org.webkitgtk
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 TypeMethodDescriptionbooleanrun(@Nullable OptionMenu menu, @Nullable Rectangle rectangle) This signal is emitted when a select element inwebViewneeds to display a dropdown menu.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)method.default intupcall(MemorySegment sourceWebView, MemorySegment menu, MemorySegment rectangle) Theupcallmethod is called from native code.
-
Method Details
-
run
This signal is emitted when a select element inwebViewneeds to display a dropdown menu. This signal can be used to show a custom menu, usingmenuto get the details of all items that should be displayed. The area of the element in theWebKitWebViewis given asrectangleparameter, 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.- Since:
- 2.18
-
upcall
Theupcallmethod is called from native code. The parameters are marshaled andrun(org.webkitgtk.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:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-