Package org.gnome.adw
Interface Swipeable
- All Superinterfaces:
Proxy
- All Known Implementing Classes:
BottomSheet,Carousel,Flap,Leaflet,NavigationView,OverlaySplitView,Swipeable.Swipeable$Impl
An interface for swipeable widgets.
The AdwSwipeable interface is implemented by all swipeable widgets.
See SwipeTracker for details about implementing it.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classThe Swipeable$Impl type represents a native instance of the Swipeable interface.static classAn interface for swipeable widgets. -
Method Summary
Modifier and TypeMethodDescriptiondefault doubleGets the progress this Swipeable will snap back to after the gesture is canceled.default doubleGets the swipe distance ofself.default doubleGets the current progress ofself.default double[]Gets the snap points ofself.default voidgetSwipeArea(NavigationDirection navigationDirection, boolean isDrag, Rectangle rect) Gets the area this Swipeable can start a swipe from for the given direction and gesture type.static @Nullable TypegetType()Get the GType of the Swipeable class
-
Method Details
-
getType
-
getCancelProgress
default double getCancelProgress()Gets the progress this Swipeable will snap back to after the gesture is canceled.- Returns:
- the cancel progress, unitless
-
getDistance
default double getDistance()Gets the swipe distance ofself.This corresponds to how many pixels 1 unit represents.
- Returns:
- the swipe distance in pixels
-
getProgress
default double getProgress()Gets the current progress ofself.- Returns:
- the current progress, unitless
-
getSnapPoints
default double[] getSnapPoints()Gets the snap points ofself.Each snap point represents a progress value that is considered acceptable to end the swipe on.
- Returns:
- the snap points
-