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

19 lines
443 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
2017-12-20 01:00:48 +00:00
data KeyboardMessage
= MsgKeyboardEvent
{ msgKbdWhen :: Double
, msgKbdWindow :: Maybe SDL.Window
, msgKbdKeyMotion :: SDL.InputMotion
, msgKbdKeyRepeat :: Bool
, msgKbdKeysym :: SDL.Keysym
}
deriving (Show)
2017-12-12 12:10:55 +00:00
instance Message KeyboardMessage where
msgTime (MsgKeyboardEvent t _ _ _ _) = t