Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
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.
- newtype GestureSwipe = GestureSwipe (ManagedPtr GestureSwipe)
- class GObject o => IsGestureSwipe o
- toGestureSwipe :: IsGestureSwipe o => o -> IO GestureSwipe
- noGestureSwipe :: Maybe GestureSwipe
- data GestureSwipeGetVelocityMethodInfo
- gestureSwipeGetVelocity :: (HasCallStack, MonadIO m, IsGestureSwipe a) => a -> m (Bool, Double, Double)
- gestureSwipeNew :: (HasCallStack, MonadIO m, IsWidget a) => a -> m GestureSwipe
- type C_GestureSwipeSwipeCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO ()
- type GestureSwipeSwipeCallback = Double -> Double -> IO ()
- data GestureSwipeSwipeSignalInfo
- afterGestureSwipeSwipe :: (GObject a, MonadIO m) => a -> GestureSwipeSwipeCallback -> m SignalHandlerId
- genClosure_GestureSwipeSwipe :: GestureSwipeSwipeCallback -> IO Closure
- mk_GestureSwipeSwipeCallback :: C_GestureSwipeSwipeCallback -> IO (FunPtr C_GestureSwipeSwipeCallback)
- noGestureSwipeSwipeCallback :: Maybe GestureSwipeSwipeCallback
- onGestureSwipeSwipe :: (GObject a, MonadIO m) => a -> GestureSwipeSwipeCallback -> m SignalHandlerId
- wrap_GestureSwipeSwipeCallback :: GestureSwipeSwipeCallback -> Ptr () -> CDouble -> CDouble -> Ptr () -> IO ()
Exported types
newtype GestureSwipe Source #
GObject GestureSwipe Source # | |
IsObject GestureSwipe Source # | |
IsGestureSingle GestureSwipe Source # | |
IsGesture GestureSwipe Source # | |
IsEventController GestureSwipe Source # | |
IsGestureSwipe GestureSwipe Source # | |
((~) * info (ResolveGestureSwipeMethod t GestureSwipe), MethodInfo * info GestureSwipe p) => IsLabel t (GestureSwipe -> p) Source # | |
((~) * info (ResolveGestureSwipeMethod t GestureSwipe), MethodInfo * info GestureSwipe p) => IsLabelProxy t (GestureSwipe -> p) Source # | |
HasAttributeList * GestureSwipe Source # | |
type AttributeList GestureSwipe Source # | |
type SignalList GestureSwipe Source # | |
class GObject o => IsGestureSwipe o Source #
toGestureSwipe :: IsGestureSwipe o => o -> IO GestureSwipe Source #
Methods
getVelocity
data GestureSwipeGetVelocityMethodInfo Source #
((~) * signature (m (Bool, Double, Double)), MonadIO m, IsGestureSwipe a) => MethodInfo * GestureSwipeGetVelocityMethodInfo a signature Source # | |
gestureSwipeGetVelocity Source #
:: (HasCallStack, MonadIO m, IsGestureSwipe a) | |
=> a |
|
-> 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
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m GestureSwipe | Returns: a newly created |
Returns a newly created Gesture
that recognizes swipes.
Since: 3.14
Signals
swipe
afterGestureSwipeSwipe :: (GObject a, MonadIO m) => a -> GestureSwipeSwipeCallback -> m SignalHandlerId Source #
mk_GestureSwipeSwipeCallback :: C_GestureSwipeSwipeCallback -> IO (FunPtr C_GestureSwipeSwipeCallback) Source #
onGestureSwipeSwipe :: (GObject a, MonadIO m) => a -> GestureSwipeSwipeCallback -> m SignalHandlerId Source #
wrap_GestureSwipeSwipeCallback :: GestureSwipeSwipeCallback -> Ptr () -> CDouble -> CDouble -> Ptr () -> IO () Source #