Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module provides an abstract interface for performing terminal
output. The only user-facing part of this API is Output
.
Synopsis
- data Output = Output {
- terminalID :: String
- releaseTerminal :: IO ()
- reserveDisplay :: IO ()
- releaseDisplay :: IO ()
- setDisplayBounds :: (Int, Int) -> IO ()
- displayBounds :: IO DisplayRegion
- outputByteBuffer :: ByteString -> IO ()
- supportsCursorVisibility :: Bool
- supportsMode :: Mode -> Bool
- setMode :: Mode -> Bool -> IO ()
- getModeStatus :: Mode -> IO Bool
- assumedStateRef :: IORef AssumedState
- mkDisplayContext :: Output -> DisplayRegion -> IO DisplayContext
- ringTerminalBell :: IO ()
- supportsBell :: IO Bool
- supportsItalics :: IO Bool
- supportsStrikethrough :: IO Bool
- outputColorMode :: ColorMode
- data AssumedState = AssumedState {}
- data DisplayContext = DisplayContext {
- contextDevice :: Output
- contextRegion :: DisplayRegion
- writeMoveCursor :: Int -> Int -> Write
- writeShowCursor :: Write
- writeHideCursor :: Write
- writeSetAttr :: Bool -> FixedAttr -> Attr -> DisplayAttrDiff -> Write
- writeDefaultAttr :: Bool -> Write
- writeRowEnd :: Write
- inlineHack :: IO ()
- data Mode
- displayContext :: Output -> DisplayRegion -> IO DisplayContext
- outputPicture :: DisplayContext -> Picture -> IO ()
- initialAssumedState :: AssumedState
- limitAttrForDisplay :: Output -> Attr -> Attr
Documentation
The Vty terminal output interface.
Output | |
|
data AssumedState Source #
data DisplayContext Source #
DisplayContext | |
|
Modal terminal features that can be enabled and disabled.
Mouse | Mouse mode (whether the terminal is configured to provide mouse input events) |
BracketedPaste | Paste mode (whether the terminal is configured to provide events on OS pastes) |
Focus | Focus-in/focus-out events (whether the terminal is configured to provide events on focus change) |
Hyperlink | Hyperlink mode via the |
displayContext :: Output -> DisplayRegion -> IO DisplayContext Source #
outputPicture :: DisplayContext -> Picture -> IO () Source #
Displays the given Picture
.
- The image is cropped to the display size.
- Converted into a sequence of attribute changes and text spans.
- The cursor is hidden.
- Serialized to the display.
- The cursor is then shown and positioned or kept hidden.