Safe Haskell | None |
---|
Re-export the operations of the chosen raw frontend (determined at compile time with cabal flags).
- data FrontendSession
- startup :: String -> (FrontendSession -> IO ()) -> IO ()
- frontendName :: String
- nextEvent :: FrontendSession -> Maybe Bool -> IO (Key, Modifier)
- promptGetAnyKey :: FrontendSession -> SingleFrame -> IO (Key, Modifier)
- display :: FrontendSession -> Bool -> Bool -> Maybe SingleFrame -> IO ()
Re-exported raw frontend
data FrontendSession Source
Session data maintained by the frontend.
startup :: String -> (FrontendSession -> IO ()) -> IO ()Source
Spawns the gtk input and output thread, which spawns all the other
required threads. We create a separate thread for gtk to minimize
communication with the heavy main thread. The other threads have to be
spawned after gtk is initialized, because they call postGUIAsync
,
and need sview
and stags
.
The name of the frontend.
nextEvent :: FrontendSession -> Maybe Bool -> IO (Key, Modifier)Source
Input key via the frontend. Fail if there is no frame to show to the player as a prompt for the keypress.
promptGetAnyKey :: FrontendSession -> SingleFrame -> IO (Key, Modifier)Source
Display a prompt, wait for any key. Starts in Push or None mode, stop in None mode. Spends most time waiting for a key, so not performance critical, so does not need optimization.
display :: FrontendSession -> Bool -> Bool -> Maybe SingleFrame -> IO ()Source
Add a frame to be drawn.