2017-12-12 12:10:55 +00:00
|
|
|
module Affection.MessageBus.Message.KeyboardMessage where
|
|
|
|
|
|
|
|
import Affection.MessageBus.Message.Class
|
|
|
|
|
|
|
|
import Data.Word (Word32(..))
|
|
|
|
|
|
|
|
import qualified SDL
|
|
|
|
|
|
|
|
data KeyboardMessage = MsgKeyboardEvent
|
|
|
|
{ msgKbdWhen :: Word32
|
|
|
|
, 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
|