1 unstable release
| 0.1.0 | Aug 27, 2022 |
|---|
#14 in #tui-framework
19KB
263 lines
Umbra TUI Framework
a simple yet highly configurable framework to generate flexible and fast TUIs
lib.rs:
Umbra TUI Framework
A simple yet highly configurable framework to generate flexible and fast TUIs
Example
use umbra::{IEvent, Umbra};
// NOTE: Umbra assumes that it will be responsible for
// setting up the screen and raw mode
let mut umbra: Umbra = Umbra::new().expect("Umbra error: {0}");
umbra.init().expect("Panic... umbra initialization failed");
loop {
match umbra.read_event().unwrap() {
IEvent::Key(key) => print!("Key {:?}", key),
IEvent::Paste(s) => print!("Paste {0}", s),
IEvent::FocusGained => print!("Window gained focus"),
IEvent::FocusLost => print!("Window lost focus"),
}
umbra.refresh();
}
Dependencies
~2–13MB
~97K SLoC