| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte | 
|---|---|
| License | LGPL-2.1 | 
| Maintainer | Iñaki García Etxebarria | 
| Safe Haskell | None | 
| Language | Haskell2010 | 
GI.Gdk.Structs.EventButton
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:
EventTypeButtonPressEventTypeButtonReleaseEventTypeButtonPressEventType2buttonPressEventTypeButtonRelease
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:
EventTypeButtonPressEventTypeButtonReleaseEventTypeButtonPressEventType2buttonPressEventTypeButtonReleaseEventTypeButtonPressEventType3buttonPressEventTypeButtonRelease
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
- newtype EventButton = EventButton (ManagedPtr EventButton)
 - newZeroEventButton :: MonadIO m => m EventButton
 - noEventButton :: Maybe EventButton
 - getEventButtonAxes :: MonadIO m => EventButton -> m Double
 - setEventButtonAxes :: MonadIO m => EventButton -> Double -> m ()
 - getEventButtonButton :: MonadIO m => EventButton -> m Word32
 - setEventButtonButton :: MonadIO m => EventButton -> Word32 -> m ()
 - clearEventButtonDevice :: MonadIO m => EventButton -> m ()
 - getEventButtonDevice :: MonadIO m => EventButton -> m (Maybe Device)
 - setEventButtonDevice :: MonadIO m => EventButton -> Ptr Device -> m ()
 - getEventButtonSendEvent :: MonadIO m => EventButton -> m Int8
 - setEventButtonSendEvent :: MonadIO m => EventButton -> Int8 -> m ()
 - getEventButtonState :: MonadIO m => EventButton -> m [ModifierType]
 - setEventButtonState :: MonadIO m => EventButton -> [ModifierType] -> m ()
 - getEventButtonTime :: MonadIO m => EventButton -> m Word32
 - setEventButtonTime :: MonadIO m => EventButton -> Word32 -> m ()
 - getEventButtonType :: MonadIO m => EventButton -> m EventType
 - setEventButtonType :: MonadIO m => EventButton -> EventType -> m ()
 - clearEventButtonWindow :: MonadIO m => EventButton -> m ()
 - getEventButtonWindow :: MonadIO m => EventButton -> m (Maybe Window)
 - setEventButtonWindow :: MonadIO m => EventButton -> Ptr Window -> m ()
 - getEventButtonX :: MonadIO m => EventButton -> m Double
 - setEventButtonX :: MonadIO m => EventButton -> Double -> m ()
 - getEventButtonXRoot :: MonadIO m => EventButton -> m Double
 - setEventButtonXRoot :: MonadIO m => EventButton -> Double -> m ()
 - getEventButtonY :: MonadIO m => EventButton -> m Double
 - setEventButtonY :: MonadIO m => EventButton -> Double -> m ()
 - getEventButtonYRoot :: MonadIO m => EventButton -> m Double
 - setEventButtonYRoot :: MonadIO m => EventButton -> Double -> m ()
 
Exported types
newtype EventButton Source #
Memory-managed wrapper type.
Constructors
| EventButton (ManagedPtr EventButton) | 
Instances
| Eq EventButton Source # | |
Defined in GI.Gdk.Structs.EventButton  | |
| WrappedPtr EventButton Source # | |
Defined in GI.Gdk.Structs.EventButton  | |
| tag ~ 'AttrSet => Constructible EventButton tag Source # | |
Defined in GI.Gdk.Structs.EventButton Methods new :: MonadIO m => (ManagedPtr EventButton -> EventButton) -> [AttrOp EventButton tag] -> m EventButton #  | |
newZeroEventButton :: MonadIO m => m EventButton Source #
Construct a EventButton struct initialized to zero.
noEventButton :: Maybe EventButton Source #
A convenience alias for Nothing :: Maybe EventButton.
Methods
Overloaded methods
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
seteventButton [ #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
seteventButton [ #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
seteventButton [ #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
seteventButton [ #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
seteventButton [ #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
seteventButton [ #time:=value ]
type
the type of the event (EventTypeButtonPress, EventType2buttonPress,
   EventType3buttonPress or EventTypeButtonRelease).
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
seteventButton [ #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
seteventButton [ #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
seteventButton [ #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
seteventButton [ #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
seteventButton [ #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
seteventButton [ #yRoot:=value ]