adw.swipe_tracker
Module for [SwipeTracker] class
Types 3
A swipe tracker used in class@Carousel, class@NavigationView and class@OverlaySplitView.
The [adw.swipe_tracker.SwipeTracker] 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 property@SwipeTracker:enabled property. If they expect to use horizontal orientation, property@SwipeTracker:reversed can be used for supporting RTL text direction.
Methods
SwipeTracker self()Returns `this`, for use in `with` statements.SwipeTrackerGidBuilder builder()Get builder for [adw.swipe_tracker.SwipeTracker] Returns: New builder objectbool allowLongSwipes() @propertyGet `allowLongSwipes` property. Returns: Whether to allow swiping for more than one snap point at a time.void allowLongSwipes(bool propval) @propertySet `allowLongSwipes` property. Params: propval = Whether to allow swiping for more than one snap point at a time.bool allowMouseDrag() @propertyGet `allowMouseDrag` property. Returns: Whether to allow dragging with mouse pointer.void allowMouseDrag(bool propval) @propertySet `allowMouseDrag` property. Params: propval = Whether to allow dragging with mouse pointer.bool allowWindowHandle() @propertyGet `allowWindowHandle` property. Returns: Whether to allow touchscreen swiping from [gtk.window_handle.WindowHandle].void allowWindowHandle(bool propval) @propertySet `allowWindowHandle` property. Params: propval = Whether to allow touchscreen swiping from [gtk.window_handle.WindowHandle].void enabled(bool propval) @propertySet `enabled` property. Params: propval = Whether the swipe tracker is enabled.bool lowerOvershoot() @propertyGet `lowerOvershoot` property. Returns: Whether to allow swiping past the first available snap point.void lowerOvershoot(bool propval) @propertySet `lowerOvershoot` property. Params: propval = Whether to allow swiping past the first available snap point.void reversed(bool propval) @propertySet `reversed` property. Params: propval = Whether to reverse the swipe direction.adw.swipeable.Swipeable swipeable() @propertyGet `swipeable` property. Returns: The widget the swipe tracker is attached to.bool upperOvershoot() @propertyGet `upperOvershoot` property. Returns: Whether to allow swiping past the last available snap point.void upperOvershoot(bool propval) @propertySet `upperOvershoot` property. Params: propval = Whether to allow swiping past the last available snap point.bool getAllowLongSwipes()Gets whether to allow swiping for more than one snap point at a time. Returns: whether long swipes are allowedbool getAllowMouseDrag()Gets whether self can be dragged with mouse pointer. Returns: whether mouse dragging is allowedbool getAllowWindowHandle()Gets whether to allow touchscreen swiping from [gtk.window_handle.WindowHandle]. Returns: whether swiping from window handles is allowedbool getEnabled()Gets whether self is enabled. Returns: whether self is enabledbool getLowerOvershoot()Gets whether to allow swiping past the first available snap point. Returns: whether to allow swiping past the first available snap pointbool getReversed()Gets whether self is reversing the swipe direction. Returns: whether the direction is reversedadw.swipeable.Swipeable getSwipeable()Get the widget self is attached to. Returns: the swipeable widgetbool getUpperOvershoot()Gets whether to allow swiping past the last available snap point. Returns: whether to allow swiping past the last available snap pointvoid setAllowLongSwipes(bool allowLongSwipes)Sets whether to allow swiping for more than one snap point at a time.void setAllowMouseDrag(bool allowMouseDrag)Sets whether self can be dragged with mouse pointer.void setAllowWindowHandle(bool allowWindowHandle)Sets whether to allow touchscreen swiping from [gtk.window_handle.WindowHandle].void setEnabled(bool enabled)Sets whether self is enabled.void setLowerOvershoot(bool overshoot)Sets whether to allow swiping past the first available snap point.void setReversed(bool reversed)Sets whether to reverse the swipe direction.void setUpperOvershoot(bool overshoot)Sets whether to allow swiping past the last available snap point.void shiftPosition(double delta)Moves the current progress value by delta.gulong connectBeginSwipe(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : adw.swipe_tracker.SwipeTracker)))
&& Parameters!T.length < 2)Connect to `BeginSwipe` signal.gulong connectEndSwipe(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == double)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] == double)))
&& (Parameters!T.length < 3 || (ParameterStorageClassTuple!T[2] == ParameterStorageClass.none && is(Parameters!T[2] : adw.swipe_tracker.SwipeTracker)))
&& Parameters!T.length < 4)Connect to `EndSwipe` signal.gulong connectPrepare(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == adw.types.NavigationDirection)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : adw.swipe_tracker.SwipeTracker)))
&& Parameters!T.length < 3)Connect to `Prepare` signal.gulong connectUpdateSwipe(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == double)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : adw.swipe_tracker.SwipeTracker)))
&& Parameters!T.length < 3)Connect to `UpdateSwipe` signal.Constructors
this(adw.swipeable.Swipeable swipeable)Creates a new [adw.swipe_tracker.SwipeTracker] for widget.classSwipeTrackerGidBuilderImpl(T) : gobject.object.ObjectWrapGidBuilderImpl!T, gtk.orientable.OrientableGidBuilderImpl!T
Methods
T allowLongSwipes(bool propval)Set `allowLongSwipes` property. Params: propval = Whether to allow swiping for more than one snap point at a time.T allowMouseDrag(bool propval)Set `allowMouseDrag` property. Params: propval = Whether to allow dragging with mouse pointer. Returns: Builder instance for fluent chainingT allowWindowHandle(bool propval)Set `allowWindowHandle` property. Params: propval = Whether to allow touchscreen swiping from [gtk.window_handle.WindowHandle].T enabled(bool propval)Set `enabled` property. Params: propval = Whether the swipe tracker is enabled.T lowerOvershoot(bool propval)Set `lowerOvershoot` property. Params: propval = Whether to allow swiping past the first available snap point. Returns: Builder instance for fluent chainingT reversed(bool propval)Set `reversed` property. Params: propval = Whether to reverse the swipe direction.T swipeable(adw.swipeable.Swipeable propval)Set `swipeable` property. Params: propval = The widget the swipe tracker is attached to. Returns: Builder instance for fluent chainingT upperOvershoot(bool propval)Set `upperOvershoot` property. Params: propval = Whether to allow swiping past the last available snap point. Returns: Builder instance for fluent chainingFluent builder for [adw.swipe_tracker.SwipeTracker]
Methods