Struct ctru_sys::PrintConsole

source ·
#[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

source§

fn clone(&self) -> PrintConsole

Returns a copy of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PrintConsole

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for PrintConsole

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Copy for PrintConsole

Auto Trait Implementations§

§

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 T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.