|
libnx v4.9.0
|
Framebuffer text console. More...
#include "../../types.h"Go to the source code of this file.
Data Structures | |
| struct | ConsoleRenderer |
| Renderer interface for the console. More... | |
| struct | ConsoleFont |
| A font struct for the console. More... | |
| struct | PrintConsole |
| Console structure used to store the state of a console render context. More... | |
Enumerations | |
| enum | debugDevice { debugDevice_NULL , debugDevice_SVC , debugDevice_CONSOLE } |
| Console debug devices supported by libnx. More... | |
Functions | |
| void | consoleSetFont (PrintConsole *console, ConsoleFont *font) |
| Loads the font into the console. | |
| void | consoleSetWindow (PrintConsole *console, int x, int y, int width, int height) |
| Sets the print window. | |
| PrintConsole * | consoleGetDefault (void) |
| Gets a pointer to the console with the default values. | |
| PrintConsole * | consoleSelect (PrintConsole *console) |
| Make the specified console the render target. | |
| PrintConsole * | consoleInit (PrintConsole *console) |
| Initialise the console. | |
| void | consoleExit (PrintConsole *console) |
| Deinitialise the console. | |
| void | consoleUpdate (PrintConsole *console) |
| Updates the console, submitting a new frame to the display. | |
| void | consoleDebugInit (debugDevice device) |
| Initializes debug console output on stderr to the specified device. | |
| void | consoleClear (void) |
| Clears the screan by using printf("\x1b[2J");. | |
Framebuffer text console.
Provides stdio integration for printing to the Switch screen as well as debug print functionality provided by stderr.
General usage is to initialize the console by:
optionally customizing the console usage by passing a pointer to a custom PrintConsole struct.
| enum debugDevice |
Console debug devices supported by libnx.
| void consoleDebugInit | ( | debugDevice | device | ) |
Initializes debug console output on stderr to the specified device.
| device | The debug device (or devices) to output debug print statements to. |
| void consoleExit | ( | PrintConsole * | console | ) |
Deinitialise the console.
| console | A pointer to the console data to initialize (if it's NULL, the default console will be used). |
| PrintConsole * consoleGetDefault | ( | void | ) |
Gets a pointer to the console with the default values.
This should only be used when using a single console or without changing the console that is returned, otherwise use consoleInit().
| PrintConsole * consoleInit | ( | PrintConsole * | console | ) |
Initialise the console.
| console | A pointer to the console data to initialize (if it's NULL, the default console will be used). |
| PrintConsole * consoleSelect | ( | PrintConsole * | console | ) |
Make the specified console the render target.
| console | A pointer to the console struct (must have been initialized with consoleInit(PrintConsole* console)). |
| void consoleSetFont | ( | PrintConsole * | console, |
| ConsoleFont * | font | ||
| ) |
Loads the font into the console.
| console | Pointer to the console to update, if NULL it will update the current console. |
| font | The font to load. |
| void consoleSetWindow | ( | PrintConsole * | console, |
| int | x, | ||
| int | y, | ||
| int | width, | ||
| int | height | ||
| ) |
Sets the print window.
| console | Console to set, if NULL it will set the current console window. |
| x | X location of the window. |
| y | Y location of the window. |
| width | Width of the window. |
| height | Height of the window. |
| void consoleUpdate | ( | PrintConsole * | console | ) |
Updates the console, submitting a new frame to the display.
| console | A pointer to the console data to initialize (if it's NULL, the default console will be used). |