Functions | |
void | nio_drawstr (int offset_x, int offset_y, int x, int y, char *str, char bgColor, char textColor) |
void | nio_drawch (int offset_x, int offset_y, int x, int y, char ch, char bgColor, char textColor) |
void | nio_load (char *path, nio_console *c) |
void | nio_save (char *path, nio_console *c) |
char | nio_getch (void) |
void | nio_InitConsole (nio_console *c, int size_x, int size_y, int offset_x, int offset_y, char background_color, char foreground_color) |
void | nio_DrawConsole (nio_console *c) |
void | nio_Clear (nio_console *c) |
void | nio_ScrollDown (nio_console *c) |
void | nio_DrawChar (nio_console *c, int pos_x, int pos_y) |
void | nio_SetChar (nio_console *c, char ch, int pos_x, int pos_y) |
void | nio_PrintChar (nio_console *c, char ch) |
void | nio_PrintStr (nio_console *c, char *str) |
void | nio_printf (nio_console *c, char *format,...) |
void | nio_SetColor (nio_console *c, char background_color, char foreground_color) |
void | nio_EnableDrawing (nio_console *c, BOOL enable_drawing) |
char | nio_GetChar (nio_console *c) |
int | nio_GetStr (nio_console *c, char *str) |
void | nio_CleanUp (nio_console *c) |
Variables | |
BOOL | shift = FALSE |
BOOL | caps = FALSE |
BOOL | ctrl = FALSE |
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details at http://www.gnu.org/copyleft/gpl.html
Console functions
void nio_CleanUp | ( | nio_console * | c | ) |
Frees the allocated memory.
c | Console |
void nio_Clear | ( | nio_console * | c | ) |
Clears a console.
c | Console |
void nio_drawch | ( | int | offset_x, |
int | offset_y, | ||
int | x, | ||
int | y, | ||
char | ch, | ||
char | bgColor, | ||
char | textColor | ||
) |
Draws a char to the screen
offset_x | x offset (pixel) |
offset_y | y offset (pixel) |
x | Column |
y | Row |
ch | String |
bgColor | Background color |
textColor | Text color |
void nio_DrawChar | ( | nio_console * | c, |
int | pos_x, | ||
int | pos_y | ||
) |
Draws a char from a console to the screen at the given position; It is not saved.
c | Console |
pos_x | Column |
pos_y | Row |
void nio_DrawConsole | ( | nio_console * | c | ) |
Draws a console to the screen.
c | Console |
void nio_drawstr | ( | int | offset_x, |
int | offset_y, | ||
int | x, | ||
int | y, | ||
char * | str, | ||
char | bgColor, | ||
char | textColor | ||
) |
Draws a string to the screen
offset_x | x offset (pixel) |
offset_y | y offset (pixel) |
x | Column |
y | Row |
str | String |
bgColor | Background color |
textColor | Text color |
void nio_EnableDrawing | ( | nio_console * | c, |
BOOL | drawing_enabled | ||
) |
Enables immediate drawing when a character is written to the console.
c | Console |
drawing_enabled | When this is true, a char will be immediately drawn to the screen, false: The console will not refresh if you write data to it |
char nio_getch | ( | void | ) |
Reads a char from the keyboard
char nio_GetChar | ( | nio_console * | c | ) |
Reads a char and prints it to the console.
c | Console |
int nio_GetStr | ( | nio_console * | c, |
char * | str | ||
) |
Reads a string and prints it to the console.
c | Console |
str | String destination |
void nio_InitConsole | ( | nio_console * | c, |
int | size_x, | ||
int | size_y, | ||
int | offset_x, | ||
int | offset_y, | ||
char | background_color, | ||
char | foreground_color | ||
) |
Initializes a console.
c | Console |
size_x | Number of columns |
size_y | Number of rows |
offset_x | x offset (pixel) |
offset_y | y offset (pixel) |
background_color | Default background color |
foreground_color | Default foreground color |
void nio_load | ( | char * | path, |
nio_console * | c | ||
) |
Loads a console to flash storage.
path | File path |
c | Console |
void nio_PrintChar | ( | nio_console * | c, |
char | ch | ||
) |
Prints a char in a console.
c | Console |
ch | Char |
void nio_printf | ( | nio_console * | c, |
char * | format, | ||
... | |||
) |
Prints a formatted string to a console.
c | Console |
format | Format string |
... | Additional arguments |
void nio_PrintStr | ( | nio_console * | c, |
char * | str | ||
) |
Prints a string in a console.
c | Console |
str | String |
void nio_save | ( | char * | path, |
nio_console * | c | ||
) |
Saves a console to flash storage.
path | File path |
c | Console |
void nio_ScrollDown | ( | nio_console * | c | ) |
Scrolls the console one line down.
c | Console |
void nio_SetChar | ( | nio_console * | c, |
char | ch, | ||
int | pos_x, | ||
int | pos_y | ||
) |
Saves a char in a console at the given position; It is not drawn.
c | Console |
ch | char to be stored |
pos_x | Column |
pos_y | Row |
void nio_SetColor | ( | nio_console * | c, |
char | background_color, | ||
char | foreground_color | ||
) |
Sets the Foreground/Background color.
c | Console |
background_color | Background color |
foreground_color | Foreground color |