gi-gtk-3.0.27: Gtk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.GestureDrag

Contents

Description

GestureDrag is a Gesture implementation that recognizes drag operations. The drag operation itself can be tracked throught the GestureDrag::drag-begin, GestureDrag::drag-update and GestureDrag::drag-end signals, or the relevant coordinates be extracted through gestureDragGetOffset and gestureDragGetStartPoint.

Synopsis

Exported types

newtype GestureDrag Source #

Memory-managed wrapper type.

class GObject o => IsGestureDrag o Source #

Type class for types which can be safely cast to GestureDrag, for instance with toGestureDrag.

toGestureDrag :: (MonadIO m, IsGestureDrag o) => o -> m GestureDrag Source #

Cast to GestureDrag, for types for which this is known to be safe. For general casts, use castTo.

Methods

getOffset

gestureDragGetOffset Source #

Arguments

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

gesture: a Gesture

-> m (Bool, Double, Double)

Returns: True if the gesture is active

If the gesture is active, this function returns True and fills in x and y with the coordinates of the current point, as an offset to the starting drag point.

Since: 3.14

getStartPoint

gestureDragGetStartPoint Source #

Arguments

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

gesture: a Gesture

-> m (Bool, Double, Double)

Returns: True if the gesture is active

If the gesture is active, this function returns True and fills in x and y with the drag start coordinates, in window-relative coordinates.

Since: 3.14

new

gestureDragNew Source #

Arguments

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

widget: a Widget

-> m GestureDrag

Returns: a newly created GestureDrag

Returns a newly created Gesture that recognizes drags.

Since: 3.14

Signals

dragBegin

type C_GestureDragDragBeginCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type GestureDragDragBeginCallback Source #

Arguments

 = Double

startX: X coordinate, relative to the widget allocation

-> Double

startY: Y coordinate, relative to the widget allocation

-> IO () 

This signal is emitted whenever dragging starts.

Since: 3.14

afterGestureDragDragBegin :: (IsGestureDrag a, MonadIO m) => a -> GestureDragDragBeginCallback -> m SignalHandlerId Source #

Connect a signal handler for the “drag-begin” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after gestureDrag #dragBegin callback

onGestureDragDragBegin :: (IsGestureDrag a, MonadIO m) => a -> GestureDragDragBeginCallback -> m SignalHandlerId Source #

Connect a signal handler for the “drag-begin” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on gestureDrag #dragBegin callback

dragEnd

type C_GestureDragDragEndCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type GestureDragDragEndCallback Source #

Arguments

 = Double

offsetX: X offset, relative to the start point

-> Double

offsetY: Y offset, relative to the start point

-> IO () 

This signal is emitted whenever the dragging is finished.

Since: 3.14

afterGestureDragDragEnd :: (IsGestureDrag a, MonadIO m) => a -> GestureDragDragEndCallback -> m SignalHandlerId Source #

Connect a signal handler for the “drag-end” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after gestureDrag #dragEnd callback

onGestureDragDragEnd :: (IsGestureDrag a, MonadIO m) => a -> GestureDragDragEndCallback -> m SignalHandlerId Source #

Connect a signal handler for the “drag-end” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on gestureDrag #dragEnd callback

dragUpdate

type C_GestureDragDragUpdateCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type GestureDragDragUpdateCallback Source #

Arguments

 = Double

offsetX: X offset, relative to the start point

-> Double

offsetY: Y offset, relative to the start point

-> IO () 

This signal is emitted whenever the dragging point moves.

Since: 3.14

afterGestureDragDragUpdate :: (IsGestureDrag a, MonadIO m) => a -> GestureDragDragUpdateCallback -> m SignalHandlerId Source #

Connect a signal handler for the “drag-update” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after gestureDrag #dragUpdate callback

onGestureDragDragUpdate :: (IsGestureDrag a, MonadIO m) => a -> GestureDragDragUpdateCallback -> m SignalHandlerId Source #

Connect a signal handler for the “drag-update” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on gestureDrag #dragUpdate callback