Class
Adw.SwipeTracker
Description [src]
final class Adw.SwipeTracker : GObject.Object {
/* No available fields */
}
A swipe tracker used in AdwCarousel
and AdwLeaflet
.
The AdwSwipeTracker
object can be used for implementing widgets with swipe
gestures. It supports touch-based swipes, pointer dragging, and touchpad scrolling.
The widgets will probably want to expose the
AdwSwipeTracker:enabled
property. If they expect to use
horizontal orientation, AdwSwipeTracker:reversed
can be used for
supporting RTL text direction.
Constructors
adw_swipe_tracker_new
Creates a new AdwSwipeTracker
for widget
.
Instance methods
adw_swipe_tracker_get_allow_long_swipes
Gets whether to allow swiping for more than one snap point at a time.
adw_swipe_tracker_get_allow_mouse_drag
Gets whether self
can be dragged with mouse pointer.
adw_swipe_tracker_get_enabled
Gets whether self
is enabled.
adw_swipe_tracker_get_reversed
Gets whether self
is reversing the swipe direction.
adw_swipe_tracker_get_swipeable
Get the widget self
is attached to.
adw_swipe_tracker_set_allow_long_swipes
Sets whether to allow swiping for more than one snap point at a time.
adw_swipe_tracker_set_allow_mouse_drag
Sets whether self
can be dragged with mouse pointer.
adw_swipe_tracker_set_enabled
Sets whether self
is enabled.
adw_swipe_tracker_set_reversed
Sets whether to reverse the swipe direction.
adw_swipe_tracker_shift_position
Moves the current progress value by delta
.
Properties
Adw.SwipeTracker:allow-long-swipes
Whether to allow swiping for more than one snap point at a time.
Adw.SwipeTracker:allow-mouse-drag
Whether to allow dragging with mouse pointer.
Adw.SwipeTracker:enabled
Whether the swipe tracker is enabled.
Adw.SwipeTracker:reversed
Whether to reverse the swipe direction.
Adw.SwipeTracker:swipeable
The widget the swipe tracker is attached to.
Signals
Adw.SwipeTracker::begin-swipe
This signal is emitted when a possible swipe is detected.
Adw.SwipeTracker::end-swipe
This signal is emitted as soon as the gesture has stopped.
Adw.SwipeTracker::update-swipe
This signal is emitted every time the progress value changes.