#[repr(C)]pub struct PrintConsole {Show 18 fields
pub font: ConsoleFont,
pub frameBuffer: *mut u16_,
pub cursorX: c_int,
pub cursorY: c_int,
pub prevCursorX: c_int,
pub prevCursorY: c_int,
pub consoleWidth: c_int,
pub consoleHeight: c_int,
pub windowX: c_int,
pub windowY: c_int,
pub windowWidth: c_int,
pub windowHeight: c_int,
pub tabSize: c_int,
pub fg: u16_,
pub bg: u16_,
pub flags: c_int,
pub PrintChar: ConsolePrint,
pub consoleInitialised: bool,
}Expand description
Console structure used to store the state of a console render context.
Default values from consoleGetDefault(); PrintConsole defaultConsole = { //Font: { (u8*)default_font_bin, //font gfx 0, //first ascii character in the set 128, //number of characters in the font set }, 0,0, //cursorX cursorY 0,0, //prevcursorX prevcursorY 40, //console width 30, //console height 0, //window x 0, //window y 32, //window width 24, //window height 3, //tab size 0, //font character offset 0, //print callback false //console initialized };
Fields§
§font: ConsoleFont< Font of the console
frameBuffer: *mut u16_< Framebuffer address
cursorX: c_int< Current X location of the cursor (as a tile offset by default)
cursorY: c_int< Current Y location of the cursor (as a tile offset by default)
prevCursorX: c_int< Internal state
prevCursorY: c_int< Internal state
consoleWidth: c_int< Width of the console hardware layer in characters
consoleHeight: c_int< Height of the console hardware layer in characters
windowX: c_int< Window X location in characters (not implemented)
windowY: c_int< Window Y location in characters (not implemented)
windowWidth: c_int< Window width in characters (not implemented)
windowHeight: c_int< Window height in characters (not implemented)
tabSize: c_int< Size of a tab
fg: u16_< Foreground color
bg: u16_< Background color
flags: c_int< Reverse/bright flags
PrintChar: ConsolePrint< Callback for printing a character. Should return true if it has handled rendering the graphics (else the print engine will attempt to render via tiles).
consoleInitialised: bool< True if the console is initialized
Trait Implementations§
Source§impl Clone for PrintConsole
impl Clone for PrintConsole
Source§fn clone(&self) -> PrintConsole
fn clone(&self) -> PrintConsole
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PrintConsole
impl Debug for PrintConsole
Source§impl Default for PrintConsole
impl Default for PrintConsole
impl Copy for PrintConsole
Auto Trait Implementations§
impl Freeze for PrintConsole
impl RefUnwindSafe for PrintConsole
impl !Send for PrintConsole
impl !Sync for PrintConsole
impl Unpin for PrintConsole
impl UnwindSafe for PrintConsole
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)