Interface DrawingAreaDrawFunc

All Superinterfaces:
FunctionPointer
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface @Generated("org.javagi.JavaGI") public interface DrawingAreaDrawFunc extends FunctionPointer

Functional interface declaration of the DrawingAreaDrawFunc callback.

See Also:
  • Method Details

    • run

      void run(DrawingArea drawingArea, org.freedesktop.cairo.Context cr, int width, int height)

      Whenever drawingArea needs to redraw, this function will be called.

      This function should exclusively redraw the contents of the drawing area and must not call any widget functions that cause changes.

      Parameters:
      drawingArea - the GtkDrawingArea to redraw
      cr - the context to draw to
      width - the actual width of the contents. This value will be at least as wide as GtkDrawingArea:width.
      height - the actual height of the contents. This value will be at least as wide as GtkDrawingArea:height.
    • upcall

      default void upcall(MemorySegment drawingArea, MemorySegment cr, int width, int height, MemorySegment userData)
      The upcall method is called from native code. The parameters are marshaled and run(DrawingArea, Context, int, int) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Creates a native function pointer to the upcall(MemorySegment, MemorySegment, int, int, MemorySegment) method.
      Specified by:
      toCallback in interface FunctionPointer
      Parameters:
      arena - the arena in which the function pointer is allocated
      Returns:
      the native function pointer