Copyright | (c) 2018 Francisco Vallarino |
---|---|
License | BSD-3-Clause (see the LICENSE file) |
Maintainer | fjvallarino@gmail.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Core functions for SDL event processing and conversion.
Synopsis
- isActionEvent :: EventPayload -> Bool
- convertEvents :: Double -> Double -> Point -> [EventPayload] -> [SystemEvent]
- translateEvent :: Point -> SystemEvent -> SystemEvent
Documentation
isActionEvent :: EventPayload -> Bool Source #
Checks if an SDL event is an action event. Currently only mouse and keyboard events are considered as such (touch events should be added in the future). This is used for triggering automatic rendering of a frame. For other events, widgets must request rendering explicitly.
:: Double | Device pixel rate. |
-> Double | Event pixel rate. |
-> Point | Mouse position. |
-> [EventPayload] | List of SDL events. |
-> [SystemEvent] | List of Monomer events. |
Converts SDL events to Monomer's SystemEvent
:: Point | Offset to apply |
-> SystemEvent | Source SystemEvent |
-> SystemEvent | Updated SystemEvent |
Adds a given offset to mouse related SystemEvents.