Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GtkGestureRotate
is a GtkGesture
for 2-finger rotations.
Whenever the angle between both handled sequences changes, the GestureRotate::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
- gestureRotateGetAngleDelta :: (HasCallStack, MonadIO m, IsGestureRotate a) => a -> m Double
- gestureRotateNew :: (HasCallStack, MonadIO m) => m GestureRotate
- type GestureRotateAngleChangedCallback = Double -> Double -> IO ()
- afterGestureRotateAngleChanged :: (IsGestureRotate a, MonadIO m) => a -> ((?self :: a) => GestureRotateAngleChangedCallback) -> m SignalHandlerId
- onGestureRotateAngleChanged :: (IsGestureRotate a, MonadIO m) => a -> ((?self :: a) => GestureRotateAngleChangedCallback) -> m SignalHandlerId
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 # | |
GObject GestureRotate Source # | |
Defined in GI.Gtk.Objects.GestureRotate | |
ManagedPtrNewtype GestureRotate Source # | |
Defined in GI.Gtk.Objects.GestureRotate | |
TypedObject GestureRotate Source # | |
Defined in GI.Gtk.Objects.GestureRotate | |
HasParentTypes GestureRotate Source # | |
Defined in GI.Gtk.Objects.GestureRotate | |
IsGValue (Maybe GestureRotate) Source # | Convert |
Defined in GI.Gtk.Objects.GestureRotate gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe GestureRotate -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe 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
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, group, handlesSequence, isActive, isFloating, isGroupedWith, isRecognized, notify, notifyByPspec, ref, refSink, reset, runDispose, stealData, stealQdata, thawNotify, ungroup, unref, watchClosure.
Getters
getAngleDelta, getBoundingBox, getBoundingBoxCenter, getCurrentEvent, getCurrentEventDevice, getCurrentEventState, getCurrentEventTime, getData, getDevice, getGroup, getLastEvent, getLastUpdatedSequence, getName, getPoint, getPropagationLimit, getPropagationPhase, getProperty, getQdata, getSequenceState, getSequences, getWidget.
Setters
setData, setDataFull, setName, setPropagationLimit, setPropagationPhase, setProperty, setSequenceState, setState, setStaticName.
getAngleDelta
gestureRotateGetAngleDelta Source #
:: (HasCallStack, MonadIO m, IsGestureRotate a) | |
=> a |
|
-> m Double | Returns: the angle delta in radians |
Gets 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.
new
:: (HasCallStack, MonadIO m) | |
=> m GestureRotate | Returns: a newly created |
Returns a newly created GtkGesture
that recognizes 2-touch
rotation gestures.
Signals
angleChanged
type GestureRotateAngleChangedCallback Source #
= Double |
|
-> Double |
|
-> IO () |
Emitted when the angle between both tracked points changes.
afterGestureRotateAngleChanged :: (IsGestureRotate a, MonadIO m) => a -> ((?self :: 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
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onGestureRotateAngleChanged :: (IsGestureRotate a, MonadIO m) => a -> ((?self :: 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