Safe Haskell | None |
---|---|
Language | Haskell2010 |
Text frontend based on SDL2.
- startup :: ClientOptions -> IO RawFrontend
- frontendName :: String
- type FontAtlas = EnumMap AttrCharW32 Texture
- data FrontendSession = FrontendSession {}
- startupFun :: ClientOptions -> MVar RawFrontend -> IO ()
- shutdown :: FrontendSession -> IO ()
- forceShutdown :: FrontendSession -> IO ()
- display :: ClientOptions -> FrontendSession -> SingleFrame -> IO ()
- displayNoLock :: ClientOptions -> FrontendSession -> SingleFrame -> IO ()
- modTranslate :: KeyModifier -> Modifier
- keyTranslate :: Bool -> Keycode -> Key
- colorToRGBA :: Color -> V4 Word8
Documentation
startup :: ClientOptions -> IO RawFrontend Source #
Set up and start the main loop providing input and output.
Apparently some SDL backends are not thread-safe (https:/wiki.libsdl.orgFAQDevelopment), so we stick to main thread.
frontendName :: String Source #
The name of the frontend.
Internal operations
startupFun :: ClientOptions -> MVar RawFrontend -> IO () Source #
shutdown :: FrontendSession -> IO () Source #
forceShutdown :: FrontendSession -> IO () Source #
:: ClientOptions | |
-> FrontendSession | frontend session data |
-> SingleFrame | the screen frame to draw |
-> IO () |
Add a frame to be drawn.
:: ClientOptions | |
-> FrontendSession | frontend session data |
-> SingleFrame | the screen frame to draw |
-> IO () |
modTranslate :: KeyModifier -> Modifier Source #
Translates modifiers to our own encoding, ignoring Shift.