Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
GestureZoom
is a Gesture
implementation able to recognize
pinch/zoom gestures, whenever the distance between both tracked
sequences changes, the GestureZoom::scaleChanged signal is
emitted to report the scale factor.
Synopsis
- newtype GestureZoom = GestureZoom (ManagedPtr GestureZoom)
- class (GObject o, IsDescendantOf GestureZoom o) => IsGestureZoom o
- toGestureZoom :: (MonadIO m, IsGestureZoom o) => o -> m GestureZoom
- gestureZoomGetScaleDelta :: (HasCallStack, MonadIO m, IsGestureZoom a) => a -> m Double
- gestureZoomNew :: (HasCallStack, MonadIO m, IsWidget a) => a -> m GestureZoom
- type GestureZoomScaleChangedCallback = Double -> IO ()
- afterGestureZoomScaleChanged :: (IsGestureZoom a, MonadIO m) => a -> ((?self :: a) => GestureZoomScaleChangedCallback) -> m SignalHandlerId
- onGestureZoomScaleChanged :: (IsGestureZoom a, MonadIO m) => a -> ((?self :: a) => GestureZoomScaleChangedCallback) -> m SignalHandlerId
Exported types
newtype GestureZoom Source #
Memory-managed wrapper type.
GestureZoom (ManagedPtr GestureZoom) |
Instances
Eq GestureZoom Source # | |
Defined in GI.Gtk.Objects.GestureZoom (==) :: GestureZoom -> GestureZoom -> Bool # (/=) :: GestureZoom -> GestureZoom -> Bool # | |
GObject GestureZoom Source # | |
Defined in GI.Gtk.Objects.GestureZoom | |
ManagedPtrNewtype GestureZoom Source # | |
Defined in GI.Gtk.Objects.GestureZoom toManagedPtr :: GestureZoom -> ManagedPtr GestureZoom | |
TypedObject GestureZoom Source # | |
Defined in GI.Gtk.Objects.GestureZoom | |
HasParentTypes GestureZoom Source # | |
Defined in GI.Gtk.Objects.GestureZoom | |
IsGValue (Maybe GestureZoom) Source # | Convert |
Defined in GI.Gtk.Objects.GestureZoom gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe GestureZoom -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe GestureZoom) | |
type ParentTypes GestureZoom Source # | |
Defined in GI.Gtk.Objects.GestureZoom |
class (GObject o, IsDescendantOf GestureZoom o) => IsGestureZoom o Source #
Type class for types which can be safely cast to GestureZoom
, for instance with toGestureZoom
.
Instances
(GObject o, IsDescendantOf GestureZoom o) => IsGestureZoom o Source # | |
Defined in GI.Gtk.Objects.GestureZoom |
toGestureZoom :: (MonadIO m, IsGestureZoom o) => o -> m GestureZoom Source #
Cast to GestureZoom
, 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, handleEvent, handlesSequence, isActive, isFloating, isGroupedWith, isRecognized, notify, notifyByPspec, ref, refSink, reset, runDispose, stealData, stealQdata, thawNotify, ungroup, unref, watchClosure.
Getters
getBoundingBox, getBoundingBoxCenter, getData, getDevice, getGroup, getLastEvent, getLastUpdatedSequence, getPoint, getPropagationPhase, getProperty, getQdata, getScaleDelta, getSequenceState, getSequences, getWidget, getWindow.
Setters
setData, setDataFull, setPropagationPhase, setProperty, setSequenceState, setState, setWindow.
getScaleDelta
gestureZoomGetScaleDelta Source #
:: (HasCallStack, MonadIO m, IsGestureZoom a) | |
=> a |
|
-> m Double | Returns: the scale delta |
If gesture
is active, this function returns the zooming difference
since the gesture was recognized (hence the starting point is
considered 1:1). If gesture
is not active, 1 is returned.
Since: 3.14
new
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m GestureZoom | Returns: a newly created |
Returns a newly created Gesture
that recognizes zoom
in/out gestures (usually known as pinch/zoom).
Since: 3.14
Signals
scaleChanged
type GestureZoomScaleChangedCallback Source #
This signal is emitted whenever the distance between both tracked sequences changes.
Since: 3.14
afterGestureZoomScaleChanged :: (IsGestureZoom a, MonadIO m) => a -> ((?self :: a) => GestureZoomScaleChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the scaleChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
gestureZoom #scaleChanged 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.
onGestureZoomScaleChanged :: (IsGestureZoom a, MonadIO m) => a -> ((?self :: a) => GestureZoomScaleChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the scaleChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
gestureZoom #scaleChanged callback