It derives from <GObject>.
A swipe tracker used in Carousel, NavigationView and
OverlaySplitView.
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 SwipeTracker:enabled
property. If they expect to use horizontal orientation,
SwipeTracker:reversed can be used for supporting RTL text
direction.
Whether to allow swiping for more than one snap point at a time.
If the value is FALSE, each swipe can only move to the adjacent
snap points.
Its value is a boolean.
Set it with (set! (swipe-tracker:allow-long-swipes self) value).
Whether to allow dragging with mouse pointer.
Its value is a boolean.
Set it with (set! (swipe-tracker:allow-mouse-drag self) value).
Whether to allow touchscreen swiping from
<GtkWindowHandle>.
This will make dragging the window impossible.
Its value is a boolean.
Set it with (set! (swipe-tracker:allow-window-handle self)
value).
Whether the swipe tracker is enabled.
When it’s not enabled, no events will be processed. Usually widgets will want to expose this via a property.
Its value is a boolean.
Set it with (set! (swipe-tracker:enabled self) value).
Whether to allow swiping past the first available snap point.
Its value is a boolean.
Set it with (set! (swipe-tracker:lower-overshoot self) value).
Whether to reverse the swipe direction.
If the swipe tracker is horizontal, it can be used for supporting RTL text direction.
Its value is a boolean.
Set it with (set! (swipe-tracker:reversed self) value).
The widget the swipe tracker is attached to.
Its value is a <AdwSwipeable>, or #f.
It can only be set when the object is made, with #:swipeable.
Whether to allow swiping past the last available snap point.
Its value is a boolean.
Set it with (set! (swipe-tracker:upper-overshoot self) value).
Gets whether to allow swiping for more than one snap point at a time.
Passed: a <AdwSwipeTracker>.
a swipe tracker
Returned: a boolean.
whether long swipes are allowed
Gets whether self can be dragged with mouse pointer.
Passed: a <AdwSwipeTracker>.
a swipe tracker
Returned: a boolean.
whether mouse dragging is allowed
Gets whether to allow touchscreen swiping from
<GtkWindowHandle>.
Passed: a <AdwSwipeTracker>.
a swipe tracker
Returned: a boolean.
whether swiping from window handles is allowed
Gets whether self is enabled.
Passed: a <AdwSwipeTracker>.
a swipe tracker
Returned: a boolean.
whether self is enabled
Gets whether to allow swiping past the first available snap point.
Passed: a <AdwSwipeTracker>.
a swipe tracker
Returned: a boolean.
whether to allow swiping past the first available snap point
Gets whether self is reversing the swipe direction.
Passed: a <AdwSwipeTracker>.
a swipe tracker
Returned: a boolean.
whether the direction is reversed
Get the widget self is attached to.
Passed: a <AdwSwipeTracker>.
a swipe tracker
Returned: a <AdwSwipeable>.
the swipeable widget
Gets whether to allow swiping past the last available snap point.
Passed: a <AdwSwipeTracker>.
a swipe tracker
Returned: a boolean.
whether to allow swiping past the last available snap point
Creates a new <AdwSwipeTracker> for
widget.
Passed: a <AdwSwipeable>.
a widget to add the tracker on
Returned: a <AdwSwipeTracker>.
the newly created <AdwSwipeTracker>
Sets whether to allow swiping for more than one snap point at a time.
If the value is FALSE, each swipe can only move to the adjacent
snap points.
Passed: a <AdwSwipeTracker>.
a swipe tracker
Passed: a boolean.
whether to allow long swipes
Sets whether self can be dragged with mouse pointer.
Passed: a <AdwSwipeTracker>.
a swipe tracker
Passed: a boolean.
whether to allow mouse dragging
Sets whether to allow touchscreen swiping from
<GtkWindowHandle>.
Setting it to TRUE will make dragging the window impossible.
Passed: a <AdwSwipeTracker>.
a swipe tracker
Passed: a boolean.
whether to allow swiping from window handles
Sets whether self is enabled.
When it’s not enabled, no events will be processed. Usually widgets will want to expose this via a property.
Passed: a <AdwSwipeTracker>.
a swipe tracker
Passed: a boolean.
whether self is enabled
Sets whether to allow swiping past the first available snap point.
Passed: a <AdwSwipeTracker>.
a swipe tracker
Passed: a boolean.
whether to allow swiping past the first available snap point
Sets whether to reverse the swipe direction.
If the swipe tracker is horizontal, it can be used for supporting RTL text direction.
Passed: a <AdwSwipeTracker>.
a swipe tracker
Passed: a boolean.
whether to reverse the swipe direction
Sets whether to allow swiping past the last available snap point.
Passed: a <AdwSwipeTracker>.
a swipe tracker
Passed: a boolean.
whether to allow swiping past the last available snap point
Moves the current progress value by delta.
This can be used to adjust the current position if snap points move during the gesture.
Passed: a <AdwSwipeTracker>.
a swipe tracker
Passed: a real number.
the position delta
Connect a handler with (connect object swipe-tracker:begin-swipe
handler). It is called as (handler self).
This signal is emitted right before a swipe will be started, after the drag threshold has been passed.
Passed: a <AdwSwipeTracker>.
Connect a handler with (connect object swipe-tracker:end-swipe
handler). It is called as (handler self velocity to).
This signal is emitted as soon as the gesture has stopped.
The user is expected to animate the deceleration from the current
progress value to to with an animation using velocity as the
initial velocity, provided in pixels per second. SpringAnimation
is usually a good fit for this.
Passed: a <AdwSwipeTracker>.
Passed: a real number.
the velocity of the swipe
Passed: a real number.
the progress value to animate to
Connect a handler with (connect object swipe-tracker:prepare
handler). It is called as (handler self direction).
This signal is emitted when a possible swipe is detected.
The direction value can be used to restrict the swipe to a certain direction.
Passed: a <AdwSwipeTracker>.
Passed: a <AdwNavigationDirection>.
the direction of the swipe
Connect a handler with (connect object swipe-tracker:update-swipe
handler). It is called as (handler self progress).
This signal is emitted every time the progress value changes.
Passed: a <AdwSwipeTracker>.
Passed: a real number.
the current animation progress value