35 #define NUMBER_DECIMALS_DIGITS 6
140 void printgr(
const char* text);
150 void Pause(
bool clear);
void underlined()
Toggles singled underlined text.
rgb buildRgb()
Builds a rgb struct.
void Pause(bool clear)
Waits for the user to press a key without waiting for 'Enter' to be pressed.
void cursorDown(int n)
Moves the cursor down by n rows.
void printgr(const char *text)
Prints a text with the graphic rendition specified with custom graphic rendition format specifiers.
void setColor(color color)
Sets both terminal's foreground color and background color, if specified.
void eraseInDisplay(int n)
Clears part of the screen.
void setForegroundColor(color color)
Sets the terminal's foreground color.
void setRGBBackgroundColor(rgb rgbColor)
Sets the RGB background color.
void deviceStatusReport(int *row, int *col)
Gets the cursor position.
void printGraphicRendition(char *text, graphicRendition rendition)
Prints a text with the graphic rendition specified with the struct. Standard C format specifiers are ...
void defaultBackgroundColor()
Resets the background color.
void eraseInLine(int n)
Erases part of the line.
void graphicReset()
Resets the graphic rendition.
void bold()
Toggles bold text.
ansiStandardColor buildAnsiStandardColor()
Builds a ANSI standard color struct.
ansiRgbColor buildAnsiRgbColor()
Builds a ANSI rgb color struct.
void defaultForegroundColor()
Resets the foreground color.
void cursorUp(int n)
Moves the cursor up by n rows.
void scrollDown(int n)
Scrolls the whole page down by n rows.
uint8_t underline
Defines the type underlined as unsigned integer 1 byte large.
void doublyUnderlined()
Toggles doubly underlined text.
void cursorHorizontalAbsolute(int n)
Moves the cursor to column n.
void cursorPosition(int n, int m)
Moves the cursor at n-th row and at the m-th column.
void screenSize(int *width, int *height)
It returns the width and the height of the screen. On unix-like platforms, in case of errors,...
char getChar()
Gets the char pressed on the keyboard without waiting for 'Enter' to be pressed.
void setRGBForegroundColor(rgb rgbColor)
Sets the RGB foreground color.
void clearScreen()
Clears the entire terminal's window's content.
graphicRendition buildGraphicRendition()
Builds a graphic rendition struct.
void cursorBack(int n)
Moves the cursor to the left by n columns.
void italic()
Toggles italic text.
void setBackgroundColor(color color)
Sets the terminal's background color.
void cursorPreviousLine(int n)
Moves the cursor at the beginning of the line n rows up.
void setStandardForegroundColor(ansiStandardColors foregroundColor)
Sets the ANSI standard foreground color.
void scrollUp(int n)
Scrolls the whole page up by n rows.
void setStandardBackgroundColor(ansiStandardColors backgroundColor)
Sets the ANSI standard background color.
void slowBlinking()
Toggles slow blinking.
color buildColor()
Builds a color struct.
void printfgr(char *text,...)
Prints text as printgr but handles standard C format specifiers %, d, i, u, x, X, f,...
uint8_t ansiStandardColors
Defines the type ansiStandardColors as unsigned integer 1 byte large.
void cursorNextLine(int n)
Moves the cursor at the beginning of the line n rows down.
void cursorForward(int n)
Moves the cursor to the right by n columns.
Defines a basic structure for RGB foreground color and background color for a piece of printable text...
rgb bgRgb
Background RGB color field.
rgb fgRgb
Foreground RGB color field.
Defines a basic structure for standard ANSI foreground color and background color for a piece of prin...
ansiStandardColors fgColor
Foreground ANSI standard color field.
ansiStandardColors bgColor
Background ANSI standard color field.
Defines a struct for representing a generic color.
__color color
Color field.
bool isRgbColor
Boolean flag for determining if the color field is an ansiRgbColor or an ansiStandardColor.
Defines a struct for graphic rendition including properties for bold, italic, underlined and colored ...
bool bold
Boolean flag to determine if the text has to be bold.
color color
The color for the text and the its background.
underline underlined
Flag to determine if the text has to be underlined, singly or doubly.
bool italic
Boolean flag to determine if the text has to be italic.
Defines a basic structure for RGB colors.
uint8_t g
Green component field.
uint8_t b
Blue component field.
uint8_t r
Red component field.
Defines a union between RGB colors and standard ANSI colors (should not be used externally)
ansiRgbColor rgbColor
RGB color field.
ansiStandardColor stdColor
ANSI standard color field.
Definition of utility functions.
Definition of vector structure and related functions.