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
- eventButtonReadAxes :: EventButton -> IO Double
- eventButtonReadButton :: EventButton -> IO Word32
- eventButtonReadDevice :: EventButton -> IO Device
- eventButtonReadSendEvent :: EventButton -> IO Int8
- eventButtonReadState :: EventButton -> IO [ModifierType]
- eventButtonReadTime :: EventButton -> IO Word32
- eventButtonReadType :: EventButton -> IO EventType
- eventButtonReadWindow :: EventButton -> IO Window
- eventButtonReadX :: EventButton -> IO Double
- eventButtonReadXRoot :: EventButton -> IO Double
- eventButtonReadY :: EventButton -> IO Double
- eventButtonReadYRoot :: EventButton -> IO Double
Exported types
newtype EventButton Source
((~) * info (ResolveEventButtonMethod t EventButton), MethodInfo * info EventButton p) => IsLabel t (EventButton -> p) Source | |
((~) * info (ResolveEventButtonMethod t EventButton), MethodInfo * info EventButton p) => IsLabelProxy t (EventButton -> p) Source | |
newZeroEventButton :: MonadIO m => m EventButton Source
Construct a EventButton
struct initialized to zero.