Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
Used for button press and button release events. The @type field will be one of %GDK_BUTTON_PRESS, %GDK_2BUTTON_PRESS, %GDK_3BUTTON_PRESS or %GDK_BUTTON_RELEASE,
Double and triple-clicks result in a sequence of events being received. For double-clicks the order of events will be:
- %GDK_BUTTON_PRESS
- %GDK_BUTTON_RELEASE
- %GDK_BUTTON_PRESS
- %GDK_2BUTTON_PRESS
- %GDK_BUTTON_RELEASE
Note that the first click is received just like a normal button press, while the second click results in a %GDK_2BUTTON_PRESS being received just after the %GDK_BUTTON_PRESS.
Triple-clicks are very similar to double-clicks, except that %GDK_3BUTTON_PRESS is inserted after the third click. The order of the events is:
- %GDK_BUTTON_PRESS
- %GDK_BUTTON_RELEASE
- %GDK_BUTTON_PRESS
- %GDK_2BUTTON_PRESS
- %GDK_BUTTON_RELEASE
- %GDK_BUTTON_PRESS
- %GDK_3BUTTON_PRESS
- %GDK_BUTTON_RELEASE
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.
- newtype EventButton = EventButton (ForeignPtr EventButton)
- newZeroEventButton :: MonadIO m => m EventButton
- noEventButton :: Maybe EventButton
- eventButtonAxes :: AttrLabelProxy "axes"
- eventButtonReadAxes :: MonadIO m => EventButton -> m Double
- eventButtonWriteAxes :: MonadIO m => EventButton -> Double -> m ()
- eventButtonButton :: AttrLabelProxy "button"
- eventButtonReadButton :: MonadIO m => EventButton -> m Word32
- eventButtonWriteButton :: MonadIO m => EventButton -> Word32 -> m ()
- eventButtonClearDevice :: MonadIO m => EventButton -> m ()
- eventButtonDevice :: AttrLabelProxy "device"
- eventButtonReadDevice :: MonadIO m => EventButton -> m (Maybe Device)
- eventButtonWriteDevice :: MonadIO m => EventButton -> Ptr Device -> m ()
- eventButtonReadSendEvent :: MonadIO m => EventButton -> m Int8
- eventButtonSendEvent :: AttrLabelProxy "sendEvent"
- eventButtonWriteSendEvent :: MonadIO m => EventButton -> Int8 -> m ()
- eventButtonReadState :: MonadIO m => EventButton -> m [ModifierType]
- eventButtonState :: AttrLabelProxy "state"
- eventButtonWriteState :: MonadIO m => EventButton -> [ModifierType] -> m ()
- eventButtonReadTime :: MonadIO m => EventButton -> m Word32
- eventButtonTime :: AttrLabelProxy "time"
- eventButtonWriteTime :: MonadIO m => EventButton -> Word32 -> m ()
- eventButtonReadType :: MonadIO m => EventButton -> m EventType
- eventButtonType :: AttrLabelProxy "type"
- eventButtonWriteType :: MonadIO m => EventButton -> EventType -> m ()
- eventButtonClearWindow :: MonadIO m => EventButton -> m ()
- eventButtonReadWindow :: MonadIO m => EventButton -> m (Maybe Window)
- eventButtonWindow :: AttrLabelProxy "window"
- eventButtonWriteWindow :: MonadIO m => EventButton -> Ptr Window -> m ()
- eventButtonReadX :: MonadIO m => EventButton -> m Double
- eventButtonWriteX :: MonadIO m => EventButton -> Double -> m ()
- eventButtonX :: AttrLabelProxy "x"
- eventButtonReadXRoot :: MonadIO m => EventButton -> m Double
- eventButtonWriteXRoot :: MonadIO m => EventButton -> Double -> m ()
- eventButtonXRoot :: AttrLabelProxy "xRoot"
- eventButtonReadY :: MonadIO m => EventButton -> m Double
- eventButtonWriteY :: MonadIO m => EventButton -> Double -> m ()
- eventButtonY :: AttrLabelProxy "y"
- eventButtonReadYRoot :: MonadIO m => EventButton -> m Double
- eventButtonWriteYRoot :: MonadIO m => EventButton -> Double -> m ()
- eventButtonYRoot :: AttrLabelProxy "yRoot"
Exported types
newtype EventButton Source
WrappedPtr EventButton | |
(~) AttrOpTag tag AttrSet => Constructible EventButton tag | |
((~) * info (ResolveEventButtonMethod t EventButton), MethodInfo * info EventButton p) => IsLabelProxy t (EventButton -> p) | |
type AttributeList EventButton |
newZeroEventButton :: MonadIO m => m EventButton Source
Construct a EventButton
struct initialized to zero.
Properties
Axes
eventButtonAxes :: AttrLabelProxy "axes" Source
eventButtonReadAxes :: MonadIO m => EventButton -> m Double Source
eventButtonWriteAxes :: MonadIO m => EventButton -> Double -> m () Source
Button
eventButtonButton :: AttrLabelProxy "button" Source
eventButtonReadButton :: MonadIO m => EventButton -> m Word32 Source
eventButtonWriteButton :: MonadIO m => EventButton -> Word32 -> m () Source
Device
eventButtonClearDevice :: MonadIO m => EventButton -> m () Source
eventButtonDevice :: AttrLabelProxy "device" Source
eventButtonReadDevice :: MonadIO m => EventButton -> m (Maybe Device) Source
eventButtonWriteDevice :: MonadIO m => EventButton -> Ptr Device -> m () Source
SendEvent
eventButtonReadSendEvent :: MonadIO m => EventButton -> m Int8 Source
eventButtonSendEvent :: AttrLabelProxy "sendEvent" Source
eventButtonWriteSendEvent :: MonadIO m => EventButton -> Int8 -> m () Source
State
eventButtonReadState :: MonadIO m => EventButton -> m [ModifierType] Source
eventButtonState :: AttrLabelProxy "state" Source
eventButtonWriteState :: MonadIO m => EventButton -> [ModifierType] -> m () Source
Time
eventButtonReadTime :: MonadIO m => EventButton -> m Word32 Source
eventButtonTime :: AttrLabelProxy "time" Source
eventButtonWriteTime :: MonadIO m => EventButton -> Word32 -> m () Source
Type
eventButtonReadType :: MonadIO m => EventButton -> m EventType Source
eventButtonType :: AttrLabelProxy "type" Source
eventButtonWriteType :: MonadIO m => EventButton -> EventType -> m () Source
Window
eventButtonClearWindow :: MonadIO m => EventButton -> m () Source
eventButtonReadWindow :: MonadIO m => EventButton -> m (Maybe Window) Source
eventButtonWindow :: AttrLabelProxy "window" Source
eventButtonWriteWindow :: MonadIO m => EventButton -> Ptr Window -> m () Source
X
eventButtonReadX :: MonadIO m => EventButton -> m Double Source
eventButtonWriteX :: MonadIO m => EventButton -> Double -> m () Source
eventButtonX :: AttrLabelProxy "x" Source
XRoot
eventButtonReadXRoot :: MonadIO m => EventButton -> m Double Source
eventButtonWriteXRoot :: MonadIO m => EventButton -> Double -> m () Source
eventButtonXRoot :: AttrLabelProxy "xRoot" Source
Y
eventButtonReadY :: MonadIO m => EventButton -> m Double Source
eventButtonWriteY :: MonadIO m => EventButton -> Double -> m () Source
eventButtonY :: AttrLabelProxy "y" Source
YRoot
eventButtonReadYRoot :: MonadIO m => EventButton -> m Double Source
eventButtonWriteYRoot :: MonadIO m => EventButton -> Double -> m () Source
eventButtonYRoot :: AttrLabelProxy "yRoot" Source