Safe Haskell | None |
---|
Display game data on the screen and receive user input using one of the available raw frontends and derived operations.
- type FrontendSession = ()
- startup :: String -> (FrontendSession -> IO ()) -> IO ()
- frontendName :: String
- nextEvent :: FrontendSession -> Maybe Bool -> IO (Key, Modifier)
- displayFrame :: FrontendSession -> Bool -> Maybe SingleFrame -> IO ()
- promptGetKey :: FrontendSession -> [(Key, Modifier)] -> SingleFrame -> IO (Key, Modifier)
Re-exported part of the raw frontend
type FrontendSession = ()Source
No session data needs to be maintained by this frontend.
startup :: String -> (FrontendSession -> IO ()) -> IO ()Source
Starts the main program loop using the frontend input and output.
The name of the frontend.
Derived operations
displayFrame :: FrontendSession -> Bool -> Maybe SingleFrame -> IO ()Source
Push a frame or a single frame's worth of delay to the frame queue.
promptGetKey :: FrontendSession -> [(Key, Modifier)] -> SingleFrame -> IO (Key, Modifier)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.