umbra/
lib.rs

1//! # Umbra TUI Framework
2//! > *A simple yet highly configurable framework to generate flexible and fast TUIs*
3//!
4//! ## Example
5//!
6//! ```rust,no_run
7//! use umbra::{IEvent, Umbra};
8//!
9//! // NOTE: Umbra assumes that it will be responsible for
10//! // setting up the screen and raw mode
11//! let mut umbra: Umbra = Umbra::new().expect("Umbra error: {0}");
12//! umbra.init().expect("Panic... umbra initialization failed");
13//!
14//! loop {
15//!     match umbra.read_event().unwrap() {
16//!         IEvent::Key(key) => print!("Key {:?}", key),
17//!         IEvent::Paste(s) => print!("Paste {0}", s),
18//!         IEvent::FocusGained => print!("Window gained focus"),
19//!         IEvent::FocusLost => print!("Window lost focus"),
20//!     }
21//!     umbra.refresh();
22//! }
23//!
24//! ```
25mod umbra;
26pub use umbra::{UResult, Umbra};
27
28mod terminal;
29pub use terminal::IEvent;