tattoy_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
43pub mod caps;
44pub use wezterm_cell as cell;
45pub use wezterm_cell::color;
46pub use wezterm_surface::cellcluster;
47pub mod error;
48#[cfg(feature = "use_image")]
49pub use wezterm_cell::image;
50pub use wezterm_surface::hyperlink;
51pub mod input;
52pub mod istty;
53pub mod keymap;
54pub mod lineedit;
55mod macros;
56pub use wezterm_char_props::nerdfonts;
57mod readbuf;
58pub mod render;
59pub use wezterm_surface as surface;
60pub mod terminal;
61#[cfg(feature = "tmux_cc")]
62pub use wezterm_escape_parser::tmux_cc;
63#[cfg(feature = "widgets")]
64pub mod widgets;
65
66pub use error::{Context, Error, Result};
67
68pub use wezterm_escape_parser as escape;