2016-07-02 14:42:18 +01:00
|
|
|
//! Termion is a pure Rust, bindless library for low-level handling, manipulating
|
|
|
|
//! and reading information about terminals. This provides a full-featured
|
|
|
|
//! alternative to Termbox.
|
2016-03-09 08:39:22 +00:00
|
|
|
//!
|
2016-07-02 14:42:18 +01:00
|
|
|
//! Termion aims to be simple and yet expressive. It is bindless, meaning that it
|
|
|
|
//! is not a front-end to some other library (e.g., ncurses or termbox), but a
|
|
|
|
//! standalone library directly talking to the TTY.
|
|
|
|
//!
|
|
|
|
//! Supports Redox, Mac OS X, and Linux (or, in general, ANSI terminals).
|
|
|
|
//!
|
|
|
|
//! For more information refer to the [README](https://github.com/ticki/termion).
|
2016-03-09 08:39:22 +00:00
|
|
|
#![warn(missing_docs)]
|
|
|
|
|
2016-04-02 22:06:10 +01:00
|
|
|
#![cfg_attr(feature = "nightly", feature(io))]
|
|
|
|
|
2016-03-07 16:39:25 +00:00
|
|
|
|
2016-03-07 21:19:35 +00:00
|
|
|
#[cfg(not(target_os = "redox"))]
|
2016-03-06 13:54:26 +00:00
|
|
|
extern crate libc;
|
|
|
|
|
2016-03-07 21:19:35 +00:00
|
|
|
#[cfg(not(target_os = "redox"))]
|
2016-03-07 15:01:20 +00:00
|
|
|
mod termios;
|
2016-03-06 13:54:26 +00:00
|
|
|
|
2016-03-07 15:01:20 +00:00
|
|
|
mod control;
|
2016-03-08 20:40:48 +00:00
|
|
|
pub use control::TermWrite;
|
2016-03-08 20:39:24 +00:00
|
|
|
|
2016-03-15 19:32:25 +00:00
|
|
|
mod async;
|
|
|
|
pub use async::{AsyncReader, async_stdin};
|
|
|
|
|
2016-03-08 20:39:24 +00:00
|
|
|
mod input;
|
2016-03-09 08:39:22 +00:00
|
|
|
pub use input::{TermRead, Key};
|
|
|
|
#[cfg(feature = "nightly")]
|
|
|
|
pub use input::Keys;
|
2016-03-06 13:54:26 +00:00
|
|
|
|
2016-03-07 15:01:20 +00:00
|
|
|
mod raw;
|
2016-03-10 15:24:41 +00:00
|
|
|
pub use raw::{IntoRawMode, RawTerminal};
|
2016-03-06 13:54:26 +00:00
|
|
|
|
2016-03-07 15:01:20 +00:00
|
|
|
mod size;
|
2016-03-08 09:08:50 +00:00
|
|
|
pub use size::terminal_size;
|
2016-03-07 16:39:25 +00:00
|
|
|
|
2016-07-02 14:06:47 +01:00
|
|
|
/// ANSI colors.
|
|
|
|
pub mod color;
|
|
|
|
|
|
|
|
/// Deprecated reexport.
|
|
|
|
#[deprecated]
|
|
|
|
pub use color::Palette as Color;
|
2016-03-07 16:57:17 +00:00
|
|
|
|
2016-03-08 17:38:07 +00:00
|
|
|
mod style;
|
|
|
|
pub use style::Style;
|