Function ncursesw::PAIR_NUMBER [−][src]
pub fn PAIR_NUMBER(attrs: Attributes) -> ColorPair
Expand description
Return the color pair from given normal
attributes value.
Example
extern crate ncursesw;
use ncursesw::*;
use ncursesw::normal::*;
start_color()?;
let yellow = Color::from_str("yellow")?;
let blue = Color::from_str("blue")?;
let color_pair1 = ColorPair::new(1, Colors::new(yellow, blue))?;
let attrs = Attribute::Bold | color_pair1;
assert!(PAIR_NUMBER(attrs) == color_pair1);