Interface WebPage.ContextMenuCallback
- All Superinterfaces:
FunctionPointer
- Enclosing class:
WebPage
- 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
ContextMenuCallback callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanrun(@Nullable ContextMenu contextMenu, @Nullable WebHitTestResult hitTestResult) Emitted before a context menu is displayed in the UI Process to give the application a chance to customize the proposed menu, build its own context menu or pass user data to the UI Process.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 sourceWebPage, MemorySegment contextMenu, MemorySegment hitTestResult) Theupcallmethod is called from native code.
-
Method Details
-
run
Emitted before a context menu is displayed in the UI Process to give the application a chance to customize the proposed menu, build its own context menu or pass user data to the UI Process. This signal is useful when the information available in the UI Process is not enough to build or customize the context menu, for example, to add menu entries depending on the node at the coordinates of thehitTestResult.Otherwise, it's recommended to useWebKitWebView::context-menu signal instead.- Since:
- 2.8
-
upcall
default int upcall(MemorySegment sourceWebPage, MemorySegment contextMenu, MemorySegment hitTestResult) Theupcallmethod is called from native code. The parameters are marshaled andrun(org.webkitgtk.webprocessextension.ContextMenu, org.webkitgtk.webprocessextension.WebHitTestResult)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
-