An interface for swipeable widgets.
The <AdwSwipeable> interface is implemented by
all swipeable widgets.
See SwipeTracker for details about implementing it.
Gets the progress self will snap back to after the gesture is canceled.
Passed: a <AdwSwipeable>.
a swipeable
Returned: a real number.
the cancel progress, unitless
Gets the swipe distance of self.
This corresponds to how many pixels 1 unit represents.
Passed: a <AdwSwipeable>.
a swipeable
Returned: a real number.
the swipe distance in pixels
Gets the current progress of self.
Passed: a <AdwSwipeable>.
a swipeable
Returned: a real number.
the current progress, unitless
Gets the snap points of self.
Each snap point represents a progress value that is considered acceptable to end the swipe on.
Passed: a <AdwSwipeable>.
a swipeable
Returned: a f64vector.
the snap points
Not returned: it is the length of %return.
location to return the number of the snap points
Gets the area self can start a swipe from for the given direction and gesture type.
This can be used to restrict swipes to only be possible from a certain area, for example, to only allow edge swipes, or to have a draggable element and ignore swipes elsewhere.
If not implemented, the default implementation returns the allocation of self, allowing swipes from anywhere.
Passed: a <AdwSwipeable>.
a swipeable
Passed: a <AdwNavigationDirection>, or
one of its symbols.
the direction of the swipe
Passed: a boolean.
whether the swipe is caused by a dragging gesture
Passed, filled in, and returned: a
<GdkRectangle>.
a pointer to a rectangle to store the swipe area
Gets the progress self will snap back to after the gesture is canceled.
To override it in a new class, give register-type #:vfuncs
`((get-cancel-progress . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<AdwSwipeable>, or its GType number.
Passed: a <AdwSwipeable>.
a swipeable
Returned: a real number.
the cancel progress, unitless
Gets the swipe distance of self.
This corresponds to how many pixels 1 unit represents.
To override it in a new class, give register-type #:vfuncs
`((get-distance . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<AdwSwipeable>, or its GType number.
Passed: a <AdwSwipeable>.
a swipeable
Returned: a real number.
the swipe distance in pixels
Gets the current progress of self.
To override it in a new class, give register-type #:vfuncs
`((get-progress . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<AdwSwipeable>, or its GType number.
Passed: a <AdwSwipeable>.
a swipeable
Returned: a real number.
the current progress, unitless
Gets the snap points of self.
Each snap point represents a progress value that is considered acceptable to end the swipe on.
To override it in a new class, give register-type #:vfuncs
`((get-snap-points . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<AdwSwipeable>, or its GType number.
Passed: a <AdwSwipeable>.
a swipeable
Returned: a f64vector.
the snap points
Not returned: it is the length of %return.
location to return the number of the snap points
Gets the area self can start a swipe from for the given direction and gesture type.
This can be used to restrict swipes to only be possible from a certain area, for example, to only allow edge swipes, or to have a draggable element and ignore swipes elsewhere.
If not implemented, the default implementation returns the allocation of self, allowing swipes from anywhere.
To override it in a new class, give register-type #:vfuncs
`((get-swipe-area . ,procedure)). The procedure is called as
(procedure self navigation-direction is-drag rect).
Passed: the class whose implementation to call: a class that implements
<AdwSwipeable>, or its GType number.
Passed: a <AdwSwipeable>.
a swipeable
Passed: a <AdwNavigationDirection>, or
one of its symbols.
the direction of the swipe
Passed: a boolean.
whether the swipe is caused by a dragging gesture
Passed, filled in, and returned: a
<GdkRectangle>.
a pointer to a rectangle to store the swipe area