gi-gtk-3.0.38: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.GestureZoom

Description

GestureZoom is a Gesture implementation able to recognize pinch/zoom gestures, whenever the distance between both tracked sequences changes, the scaleChanged signal is emitted to report the scale factor.

Synopsis

Exported types

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

Instances details
(GObject o, IsDescendantOf GestureZoom o) => IsGestureZoom o Source # 
Instance details

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

getScaleDelta

gestureZoomGetScaleDelta Source #

Arguments

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

gesture: a GestureZoom

-> 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

gestureZoomNew Source #

Arguments

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

widget: a Widget

-> m GestureZoom

Returns: a newly created GestureZoom

Returns a newly created Gesture that recognizes zoom in/out gestures (usually known as pinch/zoom).

Since: 3.14

Signals

scaleChanged

type GestureZoomScaleChangedCallback Source #

Arguments

 = Double

scale: Scale delta, taking the initial state as 1:1

-> IO () 

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