2018-11-29 02:42:05 +11:00
|
|
|
//! Ever got disappointed when a terminal library for rust was only written for UNIX systems?
|
|
|
|
//! Crossterm provides the same core functionalities for both Windows and UNIX systems.
|
|
|
|
//!
|
2018-03-11 03:33:06 +11:00
|
|
|
//! Crossterm aims to be simple and easy to call in code.
|
2018-11-29 02:42:05 +11:00
|
|
|
//! Through the simplicity of Crossterm, you do not have to worry about the platform you are working with.
|
|
|
|
//!
|
|
|
|
//! This crate supports all UNIX and Windows terminals down to windows 7 (not all terminals are tested see [Tested Terminals] in the README.
|
2018-03-11 03:33:06 +11:00
|
|
|
|
2019-01-01 05:55:48 +11:00
|
|
|
#[cfg(unix)]
|
|
|
|
extern crate libc;
|
|
|
|
#[cfg(unix)]
|
|
|
|
extern crate termios;
|
|
|
|
|
|
|
|
#[cfg(windows)]
|
|
|
|
extern crate winapi;
|
|
|
|
#[cfg(windows)]
|
|
|
|
extern crate crossterm_winapi;
|
|
|
|
|
2018-01-04 00:43:54 +11:00
|
|
|
#[macro_use]
|
2018-08-15 07:02:25 +10:00
|
|
|
mod common;
|
2018-01-04 00:43:54 +11:00
|
|
|
|
2018-07-29 03:26:35 +10:00
|
|
|
mod kernel;
|
|
|
|
mod modules;
|
2018-07-28 18:09:09 +10:00
|
|
|
|
2018-07-29 03:26:35 +10:00
|
|
|
pub use modules::cursor;
|
2018-07-31 05:35:35 +10:00
|
|
|
pub use modules::input;
|
2018-08-20 07:14:45 +10:00
|
|
|
pub use modules::output;
|
2018-07-31 05:35:35 +10:00
|
|
|
pub use modules::style;
|
2018-12-29 00:58:09 +11:00
|
|
|
pub use modules::terminal;
|
2018-06-14 05:02:09 +10:00
|
|
|
|
2018-11-29 02:42:05 +11:00
|
|
|
pub use self::cursor::{cursor, TerminalCursor};
|
2018-12-29 00:58:09 +11:00
|
|
|
pub use self::input::{input, AsyncReader, KeyEvent, TerminalInput};
|
2018-11-29 02:42:05 +11:00
|
|
|
pub use self::output::TerminalOutput;
|
2018-12-29 00:58:09 +11:00
|
|
|
pub use self::style::{
|
|
|
|
color, style, Attribute, Color, ColorType, DisplayableObject, ObjectStyle, StyledObject,
|
|
|
|
TerminalColor,
|
|
|
|
};
|
|
|
|
pub use self::terminal::{terminal, Terminal};
|
2018-11-22 03:48:22 +11:00
|
|
|
pub use common::screen::{AlternateScreen, Screen};
|
|
|
|
pub use common::Crossterm;
|