|
PatchworkOS
|
ANSI. More...
Data Structures | |
| struct | ansi_receiving_t |
| ANSI receiving structure. More... | |
| struct | ansi_sending_t |
| ANSI sending structure. More... | |
Macros | |
| #define | ANSI_MAX_LENGTH 8 |
| The size we use for buffers when parsing ANSI sequences. | |
Functions | |
| static void | ansi_kbd_to_receiving (ansi_receiving_t *ansi, const event_kbd_t *kbd) |
| Convert a keycode to an ANSI receiving sequence. | |
| static void | ansi_sending_init (ansi_sending_t *ansi) |
| Initialize an ANSI sending structure. | |
| static bool | ansi_sending_parse (ansi_sending_t *ansi, char chr) |
| Parse a character for ANSI sending. | |
ANSI.
| #define ANSI_MAX_LENGTH 8 |
|
inlinestatic |
Convert a keycode to an ANSI receiving sequence.
A receiving sequence is a sequence sent from the terminal and received by processes running in the terminal.
| ansi | The receiving structure to store the sequence in. |
| kbd | The keyboard event to convert. |
Definition at line 40 of file ansi.h.
References ansi_receiving_t::buffer, kbd, KBD_BACKSPACE, KBD_C, KBD_DELETE, KBD_DOWN, KBD_END, KBD_ENTER, KBD_HOME, KBD_LEFT, KBD_MOD_CTRL, KBD_PAGE_DOWN, KBD_PAGE_UP, KBD_RIGHT, KBD_TAB, KBD_UP, ansi_receiving_t::length, and kbd_t::mods.
Referenced by terminal_handle_input().
|
inlinestatic |
Initialize an ANSI sending structure.
| ansi | The sending structure to initialize. |
Definition at line 153 of file ansi.h.
References ansi_sending_t::ascii, ansi_sending_t::buffer, ansi_sending_t::command, ansi_sending_t::length, memset(), ansi_sending_t::paramCount, and ansi_sending_t::parameters.
Referenced by ansi_sending_parse(), and terminal_procedure().
|
inlinestatic |
Parse a character for ANSI sending.
| ansi | The sending structure. |
| chr | The character to parse. |
Definition at line 170 of file ansi.h.
References ANSI_MAX_LENGTH, ansi_sending_init(), ansi_sending_t::ascii, ansi_sending_t::buffer, ansi_sending_t::command, isdigit(), ansi_sending_t::length, ansi_sending_t::paramCount, and ansi_sending_t::parameters.
Referenced by terminal_handle_output().