Package org.gnome.gtk
Interface PrintOperation.PaginateCallback
- All Superinterfaces:
FunctionPointer
- Enclosing class:
PrintOperation
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public static interface PrintOperation.PaginateCallback
extends FunctionPointer
Functional interface declaration of the
PaginateCallback
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
run
(PrintContext context) Emitted after the ::begin-print signal, but before the actual rendering starts.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 sourcePrintOperation, MemorySegment context) Theupcall
method is called from native code.
-
Method Details
-
run
Emitted after the ::begin-print signal, but before the actual rendering starts.It keeps getting emitted until a connected signal handler returns
true
.The ::paginate signal is intended to be used for paginating a document in small chunks, to avoid blocking the user interface for a long time. The signal handler should update the number of pages using
PrintOperation.setNPages(int)
, and returntrue
if the document has been completely paginated.If you don't need to do pagination in chunks, you can simply do it all in the ::begin-print handler, and set the number of pages from there.
-
upcall
Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.gtk.PrintContext)
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
-