Text frontend based on Gtk.
- data FrontendSession
- display :: FrontendSession -> Bool -> Bool -> Maybe SingleFrame -> IO ()
- nextEvent :: FrontendSession -> Maybe Bool -> IO (Key, Modifier)
- promptGetKey :: FrontendSession -> [(Key, Modifier)] -> SingleFrame -> IO (Key, Modifier)
- frontendName :: String
- startup :: String -> (FrontendSession -> IO ()) -> IO ()
- shutdown :: FrontendSession -> IO ()
Session data type for the frontend
The output and input operations
Add a frame to be drawn.
Input key via the frontend. Fail if there is no frame to show to the player as a prompt for the keypress.
Display a prompt, wait for any of the specified keys (for any key, if the list is empty). Repeat if an unexpected key received. 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.
Frontend administration tools
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