Skip to main content

retroglyph/
lib.rs

1//! rg: a 2D pseudographic terminal library.
2//!
3//! rg provides a grid of character cells with styled output, input handling,
4//! and double-buffered presentation via pluggable backends.
5#![cfg_attr(not(feature = "std"), no_std)]
6extern crate alloc;
7
8/// Pluggable rendering backends.
9pub mod backend;
10pub mod color;
11pub mod event;
12pub mod grid;
13#[cfg(feature = "egc")]
14pub mod layout;
15pub mod style;
16pub mod terminal;
17pub mod text;
18/// The atomic drawable unit (glyph, style, sub-cell offsets).
19pub mod tile;
20
21#[cfg(feature = "crossterm")]
22pub use backend::Crossterm;
23#[cfg(feature = "software")]
24pub use backend::software::SoftwareBackend;
25#[cfg(feature = "software-tilesets")]
26pub use backend::software::tileset::{Codepage, TilesetBuilder, TilesetError, TilesetOptions};
27pub use backend::{Backend, Headless};
28pub use color::{AnsiColor, Color, InvalidAnsiIndex};
29pub use event::{Event, KeyCode, KeyEvent, KeyModifiers, MouseButton, MouseEvent, MouseEventKind};
30pub use grid::{Grid, Pos, Rect, Size};
31#[cfg(feature = "egc")]
32pub use layout::{HAlign, TextLayout, TextMetrics, VAlign};
33pub use style::{CellModifier, Style};
34pub use terminal::Terminal;
35pub use text::{Line, Span};
36pub use tile::Tile;