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
- Color
Pair - A color pair consisting of foreground and background colors
- Color
Rgb - RGB color
- Image
Placement - Image placement options
- KeyEvent
- Enhanced key event carrying full kitty-protocol information.
- Kitty
Flags - Progressive-enhancement flags for the Kitty keyboard protocol.
- Kitty
Image - Kitty image protocol builder
- Layer
- A layer wraps a surface and provides z-ordering
- Modifiers
- Keyboard modifiers, encoded in the spec’s bitmask order.
- Mosaic
Config - Configuration for mosaic rendering
- Screen
- Main screen interface
- Sixel
Image - Sixel image encoder
- Surface
- A surface (subregion of the screen)
Enums§
- Color
- Terminal color
- Error
- Errors that can occur during terminal operations
- Functional
Key - Named functional keys carried on PUA codepoints.
- Image
Format - Image transmission format
- Image
Protocol - Image protocol to use
- Key
- Keyboard input key.
- KeyEvent
Type - Type of a key event.
- Named
Color - Named ANSI colors
- SetMode
- Mode argument to [
set_sequence]. - Symbol
Set - 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