pub struct Screen {
con_out: *mut SimpleTextOutputProtocol,
width: usize,
height: usize,
pub mask: Vec<Vec<bool>>,
}Fields§
§con_out: *mut SimpleTextOutputProtocol§width: usize§height: usize§mask: Vec<Vec<bool>>Implementations§
Source§impl Screen
impl Screen
pub fn new(con_out: *mut SimpleTextOutputProtocol) -> Self
fn get_screen_size(con_out: *mut SimpleTextOutputProtocol) -> (usize, usize)
pub fn width(&self) -> usize
pub fn height(&self) -> usize
pub fn center_x(&self, content_width: usize) -> usize
pub fn center_y(&self, content_height: usize) -> usize
pub fn center_xy( &self, content_width: usize, content_height: usize, ) -> (usize, usize)
pub fn clear(&mut self)
pub fn set_color(&mut self, fg: usize, bg: usize)
pub fn set_cursor(&mut self, x: usize, y: usize)
pub fn put_char(&mut self, ch: char)
pub fn put_str(&mut self, s: &str)
pub fn put_char_at( &mut self, x: usize, y: usize, ch: char, fg: usize, bg: usize, )
pub fn put_str_at(&mut self, x: usize, y: usize, s: &str, fg: usize, bg: usize)
pub fn draw_block(&mut self, lines: &[&str])
pub fn draw_block_colored(&mut self, lines: &[&str], fg: usize, bg: usize)
pub fn draw_centered_block( &mut self, lines: &[&str], width: usize, start_y: usize, fg: usize, bg: usize, )
Sourcepub fn set_colors(&mut self, fg: usize, bg: usize)
pub fn set_colors(&mut self, fg: usize, bg: usize)
Alias for set_color
Sourcepub fn print_char(&mut self, ch: char)
pub fn print_char(&mut self, ch: char)
Alias for put_char
Auto Trait Implementations§
impl Freeze for Screen
impl RefUnwindSafe for Screen
impl !Send for Screen
impl !Sync for Screen
impl Unpin for Screen
impl UnwindSafe for Screen
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