2018-07-21 02:00:46 +10:00
|
|
|
//! This bin folder can be used to try the examples out located in the examples directory.
|
|
|
|
//!
|
|
|
|
//! All you need to do is:
|
|
|
|
//!
|
|
|
|
//! - Download the crossterm source code.
|
|
|
|
//! - Add this in the Cargo.toml file:
|
|
|
|
//! ``` [[bin]]
|
|
|
|
//! name = "example_bin"
|
|
|
|
//! path = "./examples/bin.rs"
|
|
|
|
//! ```
|
|
|
|
//!
|
|
|
|
//! - Run program with: `cargo run`
|
|
|
|
extern crate crossterm;
|
|
|
|
|
2018-07-28 02:37:31 +10:00
|
|
|
use crossterm::Terminal;
|
2018-07-21 02:00:46 +10:00
|
|
|
|
|
|
|
// mod terminal;
|
|
|
|
// mod color;
|
|
|
|
// mod cursor;
|
|
|
|
// mod crossterm_type;
|
2018-07-28 02:37:31 +10:00
|
|
|
// mod input;
|
2018-07-21 02:00:46 +10:00
|
|
|
|
2018-07-28 02:37:31 +10:00
|
|
|
//use input::keyboard::{async_input, input as stdin};
|
2018-07-21 21:11:31 +10:00
|
|
|
|
2018-07-22 22:55:14 +10:00
|
|
|
use std::{thread, time};
|
2018-07-21 21:11:31 +10:00
|
|
|
|
2018-07-22 22:55:14 +10:00
|
|
|
fn main() {
|
2018-07-21 21:11:31 +10:00
|
|
|
{
|
2018-07-28 02:37:31 +10:00
|
|
|
let mut terminal = Terminal::new();
|
|
|
|
terminal.enable_alternate_screen();
|
|
|
|
thread::sleep(time::Duration::from_millis(5000));
|
2018-07-21 21:11:31 +10:00
|
|
|
}
|
2018-07-25 02:06:17 +10:00
|
|
|
}
|