| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Game.LambdaHack.Client.UI.Frontend.Sdl
Contents
Description
Text frontend based on SDL2.
Synopsis
- 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 :: FrontendSession -> SingleFrame -> IO ()
- drawFrame :: ClientOptions -> FrontendSession -> SingleFrame -> IO ()
- printScreen :: FrontendSession -> IO ()
- modTranslate :: KeyModifier -> Modifier
- keyTranslate :: Bool -> Keycode -> Key
- colorToRGBA :: Color -> V4 Word8
Documentation
startup :: ClientOptions -> IO RawFrontend #
Set up and start the main loop providing input and output.
Because of Windows and OS X, SDL2 needs to be on a bound thread, so we can't avoid the communication overhead of bound threads.
frontendName :: String #
The name of the frontend.
Internal operations
type FontAtlas = EnumMap AttrCharW32 Texture #
data FrontendSession #
Session data maintained by the frontend.
Constructors
| FrontendSession | |
Fields
| |
startupFun :: ClientOptions -> MVar RawFrontend -> IO () #
shutdown :: FrontendSession -> IO () #
forceShutdown :: FrontendSession -> IO () #
Arguments
| :: FrontendSession | frontend session data |
| -> SingleFrame | the screen frame to draw |
| -> IO () |
Add a frame to be drawn.
Arguments
| :: ClientOptions | |
| -> FrontendSession | frontend session data |
| -> SingleFrame | the screen frame to draw |
| -> IO () |
printScreen :: FrontendSession -> IO () #
modTranslate :: KeyModifier -> Modifier #
Translates modifiers to our own encoding, ignoring Shift.
keyTranslate :: Bool -> Keycode -> Key #
colorToRGBA :: Color -> V4 Word8 #