Package org.gnome.webkit.wpe
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 TypeMethodDescriptionboolean
run
(ContextMenu contextMenu, 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 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 sourceWebPage, MemorySegment contextMenu, MemorySegment hitTestResult) Theupcall
method 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. -
upcall
default int upcall(MemorySegment sourceWebPage, MemorySegment contextMenu, MemorySegment hitTestResult) Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.webkit.wpe.ContextMenu, org.gnome.webkit.wpe.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:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-