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 TypeMethodDescriptionbooleanrun(ScrollType scroll, double value) Emitted when a scroll action is performed on a range.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, double)method.default intupcall(MemorySegment sourceRange, int scroll, double value) Theupcallmethod 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
trueto 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
Theupcallmethod 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:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-