pub struct ColorPair { /* private fields */ }Expand description
A color pair comprising of a foreground and background color.
Implementations§
Source§impl ColorPair
impl ColorPair
pub fn new(pair: i16, colors: Colors) -> Result<ColorPair, NCurseswError>
pub fn new_sp( screen: *mut screen, pair: i16, colors: Colors, ) -> Result<ColorPair, NCurseswError>
Sourcepub unsafe fn set_screen(&mut self, screen: Option<*mut screen>)
pub unsafe fn set_screen(&mut self, screen: Option<*mut screen>)
§Safety
Set the screen of the ColorPair.
Use with caution!!! This function only need’s to be used if using the screen type
functions and is provided to allow the alignment of the screen pointer with the
screen that the ColorPair are for as this crate will apply a screen of None
by default when retriving Attributes from functions such as attr_get() and
wattr_get().
Trait Implementations§
Source§impl BitOr<ColorPair> for Attribute
Implement the | operator for combining a ColorPair and an Attribute to produce Attributes
impl BitOr<ColorPair> for Attribute
Implement the | operator for combining a ColorPair and an Attribute to produce Attributes
Source§impl BitOr<ColorPair> for Attributes
Implement the | operator for setting a ColorPair on a Attributes.
impl BitOr<ColorPair> for Attributes
Implement the | operator for setting a ColorPair on a Attributes.
Note: as only one color pair can be applied to attributes at any one time any previously Or’d color_pair will be Xor’d out of the attributes before Or’ing the new color pair.
Source§impl BitXor<ColorPair> for Attributes
Implement the ^ operator for removing a ColorPair on a Attributes.
impl BitXor<ColorPair> for Attributes
Implement the ^ operator for removing a ColorPair on a Attributes.