Safe Haskell | None |
---|---|
Language | Haskell2010 |
Display game data on the screen and receive user input using one of the available raw frontends and derived operations.
- data FrontReq :: * -> * where
- FrontFrame :: {..} -> FrontReq ()
- FrontDelay :: !Int -> FrontReq ()
- FrontKey :: {..} -> FrontReq KMP
- FrontPressed :: FrontReq Bool
- FrontDiscard :: FrontReq ()
- FrontAdd :: KMP -> FrontReq ()
- FrontAutoYes :: Bool -> FrontReq ()
- FrontShutdown :: FrontReq ()
- newtype ChanFrontend = ChanFrontend (forall a. FrontReq a -> IO a)
- data KMP = KMP {
- kmpKeyMod :: !KM
- kmpPointer :: !Point
- frontendName :: String
- chanFrontendIO :: DebugModeCli -> IO ChanFrontend
- getKey :: DebugModeCli -> FSession -> RawFrontend -> [KM] -> FrameForall -> IO KMP
- fchanFrontend :: DebugModeCli -> FSession -> RawFrontend -> ChanFrontend
- display :: RawFrontend -> FrameForall -> IO ()
- defaultMaxFps :: Int
- microInSec :: Int
- frameTimeoutThread :: Int -> MVar Int -> RawFrontend -> IO ()
- lazyStartup :: IO RawFrontend
- nullStartup :: IO RawFrontend
- seqFrame :: SingleFrame -> IO ()
Connection types
data FrontReq :: * -> * where Source #
The instructions sent by clients to the raw frontend.
FrontFrame :: {..} -> FrontReq () | Show a frame. |
FrontDelay :: !Int -> FrontReq () | Perform an explicit delay of the given length. |
FrontKey :: {..} -> FrontReq KMP | Flush frames, display a frame and ask for a keypress. |
| |
FrontPressed :: FrontReq Bool | Inspect the fkeyPressed MVar. |
FrontDiscard :: FrontReq () | discard a key in the queue, if any. |
FrontAdd :: KMP -> FrontReq () | Add a key to the queue. |
FrontAutoYes :: Bool -> FrontReq () | set in the frontend that it should auto-answer prompts. |
FrontShutdown :: FrontReq () | shut the frontend down. |
newtype ChanFrontend Source #
Connection channel between a frontend and a client. Frontend acts as a server, serving keys, etc., when given frames to display.
ChanFrontend (forall a. FrontReq a -> IO a) |
Re-exported part of the raw frontend
frontendName :: String Source #
The name of the chosen frontend.
Derived operations
Internal operations
getKey :: DebugModeCli -> FSession -> RawFrontend -> [KM] -> FrameForall -> IO KMP Source #
Display a prompt, wait for any of the specified keys (for any key, if the list is empty). Repeat if an unexpected key received.
fchanFrontend :: DebugModeCli -> FSession -> RawFrontend -> ChanFrontend Source #
Read UI requests from the client and send them to the frontend,
display :: RawFrontend -> FrameForall -> IO () Source #
defaultMaxFps :: Int Source #
microInSec :: Int Source #
frameTimeoutThread :: Int -> MVar Int -> RawFrontend -> IO () Source #
seqFrame :: SingleFrame -> IO () Source #