//! This crate contains bindings to the C library [termio][1]. Most functions //! wrapped are methods on the `Screen` or `Keyboard` structs, while others take //! one of these structs as an argument. This organisation ensures that e.g. the //! screen can only be redrawn while the double-buffered screen is actually //! active, and that keys can only be read from the input while the input stream //! is actually in raw mode. //! //! The `widgets` submodule contains the built-in widget modules in termio. //! //! All callbacks are `extern "C"` functions, and thus do not accept generic //! `Fn` instances. This is due to a limitation of the original termio API. //! //! In this crate, terminal screen positions and sizes are represented using a //! tuple `(x, y): (u32, u32)`. Positions are zero-based. //! //! The `KEY_` constants describe the return values from `Keyboard::get_key()`. //! To create key combinations, e.g. ctrl-A, use addition, e.g. `KEY_CTRL + //! 'A'`. //! //! **Please be aware that to get anything on the screen, you need to call //! `redraw()`.** //! //! [1]: https://github.com/tomsmeding/termio mod bindings; mod util; mod core; pub mod widgets; pub use crate::core::*;