2018-01-28 04:26:08 +11:00
|
|
|
//! This bin folder can be used to try the examples out located in the examples directory.
|
|
|
|
//!
|
|
|
|
//! All you need to do is:
|
2018-07-02 06:43:43 +10:00
|
|
|
//!
|
2018-01-28 04:26:08 +11:00
|
|
|
//! - 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`
|
|
|
|
|
2018-01-04 00:43:54 +11:00
|
|
|
extern crate crossterm;
|
2018-01-10 06:36:48 +11:00
|
|
|
|
2018-06-17 04:10:51 +10:00
|
|
|
mod color;
|
2018-07-02 06:43:43 +10:00
|
|
|
mod cursor;
|
2018-07-02 06:40:07 +10:00
|
|
|
mod program_examples;
|
2018-07-02 06:43:43 +10:00
|
|
|
mod terminal;
|
2018-06-14 05:02:09 +10:00
|
|
|
|
2018-07-02 06:40:07 +10:00
|
|
|
fn main() {
|
|
|
|
use crossterm::Context;
|
2018-06-14 05:02:09 +10:00
|
|
|
|
2018-07-02 06:40:07 +10:00
|
|
|
{
|
|
|
|
let mut context = Context::new();
|
2018-06-27 04:21:47 +10:00
|
|
|
|
2018-07-02 06:40:07 +10:00
|
|
|
terminal::alternate_screen::print_wait_screen_on_alternate_window(context.clone());
|
2018-06-24 03:48:22 +10:00
|
|
|
|
2018-07-02 06:40:07 +10:00
|
|
|
println!("count: {}", std::rc::Rc::strong_count(&context));
|
|
|
|
}
|
2018-07-02 06:43:43 +10:00
|
|
|
}
|