Interface Range.ChangeValueCallback

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

Functional interface declaration of the ChangeValueCallback callback.

See Also:
  • Method Details

    • run

      boolean run(ScrollType scroll, double value)

      Emitted when a scroll action is performed on a range.

      It allows an application to determine the type of scroll event that occurred and the resultant new value. The application can handle the event itself and return true to prevent further processing. Or, by returning false, it can pass the event to other handlers until the default GTK handler is reached.

      The value parameter is unrounded. An application that overrides the ::change-value signal is responsible for clamping the value to the desired number of decimal digits; the default GTK handler clamps the value based on Gtk.Range:round-digits.

    • upcall

      default int upcall(MemorySegment sourceRange, int scroll, double value)
      The upcall method is called from native code. The parameters are marshaled and run(ScrollType, double) is executed.
    • toCallback

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