gi-gdk-3.0.16: Gdk 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.Gdk.Structs.EventButton

Contents

Description

Used for button press and button release events. The type field will be one of EventTypeButtonPress, EventType2buttonPress, EventType3buttonPress or EventTypeButtonRelease,

Double and triple-clicks result in a sequence of events being received. For double-clicks the order of events will be:

Note that the first click is received just like a normal button press, while the second click results in a EventType2buttonPress being received just after the EventTypeButtonPress.

Triple-clicks are very similar to double-clicks, except that EventType3buttonPress is inserted after the third click. The order of the events is:

For a double click to occur, the second button press must occur within 1/4 of a second of the first. For a triple click to occur, the third button press must also occur within 1/2 second of the first button press.

Synopsis

Exported types

newZeroEventButton :: MonadIO m => m EventButton Source #

Construct a EventButton struct initialized to zero.

Properties

axes

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

getEventButtonAxes :: MonadIO m => EventButton -> m Double Source #

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

get eventButton #axes

setEventButtonAxes :: MonadIO m => EventButton -> Double -> m () Source #

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

set eventButton [ #axes := value ]

button

the button which was pressed or released, numbered from 1 to 5. Normally button 1 is the left mouse button, 2 is the middle button, and 3 is the right button. On 2-button mice, the middle button can often be simulated by pressing both mouse buttons together.

getEventButtonButton :: MonadIO m => EventButton -> m Word32 Source #

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

get eventButton #button

setEventButtonButton :: MonadIO m => EventButton -> Word32 -> m () Source #

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

set eventButton [ #button := value ]

device

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

clearEventButtonDevice :: MonadIO m => EventButton -> m () Source #

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

clear #device

getEventButtonDevice :: MonadIO m => EventButton -> m (Maybe Device) Source #

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

get eventButton #device

setEventButtonDevice :: MonadIO m => EventButton -> Ptr Device -> m () Source #

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

set eventButton [ #device := value ]

sendEvent

True if the event was sent explicitly.

getEventButtonSendEvent :: MonadIO m => EventButton -> m Int8 Source #

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

get eventButton #sendEvent

setEventButtonSendEvent :: MonadIO m => EventButton -> Int8 -> m () Source #

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

set eventButton [ #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.

getEventButtonState :: MonadIO m => EventButton -> m [ModifierType] Source #

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

get eventButton #state

setEventButtonState :: MonadIO m => EventButton -> [ModifierType] -> m () Source #

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

set eventButton [ #state := value ]

time

the time of the event in milliseconds.

getEventButtonTime :: MonadIO m => EventButton -> m Word32 Source #

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

get eventButton #time

setEventButtonTime :: MonadIO m => EventButton -> Word32 -> m () Source #

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

set eventButton [ #time := value ]

type

getEventButtonType :: MonadIO m => EventButton -> m EventType Source #

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

get eventButton #type

setEventButtonType :: MonadIO m => EventButton -> EventType -> m () Source #

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

set eventButton [ #type := value ]

window

the window which received the event.

clearEventButtonWindow :: MonadIO m => EventButton -> m () Source #

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

clear #window

getEventButtonWindow :: MonadIO m => EventButton -> m (Maybe Window) Source #

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

get eventButton #window

setEventButtonWindow :: MonadIO m => EventButton -> Ptr Window -> m () Source #

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

set eventButton [ #window := value ]

x

the x coordinate of the pointer relative to the window.

getEventButtonX :: MonadIO m => EventButton -> m Double Source #

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

get eventButton #x

setEventButtonX :: MonadIO m => EventButton -> Double -> m () Source #

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

set eventButton [ #x := value ]

xRoot

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

getEventButtonXRoot :: MonadIO m => EventButton -> m Double Source #

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

get eventButton #xRoot

setEventButtonXRoot :: MonadIO m => EventButton -> Double -> m () Source #

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

set eventButton [ #xRoot := value ]

y

the y coordinate of the pointer relative to the window.

getEventButtonY :: MonadIO m => EventButton -> m Double Source #

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

get eventButton #y

setEventButtonY :: MonadIO m => EventButton -> Double -> m () Source #

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

set eventButton [ #y := value ]

yRoot

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

getEventButtonYRoot :: MonadIO m => EventButton -> m Double Source #

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

get eventButton #yRoot

setEventButtonYRoot :: MonadIO m => EventButton -> Double -> m () Source #

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

set eventButton [ #yRoot := value ]