gi-gtk3-3.0.44: Gtk 3.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.GestureRotate

Contents

- Exported types
- Methods
  - getAngleDelta
  - new
- Signals
  - angleChanged

Description

`GestureRotate` is a `Gesture` implementation able to recognize 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, IsWidget a) => a -> 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.

Constructors

GestureRotate (ManagedPtr GestureRotate) |

#### Instances

Instances details

Eq GestureRotate Source # |
Instance details Defined in GI.Gtk.Objects.GestureRotate Methods (==) :: GestureRotate -> GestureRotate -> Bool Source # (/=) :: GestureRotate -> GestureRotate -> Bool Source #
GObject GestureRotate Source # |
Instance details Defined in GI.Gtk.Objects.GestureRotate
ManagedPtrNewtype GestureRotate Source # |
Instance details Defined in GI.Gtk.Objects.GestureRotate Methods toManagedPtr :: GestureRotate -> ManagedPtr GestureRotate Source #
TypedObject GestureRotate Source # |
Instance details Defined in GI.Gtk.Objects.GestureRotate Methods glibType :: IO GType Source #
HasParentTypes GestureRotate Source # |
Instance details Defined in GI.Gtk.Objects.GestureRotate
IsGValue (Maybe GestureRotate) Source # | Convert `GestureRotate` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.GestureRotate Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe GestureRotate -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe GestureRotate) Source #
type ParentTypes GestureRotate Source # |
Instance details Defined in GI.Gtk.Objects.GestureRotate type ParentTypes GestureRotate = '[Gesture, EventController, Object]

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

Instances details

(GObject o, IsDescendantOf GestureRotate o) => IsGestureRotate o Source # |
Instance details 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

Expand

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

getAngleDelta, getBoundingBox, getBoundingBoxCenter, getData, getDevice, getGroup, getLastEvent, getLastUpdatedSequence, getPoint, getPropagationPhase, getProperty, getQdata, getSequenceState, getSequences, getWidget, getWindow.

#### Setters

setData, setDataFull, setPropagationPhase, setProperty, setSequenceState, setState, setWindow.

## getAngleDelta

gestureRotateGetAngleDelta Source #

Arguments

:: (HasCallStack, MonadIO m, IsGestureRotate a) |
=> a | `gesture`: a `GestureRotate`
-> 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

gestureRotateNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsWidget a) |
=> a | `widget`: a `Widget`
-> m GestureRotate | Returns: a newly created `GestureRotate`

Returns a newly created `Gesture` that recognizes 2-touch rotation gestures.

Since: 3.14

# Signals

## angleChanged

type GestureRotateAngleChangedCallback Source #

Arguments

= Double | `angle`: Current angle in radians
-> Double | `angleDelta`: Difference with the starting angle, in radians
-> IO () |

This signal is emitted when the angle between both tracked points changes.

Since: 3.14

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