diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-12-19 22:40:41 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-12-19 22:40:41 +0530 |
| commit | 5dc3696f38433c79939bb182c4590a6ce04f4c63 (patch) | |
| tree | 4329988cad9afa9c58f8a4c66419d23bc0ddc55d /src/Chelleport | |
| parent | d44103add77718ae650bc0ad5e708e984192c29d (diff) | |
| download | chelleport-5dc3696f38433c79939bb182c4590a6ce04f4c63.tar.gz chelleport-5dc3696f38433c79939bb182c4590a6ce04f4c63.zip | |
Test mock setup for update + 1 spec for update case
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) |
