summaryrefslogtreecommitdiffstats
path: root/wincolor/src/lib.rs
blob: d5a98f933ef0349d955ae9a6d892f335d8b61d1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*!
This crate provides a safe and simple Windows specific API to control
text attributes in the Windows console. Text attributes are limited to
foreground/background colors, as well as whether to make colors intense or not.

Note that on non-Windows platforms, this crate is empty but will compile.

# Example

```no_run
use wincolor::{Console, Color, Intense};

let mut con = Console::stdout().unwrap();
con.fg(Intense::Yes, Color::Cyan).unwrap();
println!("This text will be intense cyan.");
con.reset().unwrap();
println!("This text will be normal.");
```
*/
#[cfg(windows)]
extern crate kernel32;
#[cfg(windows)]
extern crate winapi;

#[cfg(windows)]
pub use win::*;

#[cfg(windows)]
mod win;