2019-10-02 17:37:49 +10:00
|
|
|
//! # Crossterm
|
|
|
|
//!
|
2019-07-25 04:10:27 +10:00
|
|
|
//! Have you ever been disappointed when a terminal library for rust was only written for UNIX systems?
|
2019-10-02 17:37:49 +10:00
|
|
|
//! Crossterm provides clearing, input handling, styling, cursor movement, and terminal actions for both
|
|
|
|
//! Windows and UNIX systems.
|
|
|
|
//!
|
|
|
|
//! Crossterm aims to be simple and easy to call in code. Through the simplicity of Crossterm, you do not
|
|
|
|
//! have to worry about the platform you are working with.
|
2019-07-25 04:10:27 +10:00
|
|
|
//!
|
2019-10-02 17:37:49 +10:00
|
|
|
//! This crate supports all UNIX and Windows terminals down to Windows 7 (not all terminals are tested
|
|
|
|
//! see [Tested Terminals](https://github.com/crossterm-rs/crossterm/tree/zrzka/docs-update#tested-terminals)
|
|
|
|
//! for more info).
|
2019-07-25 04:10:27 +10:00
|
|
|
//!
|
2019-10-02 17:37:49 +10:00
|
|
|
//! ## Important
|
2019-07-25 04:10:27 +10:00
|
|
|
//!
|
2019-10-02 17:37:49 +10:00
|
|
|
//! This crate re-exports all other `crossterm_*` crates types only. Please, consult the
|
|
|
|
//! `crossterm` crate repository [README](https://github.com/crossterm-rs/crossterm/blob/master/README.md) to
|
|
|
|
//! learn how to use features to enable/disable functionality, what's planned, etc. There will be
|
|
|
|
//! new code organization, breaking API changes, etc.
|
2019-07-25 04:10:27 +10:00
|
|
|
|
2019-01-28 07:16:14 +11:00
|
|
|
#[cfg(feature = "cursor")]
|
2019-09-16 21:34:08 +10:00
|
|
|
pub use crossterm_cursor::{
|
2019-07-25 04:10:27 +10:00
|
|
|
cursor, BlinkOff, BlinkOn, Down, Goto, Hide, Left, ResetPos, Right, SavePos, Show,
|
|
|
|
TerminalCursor, Up,
|
|
|
|
};
|
2019-01-28 07:16:14 +11:00
|
|
|
#[cfg(feature = "input")]
|
2019-09-16 21:34:08 +10:00
|
|
|
pub use crossterm_input::{
|
2019-04-05 03:45:47 +11:00
|
|
|
input, AsyncReader, InputEvent, KeyEvent, MouseButton, MouseEvent, SyncReader, TerminalInput,
|
|
|
|
};
|
2019-01-28 07:16:14 +11:00
|
|
|
#[cfg(feature = "screen")]
|
2019-09-16 21:34:08 +10:00
|
|
|
pub use crossterm_screen::{AlternateScreen, IntoRawMode, RawScreen};
|
2019-01-28 07:16:14 +11:00
|
|
|
#[cfg(feature = "style")]
|
2019-09-16 21:34:08 +10:00
|
|
|
pub use crossterm_style::{
|
2019-10-16 05:45:47 +11:00
|
|
|
color, style, Attribute, Color, Colored, Colorize, ObjectStyle, PrintStyledFont, ResetColor,
|
|
|
|
SetAttr, SetBg, SetFg, StyledObject, Styler, TerminalColor,
|
2018-12-29 00:58:09 +11:00
|
|
|
};
|
2019-01-28 07:16:14 +11:00
|
|
|
#[cfg(feature = "terminal")]
|
2019-09-16 21:34:08 +10:00
|
|
|
pub use crossterm_terminal::{terminal, Clear, ClearType, ScrollDown, ScrollUp, SetSize, Terminal};
|
|
|
|
pub use crossterm_utils::{
|
|
|
|
execute, queue, Command, ErrorKind, ExecutableCommand, Output, QueueableCommand, Result,
|
2019-07-25 04:10:27 +10:00
|
|
|
};
|
2019-01-28 07:16:14 +11:00
|
|
|
|
|
|
|
pub use self::crossterm::Crossterm;
|
2019-09-16 21:34:08 +10:00
|
|
|
|
|
|
|
mod crossterm;
|