vty-5.29: A simple terminal UI library

Safe HaskellNone
LanguageHaskell2010

Graphics.Vty.Output.Interface

Description

This module provides an abstract interface for performing terminal output. The only user-facing part of this API is Output.

Synopsis

Documentation

data Output Source #

The Vty terminal output interface.

Constructors

Output 

Fields

data DisplayContext Source #

Constructors

DisplayContext 

Fields

data Mode Source #

Modal terminal features that can be enabled and disabled.

Constructors

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 withURL attribute modifier (see https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda). Note that this may not work gracefully in all terminal emulators so be sure to test this mode with the terminals you intend to support. It is off by default.

Instances
Eq Mode Source # 
Instance details

Defined in Graphics.Vty.Output.Interface

Methods

(==) :: Mode -> Mode -> Bool #

(/=) :: Mode -> Mode -> Bool #

Read Mode Source # 
Instance details

Defined in Graphics.Vty.Output.Interface

Show Mode Source # 
Instance details

Defined in Graphics.Vty.Output.Interface

Methods

showsPrec :: Int -> Mode -> ShowS #

show :: Mode -> String #

showList :: [Mode] -> ShowS #

outputPicture :: DisplayContext -> Picture -> IO () Source #

Displays the given Picture.

  1. The image is cropped to the display size.
  2. Converted into a sequence of attribute changes and text spans.
  3. The cursor is hidden.
  4. Serialized to the display.
  5. The cursor is then shown and positioned or kept hidden.

limitAttrForDisplay :: Output -> Attr -> Attr Source #

Not all terminals support all display attributes. This filters a display attribute to what the given terminal can display.