Package org.gnome.gtk
Interface PrintOperationPreview.GotPageSizeCallback
- All Superinterfaces:
FunctionPointer
- Enclosing interface:
PrintOperationPreview
- 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 PrintOperationPreview.GotPageSizeCallback
extends FunctionPointer
Functional interface declaration of the
GotPageSizeCallback
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
run
(PrintContext context, PageSetup pageSetup) Emitted once for each page that gets rendered to the preview.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 void
upcall
(MemorySegment sourcePrintOperationPreview, MemorySegment context, MemorySegment pageSetup) Theupcall
method is called from native code.
-
Method Details
-
run
Emitted once for each page that gets rendered to the preview.A handler for this signal should update the
context
according topageSetup
and set up a suitable cairo context, usingPrintContext.setCairoContext(org.freedesktop.cairo.Context, double, double)
. -
upcall
default void upcall(MemorySegment sourcePrintOperationPreview, MemorySegment context, MemorySegment pageSetup) Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.gtk.PrintContext, org.gnome.gtk.PageSetup)
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
-