gi-gdk-3.0.28: Gdk bindings

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

GI.Gdk.Structs.EventMotion

Contents

- Exported types
- Methods
- Properties
  - axes
  - device
  - isHint
  - sendEvent
  - state
  - time
  - type
  - window
  - x
  - xRoot
  - y
  - yRoot

Description

Generated when the pointer moves.

Synopsis

- newtype EventMotion = EventMotion (ManagedPtr EventMotion)
- newZeroEventMotion :: MonadIO m => m EventMotion
- getEventMotionAxes :: MonadIO m => EventMotion -> m Double
- setEventMotionAxes :: MonadIO m => EventMotion -> Double -> m ()
- clearEventMotionDevice :: MonadIO m => EventMotion -> m ()
- getEventMotionDevice :: MonadIO m => EventMotion -> m (Maybe Device)
- setEventMotionDevice :: MonadIO m => EventMotion -> Ptr Device -> m ()
- getEventMotionIsHint :: MonadIO m => EventMotion -> m Int16
- setEventMotionIsHint :: MonadIO m => EventMotion -> Int16 -> m ()
- getEventMotionSendEvent :: MonadIO m => EventMotion -> m Int8
- setEventMotionSendEvent :: MonadIO m => EventMotion -> Int8 -> m ()
- getEventMotionState :: MonadIO m => EventMotion -> m [ModifierType]
- setEventMotionState :: MonadIO m => EventMotion -> [ModifierType] -> m ()
- getEventMotionTime :: MonadIO m => EventMotion -> m Word32
- setEventMotionTime :: MonadIO m => EventMotion -> Word32 -> m ()
- getEventMotionType :: MonadIO m => EventMotion -> m EventType
- setEventMotionType :: MonadIO m => EventMotion -> EventType -> m ()
- clearEventMotionWindow :: MonadIO m => EventMotion -> m ()
- getEventMotionWindow :: MonadIO m => EventMotion -> m (Maybe Window)
- setEventMotionWindow :: MonadIO m => EventMotion -> Ptr Window -> m ()
- getEventMotionX :: MonadIO m => EventMotion -> m Double
- setEventMotionX :: MonadIO m => EventMotion -> Double -> m ()
- getEventMotionXRoot :: MonadIO m => EventMotion -> m Double
- setEventMotionXRoot :: MonadIO m => EventMotion -> Double -> m ()
- getEventMotionY :: MonadIO m => EventMotion -> m Double
- setEventMotionY :: MonadIO m => EventMotion -> Double -> m ()
- getEventMotionYRoot :: MonadIO m => EventMotion -> m Double
- setEventMotionYRoot :: MonadIO m => EventMotion -> Double -> m ()

# Exported types

newtype EventMotion Source #

Memory-managed wrapper type.

Constructors

EventMotion (ManagedPtr EventMotion) |

#### Instances

Instances details

Eq EventMotion Source # |
Instance details Defined in GI.Gdk.Structs.EventMotion Methods (==) :: EventMotion -> EventMotion -> Bool Source # (/=) :: EventMotion -> EventMotion -> Bool Source #
BoxedPtr EventMotion Source # |
Instance details Defined in GI.Gdk.Structs.EventMotion Methods boxedPtrCopy :: EventMotion -> IO EventMotion Source # boxedPtrFree :: EventMotion -> IO () Source #
CallocPtr EventMotion Source # |
Instance details Defined in GI.Gdk.Structs.EventMotion Methods boxedPtrCalloc :: IO (Ptr EventMotion) Source #
ManagedPtrNewtype EventMotion Source # |
Instance details Defined in GI.Gdk.Structs.EventMotion Methods toManagedPtr :: EventMotion -> ManagedPtr EventMotion Source #
tag ~ 'AttrSet => Constructible EventMotion tag Source # |
Instance details Defined in GI.Gdk.Structs.EventMotion Methods new :: MonadIO m => (ManagedPtr EventMotion -> EventMotion) -> [AttrOp EventMotion tag] -> m EventMotion Source #

newZeroEventMotion :: MonadIO m => m EventMotion Source #

Construct a `EventMotion` struct initialized to zero.

# Methods

# Properties

## axes

`x`, `y` translated to the axes of `device`, or `Nothing` if `device` is the mouse.

getEventMotionAxes :: MonadIO m => EventMotion -> m Double Source #

Get the value of the “`axes`” field. When overloading is enabled, this is equivalent to

    get eventMotion #axes

setEventMotionAxes :: MonadIO m => EventMotion -> Double -> m () Source #

