Package org.gnome.webkit
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 TypeMethodDescriptionboolean
run
(PrintOperation printOperation) Emitted when printing is requested onwebView
, usually by a JavaScript call, before the print dialog is shown.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)
method.default int
upcall
(MemorySegment sourceWebView, MemorySegment printOperation) Theupcall
method 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 ofprintOperation
to 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 returnfalse
to propagate the event so that the print dialog is shown.You can connect to this signal and return
true
to cancel the print operation or implement your own print dialog. -
upcall
Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.webkit.PrintOperation)
is executed. -
toCallback
Creates a native function pointer to theupcall(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
-