GestureSwipe

gtk.gesture_swipe.GestureSwipe is a gtk.gesture.Gesture for swipe gestures.

After a press/move/.../move/release sequence happens, the gtk.gesture_swipe.GestureSwipe.swipe signal will be emitted, providing the velocity and directionality of the sequence at the time it was lifted.

If the velocity is desired in intermediate points, gtk.gesture_swipe.GestureSwipe.getVelocity can be called in a gtk.gesture.Gesture.update handler.

All velocities are reported in pixels/sec units.

Constructors

this
this()

Returns a newly created gtk.gesture.Gesture that recognizes swipes.

Members

Functions

connectSwipe
ulong connectSwipe(T callback, Flag!"After" after)

Connect to Swipe signal.

getVelocity
bool getVelocity(double velocityX, double velocityY)

Gets the current velocity.

Inherited Members

From GestureSingle

getButton
uint getButton()

Returns the button number gesture listens for.

getCurrentButton
uint getCurrentButton()

Returns the button number currently interacting with gesture, or 0 if there is none.

getCurrentSequence
gdk.event_sequence.EventSequence getCurrentSequence()

Returns the event sequence currently interacting with gesture.

getExclusive
bool getExclusive()

Gets whether a gesture is exclusive.

getTouchOnly
bool getTouchOnly()

Returns true if the gesture is only triggered by touch events.

setButton
void setButton(uint button)

Sets the button number gesture listens to.

setExclusive
void setExclusive(bool exclusive)

Sets whether gesture is exclusive.

setTouchOnly
void setTouchOnly(bool touchOnly)

Sets whether to handle only touch events.