Set the value of the “`axes`” field. When overloading is enabled, this is equivalent to

    set eventMotion [ #axes := value ]

## device

the master device that the event originated from. Use `eventGetSourceDevice` to get the slave device.

clearEventMotionDevice :: MonadIO m => EventMotion -> m () Source #

Set the value of the “`device`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #device

getEventMotionDevice :: MonadIO m => EventMotion -> m (Maybe Device) Source #

Get the value of the “`device`” field. When overloading is enabled, this is equivalent to

    get eventMotion #device

setEventMotionDevice :: MonadIO m => EventMotion -> Ptr Device -> m () Source #

Set the value of the “`device`” field. When overloading is enabled, this is equivalent to

    set eventMotion [ #device := value ]

## isHint

set to 1 if this event is just a hint, see the `EventMaskPointerMotionHintMask` value of `EventMask`.

getEventMotionIsHint :: MonadIO m => EventMotion -> m Int16 Source #

Get the value of the “`is_hint`” field. When overloading is enabled, this is equivalent to

    get eventMotion #isHint

setEventMotionIsHint :: MonadIO m => EventMotion -> Int16 -> m () Source #

Set the value of the “`is_hint`” field. When overloading is enabled, this is equivalent to

    set eventMotion [ #isHint := value ]

## sendEvent

`True` if the event was sent explicitly.

getEventMotionSendEvent :: MonadIO m => EventMotion -> m Int8 Source #

Get the value of the “`send_event`” field. When overloading is enabled, this is equivalent to

    get eventMotion #sendEvent

setEventMotionSendEvent :: MonadIO m => EventMotion -> Int8 -> m () Source #

Set the value of the “`send_event`” field. When overloading is enabled, this is equivalent to

    set eventMotion [ #sendEvent := value ]

## state

a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See `ModifierType`.

getEventMotionState :: MonadIO m => EventMotion -> m [ModifierType] Source #

Get the value of the “`state`” field. When overloading is enabled, this is equivalent to

    get eventMotion #state

setEventMotionState :: MonadIO m => EventMotion -> [ModifierType] -> m () Source #

Set the value of the “`state`” field. When overloading is enabled, this is equivalent to

    set eventMotion [ #state := value ]

## time

the time of the event in milliseconds.

getEventMotionTime :: MonadIO m => EventMotion -> m Word32 Source #

Get the value of the “`time`” field. When overloading is enabled, this is equivalent to

    get eventMotion #time

setEventMotionTime :: MonadIO m => EventMotion -> Word32 -> m () Source #

Set the value of the “`time`” field. When overloading is enabled, this is equivalent to

    set eventMotion [ #time := value ]

## type

the type of the event.

getEventMotionType :: MonadIO m => EventMotion -> m EventType Source #

Get the value of the “`type`” field. When overloading is enabled, this is equivalent to

    get eventMotion #type

setEventMotionType :: MonadIO m => EventMotion -> EventType -> m () Source #

Set the value of the “`type`” field. When overloading is enabled, this is equivalent to

    set eventMotion [ #type := value ]

## window

the window which received the event.

clearEventMotionWindow :: MonadIO m => EventMotion -> m () Source #

Set the value of the “`window`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #window

getEventMotionWindow :: MonadIO m => EventMotion -> m (Maybe Window) Source #

Get the value of the “`window`” field. When overloading is enabled, this is equivalent to

    get eventMotion #window

setEventMotionWindow :: MonadIO m => EventMotion -> Ptr Window -> m () Source #

Set the value of the “`window`” field. When overloading is enabled, this is equivalent to

    set eventMotion [ #window := value ]

## x

the x coordinate of the pointer relative to the window.

getEventMotionX :: MonadIO m => EventMotion -> m Double Source #

Get the value of the “`x`” field. When overloading is enabled, this is equivalent to

    get eventMotion #x

setEventMotionX :: MonadIO m => EventMotion -> Double -> m () Source #

Set the value of the “`x`” field. When overloading is enabled, this is equivalent to

    set eventMotion [ #x := value ]

## xRoot

the x coordinate of the pointer relative to the root of the screen.

getEventMotionXRoot :: MonadIO m => EventMotion -> m Double Source #

Get the value of the “`x_root`” field. When overloading is enabled, this is equivalent to

    get eventMotion #xRoot

setEventMotionXRoot :: MonadIO m => EventMotion -> Double -> m () Source #

Set the value of the “`x_root`” field. When overloading is enabled, this is equivalent to

    set eventMotion [ #xRoot := value ]

## y

the y coordinate of the pointer relative to the window.

getEventMotionY :: MonadIO m => EventMotion -> m Double Source #

Get the value of the “`y`” field. When overloading is enabled, this is equivalent to

    get eventMotion #y

setEventMotionY :: MonadIO m => EventMotion -> Double -> m () Source #

Set the value of the “`y`” field. When overloading is enabled, this is equivalent to

    set eventMotion [ #y := value ]

## yRoot

the y coordinate of the pointer relative to the root of the screen.

getEventMotionYRoot :: MonadIO m => EventMotion -> m Double Source #

Get the value of the “`y_root`” field. When overloading is enabled, this is equivalent to

    get eventMotion #yRoot

setEventMotionYRoot :: MonadIO m => EventMotion -> Double -> m () Source #

Set the value of the “`y_root`” field. When overloading is enabled, this is equivalent to

    set eventMotion [ #yRoot := value ]