FreeNOS
|
The terminal server provides the system console via input/output devices. More...
Data Structures | |
class | Terminal |
A Terminal enables user to interact with the system. More... | |
Macros | |
#define | BANNER "FreeNOS " RELEASE " [" ARCH "/" SYSTEM "] (" BUILDUSER "@" BUILDHOST ") (" COMPILER_VERSION ") " DATETIME "\r\n" |
Print this banner per default on new Terminals. More... | |
#define | _SGR(x) "\033[" #x "m" |
Set Graphic Rendition. More... | |
Functions | |
void | bell (Terminal *term) |
Makes a sound (bell). More... | |
void | putchar (Terminal *term, const teken_pos_t *pos, teken_char_t ch, const teken_attr_t *attr) |
Output a new character. More... | |
void | cursor (Terminal *term, const teken_pos_t *pos) |
Sets the Terminal cursor. More... | |
void | fill (Terminal *ctx, const teken_rect_t *rect, teken_char_t ch, const teken_attr_t *attr) |
Fills the Terminal buffer with a character. More... | |
void | copy (Terminal *ctx, const teken_rect_t *rect, const teken_pos_t *pos) |
Copy bytes to the terminal. More... | |
void | param (Terminal *ctx, int key, int value) |
Set terminal parameters. More... | |
void | respond (Terminal *ctx, const void *buf, size_t size) |
Unused. More... | |
Terminal Colors | |
#define | BLACK _SGR(30) |
#define | RED _SGR(31) |
#define | GREEN _SGR(32) |
#define | YELLOW _SGR(33) |
#define | BLUE _SGR(34) |
#define | MAGENTA _SGR(35) |
#define | CYAN _SGR(36) |
#define | WHITE _SGR(37) |
#define | RESET _SGR(39) |
The terminal server provides the system console via input/output devices.
#define _SGR | ( | x | ) | "\033[" #x "m" |
Set Graphic Rendition.
Definition at line 30 of file TerminalCodes.h.
#define BANNER "FreeNOS " RELEASE " [" ARCH "/" SYSTEM "] (" BUILDUSER "@" BUILDHOST ") (" COMPILER_VERSION ") " DATETIME "\r\n" |
Print this banner per default on new Terminals.
Definition at line 38 of file Terminal.h.
#define BLACK _SGR(30) |
Definition at line 38 of file TerminalCodes.h.
#define BLUE _SGR(34) |
Definition at line 42 of file TerminalCodes.h.
#define CYAN _SGR(36) |
Definition at line 44 of file TerminalCodes.h.
#define GREEN _SGR(32) |
Definition at line 40 of file TerminalCodes.h.
#define MAGENTA _SGR(35) |
Definition at line 43 of file TerminalCodes.h.
#define RED _SGR(31) |
Definition at line 39 of file TerminalCodes.h.
#define RESET _SGR(39) |
Definition at line 46 of file TerminalCodes.h.
#define WHITE _SGR(37) |
Definition at line 45 of file TerminalCodes.h.
#define YELLOW _SGR(33) |
Definition at line 41 of file TerminalCodes.h.
void bell | ( | Terminal * | term | ) |
Makes a sound (bell).
term | Terminal object pointer. |
Definition at line 230 of file Terminal.cpp.
Referenced by Terminal::initialize().
void copy | ( | Terminal * | ctx, |
const teken_rect_t * | rect, | ||
const teken_pos_t * | pos | ||
) |
Copy bytes to the terminal.
ctx | Terminal object pointer. |
rect | Source rectagular area with VGA memory buffer. |
pos | Position to copy the rect to. |
Definition at line 282 of file Terminal.cpp.
References Terminal::getBuffer(), Terminal::getWidth(), Terminal::hideCursor(), memcpy(), Terminal::showCursor(), teken_pos_t::tp_col, teken_pos_t::tp_row, teken_rect_t::tr_begin, and teken_rect_t::tr_end.
Referenced by Terminal::initialize(), String::split(), strdup(), and String::String().
void cursor | ( | Terminal * | term, |
const teken_pos_t * | pos | ||
) |
Sets the Terminal cursor.
term | Terminal object pointer. |
pos | Position to put the cursor. |
Definition at line 253 of file Terminal.cpp.
References Terminal::hideCursor(), Terminal::setCursor(), and Terminal::showCursor().
Referenced by Terminal::initialize().
void fill | ( | Terminal * | ctx, |
const teken_rect_t * | rect, | ||
teken_char_t | ch, | ||
const teken_attr_t * | attr | ||
) |
Fills the Terminal buffer with a character.
ctx | Terminal object pointer. |
rect | Indicates where to fill. |
ch | Character to be used for filling. |
attr | Attributes for this character. |
Definition at line 260 of file Terminal.cpp.
References BLACK, Terminal::getBuffer(), Terminal::getWidth(), Terminal::hideCursor(), Terminal::showCursor(), teken_attr_t::ta_fgcolor, tekenToVGA, teken_pos_t::tp_col, teken_pos_t::tp_row, teken_rect_t::tr_begin, and VGA_CHAR.
Referenced by Terminal::initialize().
void param | ( | Terminal * | ctx, |
int | key, | ||
int | value | ||
) |
Set terminal parameters.
ctx | Terminal object pointer. |
key | Option key identifier. |
value | New value for the option. |
Definition at line 305 of file Terminal.cpp.
Referenced by Terminal::initialize(), PrivExec(), and PrivExecHandler().
void putchar | ( | Terminal * | term, |
const teken_pos_t * | pos, | ||
teken_char_t | ch, | ||
const teken_attr_t * | attr | ||
) |
Output a new character.
term | Terminal object pointer. |
pos | Terminal position. |
ch | Character to output. |
attr | Attributes for this character. |
Definition at line 235 of file Terminal.cpp.
References BLACK, Terminal::getBuffer(), Terminal::getWidth(), Terminal::hideCursor(), Terminal::showCursor(), teken_attr_t::ta_fgcolor, tekenToVGA, teken_pos_t::tp_col, teken_pos_t::tp_row, and VGA_CHAR.
Referenced by Terminal::initialize().