The library's device output abstraction. Platform-specific implementations must implement an Output and provide it to mkVtyFromPair.
Constructors
OutputterminalID :: StringText identifier for the output device. Used for debugging.
releaseTerminal :: IO ()Release the terminal just prior to application exit and reset it to its state prior to application startup.
reserveDisplay :: IO ()Clear the display and initialize the terminal to some initial display state.
The expectation of a program is that the display starts in some The initial state. initial state would consist of fixed values:
cursor at top left
UTF-8 character encoding
drawing characteristics are the default
releaseDisplay :: IO ()Return the display to the state before reserveDisplay If no previous state then set the display state to the initial state.
setDisplayBounds :: (Int, Int) -> IO ()Sets the current display bounds (width, height).
displayBounds :: IO DisplayRegionReturns the current display bounds.
outputByteBuffer :: ByteString -> IO ()Output the bytestring to the terminal device.
supportsCursorVisibility :: BoolSpecifies whether the cursor can be shown / hidden.
supportsMode :: Mode -> BoolIndicates support for terminal modes for this output device.
setMode :: Mode -> Bool -> IO ()Enables or disables a mode (does nothing if the mode is unsupported).
getModeStatus :: Mode -> IO BoolReturns whether a mode is enabled.
assumedStateRef :: IORef AssumedStatemkDisplayContext :: Output -> DisplayRegion -> IO DisplayContextAcquire display access to the given region of the display. Currently all regions have the upper left corner of (0,0) and the lower right corner at (max displayWidth providedWidth, max displayHeight providedHeight)
ringTerminalBell :: IO ()Ring the terminal bell if supported.
supportsBell :: IO BoolReturns whether the terminal has an audio bell feature.
supportsItalics :: IO BoolReturns whether the terminal supports italicized text.
This is terminal-dependent and should make a best effort to determine whether this feature is supported, but even if the terminal advertises support (e.g. via terminfo) that might not be a reliable indicator of whether the feature will work as desired.
supportsStrikethrough :: IO BoolReturns whether the terminal supports strikethrough text.
This is terminal-dependent and should make a best effort to determine whether this feature is supported, but even if the terminal advertises support (e.g. via terminfo) that might not be a reliable indicator of whether the feature will work as desired.
outputColorMode :: ColorModeReturns how many colors the terminal supports.
setOutputWindowTitle :: String -> IO ()Set the output's window title, if any.