2017-12-12 12:10:55 +00:00
|
|
|
module Affection.MessageBus.Message.KeyboardMessage where
|
|
|
|
|
|
|
|
import Affection.MessageBus.Message.Class
|
|
|
|
|
|
|
|
import qualified SDL
|
|
|
|
|
|
|
|
data KeyboardMessage = MsgKeyboardEvent
|
2017-12-13 14:19:53 +00:00
|
|
|
{ msgKbdWhen :: Double
|
2017-12-12 12:10:55 +00:00
|
|
|
, msgKbdWindow :: Maybe SDL.Window
|
|
|
|
, msgKbdKeyMotion :: SDL.InputMotion
|
|
|
|
, msgKbdLeyRepeat :: Bool
|
|
|
|
, msgKbdKeysym :: SDL.Keysym
|
2017-12-13 03:37:16 +00:00
|
|
|
} deriving (Show)
|
2017-12-12 12:10:55 +00:00
|
|
|
|
|
|
|
instance Message KeyboardMessage where
|
|
|
|
msgTime (MsgKeyboardEvent t _ _ _ _) = t
|