Skip to main content

Crate tv

Crate tv 

Source
Expand description

tv - A terminal manipulation library

tv provides a simple API for building terminal user interfaces.

§Example

ⓘ
use tv::{Screen, Color, Attr};

let mut scr = Screen::init()?;
scr.move_print(5, 10, "Hello, World!")?;
scr.add_attribute(Attr::BOLD)?;
scr.print("Bold text")?;
scr.refresh()?;
scr.get_char()?;
scr.endwin()?;

Structs§

AcsChar
Alternative Character Set (ACS) for box drawing and special characters
Attr
Text attributes
Cell
ColorPair
A color pair consisting of foreground and background colors
ColorRgb
RGB color
ImagePlacement
Image placement options
KeyEvent
Enhanced key event carrying full kitty-protocol information.
KittyFlags
Progressive-enhancement flags for the Kitty keyboard protocol.
KittyImage
Kitty image protocol builder
Layer
A layer wraps a surface and provides z-ordering
Modifiers
Keyboard modifiers, encoded in the spec’s bitmask order.
MosaicConfig
Configuration for mosaic rendering
Screen
Main screen interface
SixelImage
Sixel image encoder
Surface
A surface (subregion of the screen)

Enums§

Color
Terminal color
Error
Errors that can occur during terminal operations
FunctionalKey
Named functional keys carried on PUA codepoints.
ImageFormat
Image transmission format
ImageProtocol
Image protocol to use
Key
Keyboard input key.
KeyEventType
Type of a key event.
NamedColor
Named ANSI colors
SetMode
Mode argument to [set_sequence].
SymbolSet
Symbol set to use for rendering

Constants§

ACS_BLOCK
Solid square block (█)
ACS_BOARD
Board of squares (▒)
ACS_BTEE
Bottom tee (┴)
ACS_BULLET
Bullet (•)
ACS_CKBOARD
Checker board (░)
ACS_DARROW
Arrow pointing down (↓)
ACS_DEGREE
Degree symbol (°)
ACS_DIAMOND
Diamond (◆)
ACS_GEQUAL
Greater than or equal (≥)
ACS_HLINE
Horizontal line
ACS_LANTERN
Lantern symbol (▓)
ACS_LARROW
Arrow pointing left (←)
ACS_LEQUAL
Less than or equal (≤)
ACS_LLCORNER
Lower left corner
ACS_LRCORNER
Lower right corner
ACS_LTEE
Left tee (├)
ACS_NEQUAL
Not equal (≠)
ACS_PI
Pi (π)
ACS_PLMINUS
Plus/minus (±)
ACS_PLUS
Plus/crossover (┼)
ACS_RARROW
Arrow pointing right (→)
ACS_RTEE
Right tee (┤)
ACS_S1
Scan line 1 (⎺)
ACS_S3
Scan line 3 (⎻)
ACS_S7
Scan line 7 (⎼)
ACS_S9
Scan line 9 (⎽)
ACS_STERLING
Pound sterling (£)
ACS_TTEE
Top tee (┬)
ACS_UARROW
Arrow pointing up (↑)
ACS_ULCORNER
Upper left corner
ACS_URCORNER
Upper right corner
ACS_VLINE
Vertical line

Functions§

render_mosaic
Render RGB image data as Unicode block art

Type Aliases§

Result
Result type for Yellow operations