diff options
Diffstat (limited to 'src/Chelleport')
| -rw-r--r-- | src/Chelleport/Types.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Chelleport/Types.hs b/src/Chelleport/Types.hs index c1cf386..a6aa7cc 100644 --- a/src/Chelleport/Types.hs +++ b/src/Chelleport/Types.hs @@ -1,12 +1,15 @@ module Chelleport.Types where import Control.Monad.Reader (MonadIO, MonadReader, ReaderT) +import Data.Word (Word8) import qualified Graphics.X11 as X11 import qualified SDL import qualified SDL.Font as TTF type Cell = [Char] +type Color = SDL.V4 Word8 + type KeySequence = [Char] type KeyGrid = [[Cell]] @@ -17,6 +20,7 @@ data State = State stateIsMatched :: Bool, stateIsShiftPressed :: Bool } + deriving (Show, Eq) data AppAction = HandleKeyInput SDL.Keycode @@ -26,6 +30,7 @@ data AppAction | IncrementMouseCursor (Int, Int) | ShutdownApp | UpdateShiftState Bool + deriving (Show, Eq) data DrawContext = DrawContext { ctxWindow :: SDL.Window, @@ -43,6 +48,7 @@ type View state = state -> IO () type Initializer state = IO state data MouseButtonType = LeftClick + deriving (Show, Eq) newtype AppM m a = AppM {runAppM :: ReaderT DrawContext m a} deriving (Functor, Applicative, Monad, MonadIO, MonadReader DrawContext) |
