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 TypeMethodDescriptionvoidrun(@Nullable PrintContext context, @Nullable PageSetup pageSetup) Emitted once for each page that gets rendered to the preview.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)method.default voidupcall(MemorySegment sourcePrintOperationPreview, MemorySegment context, MemorySegment pageSetup) Theupcallmethod 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
contextaccording topageSetupand set up a suitable cairo context, usingPrintContext.setCairoContext(org.freedesktop.cairo.Context, double, double). -
upcall
default void upcall(MemorySegment sourcePrintOperationPreview, MemorySegment context, MemorySegment pageSetup) Theupcallmethod 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:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-