Struct pancurses_result::Color
source · pub struct Color { /* private fields */ }
Expand description
Color subsystem. It can be accessed via Curses::color
.
Implementations
sourceimpl 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 n
th 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 RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more