affection/src/Affection/MessageBus/Message/KeyboardMessage.hs

17 lines
427 B
Haskell
Raw Normal View History

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
2017-12-15 17:20:04 +00:00
, msgKbdKeyRepeat :: Bool
2017-12-12 12:10:55 +00:00
, 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