gi-gtk-4.0.6: 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

GtkGestureZoom is a GtkGesture for 2-finger pinch/zoom gestures.

Whenever the distance between both tracked sequences changes, the GestureZoom::scaleChanged signal is emitted to report the scale factor.

Synopsis

Exported types

newtype GestureZoom Source #

Memory-managed wrapper type.

Constructors

GestureZoom (ManagedPtr GestureZoom) 

Instances

Instances details
Eq GestureZoom Source # 
Instance details

Defined in GI.Gtk.Objects.GestureZoom

GObject GestureZoom Source # 
Instance details

Defined in GI.Gtk.Objects.GestureZoom

ManagedPtrNewtype GestureZoom Source # 
Instance details

Defined in GI.Gtk.Objects.GestureZoom

Methods

toManagedPtr :: GestureZoom -> ManagedPtr GestureZoom

TypedObject GestureZoom Source # 
Instance details

Defined in GI.Gtk.Objects.GestureZoom

Methods

glibType :: IO GType

HasParentTypes GestureZoom Source # 
Instance details

Defined in GI.Gtk.Objects.GestureZoom

IsGValue (Maybe GestureZoom) Source #

Convert GestureZoom to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.GestureZoom

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe GestureZoom -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe GestureZoom)

type ParentTypes GestureZoom Source # 
Instance details

Defined in GI.Gtk.Objects.GestureZoom

type ParentTypes GestureZoom = '[Gesture, EventController, Object]

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 GtkGestureZoom

-> m Double

Returns: the scale delta

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

new

gestureZoomNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m GestureZoom

Returns: a newly created GtkGestureZoom

Returns a newly created GtkGesture that recognizes pinch/zoom gestures.

Signals

scaleChanged

type GestureZoomScaleChangedCallback Source #

Arguments

 = Double

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

-> IO () 

Emitted whenever the distance between both tracked sequences changes.

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