minicrossterm/src/lib.rs

39 lines
1.2 KiB
Rust
Raw Normal View History

//! 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.
//!
//! 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.
//!
//! This crate supports all UNIX and Windows terminals down to windows 7 (not all terminals are tested see [Tested Terminals] in the README.
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
mod kernel;
mod modules;
2018-07-28 18:09:09 +10:00
pub use modules::cursor;
pub use modules::input;
2018-08-20 07:14:45 +10:00
pub use modules::output;
pub use modules::style;
pub use modules::terminal;
pub use self::cursor::{cursor, TerminalCursor};
pub use self::input::{input, AsyncReader, KeyEvent, TerminalInput};
pub use self::output::TerminalOutput;
pub use self::style::{
color, style, Attribute, Color, ColorType, DisplayableObject, ObjectStyle, StyledObject,
TerminalColor,
};
pub use self::terminal::{terminal, Terminal};
pub use common::screen::{AlternateScreen, Screen};
pub use common::Crossterm;
2018-08-15 07:02:25 +10:00
#[cfg(unix)]
2018-03-04 01:40:51 +11:00
extern crate libc;
#[cfg(unix)]
2018-07-02 06:43:43 +10:00
extern crate termios;
2018-03-04 01:40:51 +11:00
2018-07-02 06:43:43 +10:00
#[cfg(windows)]
2018-07-15 07:02:02 +10:00
extern crate winapi;