Interface Overlay.GetChildPositionCallback

All Superinterfaces:
FunctionPointer
Enclosing class:
Overlay
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 Overlay.GetChildPositionCallback extends FunctionPointer

Functional interface declaration of the GetChildPositionCallback callback.

See Also:
  • Method Details

    • run

      boolean run(@Nullable Widget widget, @Nullable Rectangle allocation)

      Emitted to determine the position and size of any overlay child widgets.

      A handler for this signal should fill allocation with the desired position and size for widget, relative to the 'main' child of overlay.

      The default handler for this signal uses the widget's halign and valign properties to determine the position and gives the widget its natural size (except that an alignment of Align.FILL will cause the overlay to be full-width/height). If the main child is a GtkScrolledWindow, the overlays are placed relative to its contents.

    • upcall

      default int upcall(MemorySegment sourceOverlay, MemorySegment widget, MemorySegment allocation)
      The upcall method is called from native code. The parameters are marshaled and run(Widget, Rectangle) is executed.
    • toCallback

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