PrintConsole Struct Reference

Console structure used to store the state of a console render context. More...

`#include <console.h>`

## Data Fields

ConsoleFont | font
| Font of the console.
u16 * | frameBuffer
| Framebuffer address.
int | cursorX
| Current X location of the cursor (as a tile offset by default)
int | cursorY
| Current Y location of the cursor (as a tile offset by default)
int | prevCursorX
| Internal state.
int | prevCursorY
| Internal state.
int | consoleWidth
| Width of the console hardware layer in characters.
int | consoleHeight
| Height of the console hardware layer in characters.
int | windowX
| Window X location in characters (not implemented)
int | windowY
| Window Y location in characters (not implemented)
int | windowWidth
| Window width in characters (not implemented)
int | windowHeight
| Window height in characters (not implemented)
int | tabSize
| Size of a tab.
u16 | fg
| Foreground color.
u16 | bg
| Background color.
int | flags
| Reverse/bright flags.
ConsolePrint | PrintChar
| 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).
bool | consoleInitialised
| True if the console is initialized.

## Detailed 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
};
PrintConsole
Console structure used to store the state of a console render context.
Definition: console.h:77
u8
uint8_t u8
would be nice if newlib had this already
Definition: types.h:21

Examples
  audio/filters/source/main.c, audio/streaming/source/main.c, graphics/printing/both-screen-text/source/main.c, and graphics/printing/multiple-windows-text/source/main.c.

The documentation for this struct was generated from the following file:

- include/3ds/console.h