termwiz/lib.rs
1//! # Terminal Wizardry
2//!
3//! This is a rust crate that provides a number of support functions
4//! for applications interested in either displaying data to a terminal
5//! or in building a terminal emulator.
6//!
7//! It is currently in active development and subject to fairly wild
8//! sweeping changes.
9//!
10//! Included functionality:
11//!
12//! * `Surface` models a terminal display and its component `Cell`s
13//! * Terminal attributes are aware of modern features such as
14//! True Color, [Hyperlinks](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda)
15//! and will also support sixel and iterm style terminal graphics display.
16//! * `Surface`s include a log of `Change`s and an API for consuming
17//! and applying deltas. This is a powerful building block for
18//! synchronizing screen instances.
19//! * Escape sequence parser decodes inscrutable escape sequences
20//! and gives them semantic meaning, making the code that uses
21//! them clearer. The decoded escapes can be re-encoded, allowing
22//! applications to start with the semantic meaning and emit
23//! the appropriate escape sequence without embedding obscure
24//! binary bytes.
25//! * `Capabilities` allows probing for terminal capabilities
26//! that may not be included in the system terminfo database,
27//! and overriding them in an embedding application.
28//! * `Terminal` trait provides an abstraction over unix style ttys
29//! and Windows style console APIs. `Change`s from `Surface`
30//! can be rendered to `Terminal`s. `Terminal`s allow decoding
31//! mouse and keyboard inputs in both blocking or non-blocking
32//! mode.
33//! * `Widget` trait allows composition of UI elements at a higher
34//! level.
35//! * `LineEditor` provides line editing facilities similar to those
36//! in the unix shell.
37//!
38//! ## Features
39//!
40//! * `widgets` - enables the widget layout and related traits
41//! * `use_serde` - makes a number of structs serde serializable
42
43mod emoji;
44mod emoji_presentation;
45mod emoji_variation;
46mod white_space;
47mod widechar_width;
48
49pub mod caps;
50pub mod cell;
51pub mod cellcluster;
52pub mod color;
53pub mod error;
54pub mod escape;
55pub mod hyperlink;
56pub mod image;
57pub mod input;
58pub mod istty;
59pub mod keymap;
60pub mod lineedit;
61mod macros;
62pub mod nerdfonts;
63mod nerdfonts_data;
64mod readbuf;
65pub mod render;
66pub mod surface;
67pub mod terminal;
68pub mod tmux_cc;
69#[cfg(feature = "widgets")]
70pub mod widgets;
71
72pub use error::{Context, Error, Result};