Package org.webkitgtk
Interface WebView.PrintCallback
- 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
PrintCallback callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanrun(@Nullable PrintOperation printOperation) Emitted when printing is requested onwebView,usually by a JavaScript call, before the print dialog is shown.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)method.default intupcall(MemorySegment sourceWebView, MemorySegment printOperation) Theupcallmethod is called from native code.
-
Method Details
-
run
Emitted when printing is requested onwebView,usually by a JavaScript call, before the print dialog is shown. This signal can be used to set the initial print settings and page setup ofprintOperationto be used as default values in the print dialog. You can call webkit_print_operation_set_print_settings() and webkit_print_operation_set_page_setup() and then returnfalseto propagate the event so that the print dialog is shown.You can connect to this signal and return
trueto cancel the print operation or implement your own print dialog. -
upcall
Theupcallmethod is called from native code. The parameters are marshaled andrun(org.webkitgtk.PrintOperation)is executed. -
toCallback
Creates a native function pointer to theupcall(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
-