Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GestureRotate
is a Gesture
implementation able to recognize
2-finger rotations, whenever the angle between both handled sequences
changes, the angleChanged signal is emitted.
Synopsis
- newtype GestureRotate = GestureRotate (ManagedPtr GestureRotate)
- class (GObject o, IsDescendantOf GestureRotate o) => IsGestureRotate o
- toGestureRotate :: (MonadIO m, IsGestureRotate o) => o -> m GestureRotate
- noGestureRotate :: Maybe GestureRotate
- gestureRotateGetAngleDelta :: (HasCallStack, MonadIO m, IsGestureRotate a) => a -> m Double
- gestureRotateNew :: (HasCallStack, MonadIO m, IsWidget a) => a -> m GestureRotate
- type C_GestureRotateAngleChangedCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO ()
- type GestureRotateAngleChangedCallback = Double -> Double -> IO ()
- afterGestureRotateAngleChanged :: (IsGestureRotate a, MonadIO m) => a -> GestureRotateAngleChangedCallback -> m SignalHandlerId
- genClosure_GestureRotateAngleChanged :: MonadIO m => GestureRotateAngleChangedCallback -> m (GClosure C_GestureRotateAngleChangedCallback)
- mk_GestureRotateAngleChangedCallback :: C_GestureRotateAngleChangedCallback -> IO (FunPtr C_GestureRotateAngleChangedCallback)
- noGestureRotateAngleChangedCallback :: Maybe GestureRotateAngleChangedCallback
- onGestureRotateAngleChanged :: (IsGestureRotate a, MonadIO m) => a -> GestureRotateAngleChangedCallback -> m SignalHandlerId
- wrap_GestureRotateAngleChangedCallback :: GestureRotateAngleChangedCallback -> C_GestureRotateAngleChangedCallback
Exported types
newtype GestureRotate Source #
Memory-managed wrapper type.
Instances
Eq GestureRotate Source # | |
Defined in GI.Gtk.Objects.GestureRotate (==) :: GestureRotate -> GestureRotate -> Bool # (/=) :: GestureRotate -> GestureRotate -> Bool # | |
IsGValue GestureRotate Source # | Convert |
Defined in GI.Gtk.Objects.GestureRotate toGValue :: GestureRotate -> IO GValue # fromGValue :: GValue -> IO GestureRotate # | |
GObject GestureRotate Source # | |
Defined in GI.Gtk.Objects.GestureRotate gobjectType :: IO GType # | |
HasParentTypes GestureRotate Source # | |
Defined in GI.Gtk.Objects.GestureRotate | |
type ParentTypes GestureRotate Source # | |
Defined in GI.Gtk.Objects.GestureRotate |
class (GObject o, IsDescendantOf GestureRotate o) => IsGestureRotate o Source #
Type class for types which can be safely cast to GestureRotate
, for instance with toGestureRotate
.
Instances
(GObject o, IsDescendantOf GestureRotate o) => IsGestureRotate o Source # | |
Defined in GI.Gtk.Objects.GestureRotate |
toGestureRotate :: (MonadIO m, IsGestureRotate o) => o -> m GestureRotate Source #
Cast to GestureRotate
, for types for which this is known to be safe. For general casts, use castTo
.
noGestureRotate :: Maybe GestureRotate Source #
A convenience alias for Nothing
:: Maybe
GestureRotate
.
Methods
Overloaded methods
getAngleDelta
gestureRotateGetAngleDelta Source #
:: (HasCallStack, MonadIO m, IsGestureRotate a) | |
=> a |
|
-> m Double | Returns: the angle delta in radians |
If gesture
is active, this function returns the angle difference
in radians since the gesture was first recognized. If gesture
is
not active, 0 is returned.
Since: 3.14
new
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m GestureRotate | Returns: a newly created |
Returns a newly created Gesture
that recognizes 2-touch
rotation gestures.
Since: 3.14
Signals
angleChanged
type C_GestureRotateAngleChangedCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type GestureRotateAngleChangedCallback Source #
= Double |
|
-> Double |
|
-> IO () |
This signal is emitted when the angle between both tracked points changes.
Since: 3.14
afterGestureRotateAngleChanged :: (IsGestureRotate a, MonadIO m) => a -> GestureRotateAngleChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the angleChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
gestureRotate #angleChanged callback
genClosure_GestureRotateAngleChanged :: MonadIO m => GestureRotateAngleChangedCallback -> m (GClosure C_GestureRotateAngleChangedCallback) Source #
Wrap the callback into a GClosure
.
mk_GestureRotateAngleChangedCallback :: C_GestureRotateAngleChangedCallback -> IO (FunPtr C_GestureRotateAngleChangedCallback) Source #
Generate a function pointer callable from C code, from a C_GestureRotateAngleChangedCallback
.
noGestureRotateAngleChangedCallback :: Maybe GestureRotateAngleChangedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
GestureRotateAngleChangedCallback
onGestureRotateAngleChanged :: (IsGestureRotate a, MonadIO m) => a -> GestureRotateAngleChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the angleChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
gestureRotate #angleChanged callback