Package org.gnome.gtk
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.
Functional interface declaration of the
ChangeValueCallback
callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
run
(ScrollType scroll, double value) Emitted when a scroll action is performed on a range.default MemorySegment
toCallback
(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, double)
method.default int
upcall
(MemorySegment sourceRange, int scroll, double value) Theupcall
method is called from native code.
-
Method Details
-
run
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 returningfalse
, 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
Theupcall
method is called from native code. The parameters are marshaled andrun(org.gnome.gtk.ScrollType, double)
is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, double)
method.- Specified by:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-