gi-gtk-3.0.11: Gtk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.GestureSwipe

Contents

Description

GestureSwipe is a Gesture implementation able to recognize swipes, after a press/move/.../move/release sequence happens, the 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, gestureSwipeGetVelocity can be called on eg. a Gesture::update handler.

All velocities are reported in pixels/sec units.

Synopsis

Exported types

Methods

getVelocity

gestureSwipeGetVelocity Source #

Arguments

:: (HasCallStack, MonadIO m, IsGestureSwipe a) 
=> a

gesture: a GestureSwipe

-> m (Bool, Double, Double)

Returns: whether velocity could be calculated

If the gesture is recognized, this function returns True and fill in velocityX and velocityY with the recorded velocity, as per the last event(s) processed.

Since: 3.14

new

gestureSwipeNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsWidget a) 
=> a

widget: a Widget

-> m GestureSwipe

Returns: a newly created GestureSwipe

Returns a newly created Gesture that recognizes swipes.

Since: 3.14

Signals

swipe