XenevaOS
Loading...
Searching...
No Matches
esccode.h
Go to the documentation of this file.
1
30#ifndef __ESCCODE_H__
31#define __ESCCODE_H__
32
33#define ASCII_ESC_CHAR '^' //octal: \033, hex -> \x1B, or '^[ 'or 27 in decimal
34#define ASCII_ESC_OCTAL '\033'
35#define ASCII_ESC_HEX '\x1B'
36#define ASCII_ESC_DECIMAL 27
37
38#define SEQUENCE_DCS 'P'
39#define SEQUENCE_CSI '[' //control
40#define SEQUENCE_ST '\\'
41#define SEQUENCE_OSC ']'
42
43#define CSI_CURSOR_UP 'A'
44#define CSI_CURSOR_DOWN 'B'
45#define CSI_CURSOR_FORWARD 'C'
46#define CSI_CURSOR_BACKWARD 'D'
47#define CSI_CURSOR_HOME 'H'
48#define CSI_CNL 'E' //cursor next line
49#define CSI_CPL 'F' //Cursor previous line
50#define CSI_CHA 'G' //Cursor horizontal absolute
51#define CSI_CUP 'H' //Cursor Position
52#define CSI_ED 'J' //Erase in Line
53#define CSI_EL 'K' //Erase in Line
54#define CSI_IL 'L' //Insert n Blank Lines
55#define CSI_DL 'M' //Delete n Lines
56#define CSI_SCROLL_UP 'S' //Scroll Up
57#define CSI_SCROLL_DOWN 'T' //Scroll Down
58
59#define CSI_SET_GRAPHICS_RENDITION 'm'
60
61/* color attributes */
62#define CSI_SET_FG_BLACK 30
63#define CSI_SET_FG_RED 31
64#define CSI_SET_FG_GREEN 32
65#define CSI_SET_FG_BROWN 33
66#define CSI_SET_FG_BLUE 34
67#define CSI_SET_FG_MAGENTA 35
68#define CSI_SET_FG_CYAN 36
69#define CSI_SET_FG_WHITE 37
70#define CSI_SET_FG_DEFAULT 39
71
72#define CSI_SET_BG_BLACK 40
73#define CSI_SET_BG_RED 41
74#define CSI_SET_BG_GREEN 42
75#define CSI_SET_BG_BROWN 43
76#define CSI_SET_BG_BLUE 44
77#define CSI_SET_BG_MAGENTA 45
78#define CSI_SET_BG_CYAN 46
79#define CSI_SET_BG_WHITE 47
80#define CSI_SET_BG_DEFAULT 49
81
82#define CSI_ERASE_TEXT_NONLINE 'J'
83#define CSI_ERASE_TEXT_LINE 'K'
84
85#define CSI_SET_MODE 'h'
86#define CSI_RESET_MODE 'l'
87#define CSI_SAVE_CURSOR 's'
88#define CSI_RESTORE_CURSOR 'u'
89#endif