Struct vga::writers::Text80x25 [−][src]
pub struct Text80x25;
Expand description
A basic interface for interacting with vga text mode 80x25
Examples
Basic usage:
use vga::colors::{Color16, TextModeColor}; use vga::writers::{ScreenCharacter, TextWriter, Text80x25}; let text_mode = Text80x25::new(); let color = TextModeColor::new(Color16::Yellow, Color16::Black); let screen_character = ScreenCharacter::new(b'T', color); text_mode.set_mode(); text_mode.clear_screen(); text_mode.write_character(0, 0, screen_character);
Implementations
Trait Implementations
impl TextWriter for Text80x25
[src]
impl TextWriter for Text80x25
[src]fn set_mode(&self)
[src]
fn set_mode(&self)
[src]Sets the graphics device to a video mode as determined by
the TextWriter
implementation. Read more
fn get_frame_buffer(&self) -> (SpinlockGuard<'_, Vga>, *mut ScreenCharacter)
[src]
fn get_frame_buffer(&self) -> (SpinlockGuard<'_, Vga>, *mut ScreenCharacter)
[src]Returns the start of the FrameBuffer
as *mut ScreenCharacter
as well as a lock to the vga driver. This ensures the vga
driver stays locked while the frame buffer is in use. Read more
fn clear_screen(&self)
[src]
fn clear_screen(&self)
[src]Clears the screen by setting all cells to b' '
with
a background color of Color16::Black
and a foreground
color of Color16::Yellow
. Read more
fn fill_screen(&self, character: ScreenCharacter)
[src]
fn fill_screen(&self, character: ScreenCharacter)
[src]Fills the screen by setting all cells to the given screen character.
fn disable_cursor(&self)
[src]
fn disable_cursor(&self)
[src]Disables the cursor in vga text modes.
fn enable_cursor(&self)
[src]
fn enable_cursor(&self)
[src]Enables the cursor in vga text modes.
fn read_character(&self, x: usize, y: usize) -> ScreenCharacter
[src]
fn read_character(&self, x: usize, y: usize) -> ScreenCharacter
[src]Returns the ScreenCharacter
at the given (x, y)
position.
fn set_cursor(&self, scan_line_start: u8, scan_line_end: u8)
[src]
fn set_cursor(&self, scan_line_start: u8, scan_line_end: u8)
[src]Sets the size of the cursor, as specified by scan_line_start
and scan_line_end
. Read more
fn set_cursor_position(&self, x: usize, y: usize)
[src]
fn set_cursor_position(&self, x: usize, y: usize)
[src]Sets the current text cursor to the position specified by
x
and y
. Read more
fn write_character(&self, x: usize, y: usize, screen_character: ScreenCharacter)
[src]
fn write_character(&self, x: usize, y: usize, screen_character: ScreenCharacter)
[src]Prints the given character
and color
at (x, y)
.