pub struct Color { /* private fields */ }Expand description
Color subsystem. It can be accessed via Curses::color.
Implementations§
Source§impl Color
impl Color
Sourcepub fn max_colors(&self) -> i32
pub fn max_colors(&self) -> i32
The maximum number of colors supported.
This corresponds to COLORS.
Sourcepub fn color_pair<T: Into<Chtype>>(&self, n: T) -> Chtype
pub fn color_pair<T: Into<Chtype>>(&self, n: T) -> Chtype
Get the nth color pair.
This corresponds to COLOR_PAIR.
Sourcepub fn color_pairs(&self) -> i32
pub fn color_pairs(&self) -> i32
Get the number of color pairs.
This corresponds to COLOR_PAIRS.
Sourcepub fn color_content(&self, color: i16) -> ColorContent
pub fn color_content(&self, color: i16) -> ColorContent
Get the ColorContent of a certain color.
Sourcepub fn can_change_color(&self) -> bool
pub fn can_change_color(&self) -> bool
Is it possible to change colors?
Sourcepub fn use_default_colors(&mut self) -> Result<(), ()>
pub fn use_default_colors(&mut self) -> Result<(), ()>
Tell the curses instance to use default colors.
Sourcepub fn set_color(
&mut self,
color: i16,
color_content: ColorContent,
) -> Result<(), ()>
pub fn set_color( &mut self, color: i16, color_content: ColorContent, ) -> Result<(), ()>
Set the nth color to a certain ColorContent.
This corresponds to init_color.
Auto Trait Implementations§
impl Freeze for Color
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnsafeUnpin for Color
impl UnwindSafe for Color
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more