Choco OS  V.0.16.9.0
Join to the chocolate world
oc_vt100.h
Go to the documentation of this file.
1 
30 #ifndef SYSTEM_CORE_TERMINALS_VT100_OC_VT100_H_
31 #define SYSTEM_CORE_TERMINALS_VT100_OC_VT100_H_
32 
33 #include <oc_vt100_seq.h>
34 
40 #define _________________________________________MACROS_SECTION_____________________________________________________________________________
41 
42 //==========================================================================================================================================
47 //==========================================================================================================================================
48 #define oC_VT100_RESET_DEVICE "\033c"
49 
50 /* Set fonts */
51 #define oC_VT100_FONT_SET_G0 "\033("
52 #define oC_VT100_FONT_SET_G1 "\033)"
53 
54 //==========================================================================================================================================
59 //==========================================================================================================================================
60 #define oC_VT100_ENABLE_LINE_WRAP "\033[7h"
61 
62 //==========================================================================================================================================
67 //==========================================================================================================================================
68 #define oC_VT100_DISABLE_LINE_WRAP "\033[7l"
69 
70 
71 //==========================================================================================================================================
76 //==========================================================================================================================================
77 #define oC_VT100_SET_CURSOR_HOME(ROW,COLUMN) "\033" "[" ROW ";" COLUMN "H"
78 
79 //==========================================================================================================================================
84 //==========================================================================================================================================
85 #define oC_VT100_CURSOR_HOME "\033" "[H"
86 
87 //==========================================================================================================================================
91 //==========================================================================================================================================
92 #define oC_VT100_CURSOR_UP(COUNT) "\033" "[" COUNT "A"
93 
94 //==========================================================================================================================================
98 //==========================================================================================================================================
99 #define oC_VT100_CURSOR_DOWN(COUNT) "\033" "[" COUNT "B"
100 
101 //==========================================================================================================================================
105 //==========================================================================================================================================
106 #define oC_VT100_CURSOR_FORWARD(COUNT) "\033" "[" COUNT "C"
107 
108 //==========================================================================================================================================
112 //==========================================================================================================================================
113 #define oC_VT100_CURSOR_BACKWARD(COUNT) "\033" "[" COUNT "}D"
114 
115 //==========================================================================================================================================
119 //==========================================================================================================================================
120 #define oC_VT100_FORCE_CURSOR_POSITION(ROW,COLUMN) "\033" "[" ROW ";" COLUMN "f"
121 
122 //==========================================================================================================================================
126 //==========================================================================================================================================
127 #define oC_VT100_SAVE_CURSOR "\033" "[s"
128 
129 //==========================================================================================================================================
133 //==========================================================================================================================================
134 #define oC_VT100_UNSAVE_CURSOR "\033" "[u"
135 
136 //==========================================================================================================================================
140 //==========================================================================================================================================
141 #define oC_VT100_SAVE_CURSOR_AND_ATTRS "\033" "7"
142 
143 //==========================================================================================================================================
147 //==========================================================================================================================================
148 #define oC_VT100_RESTORE_CURSOR_AND_ATTRS "\033" "8"
149 
150 //==========================================================================================================================================
154 //==========================================================================================================================================
155 #define oC_VT100_SCROLL_SCREEN "\033" "[r"
156 
157 //==========================================================================================================================================
161 //==========================================================================================================================================
162 #define oC_VT100_SCROLL_SCREEN_TO(START,END) "\033" "[" START ";" END "r"
163 
164 //==========================================================================================================================================
168 //==========================================================================================================================================
169 #define oC_VT100_SCROLL_DOWN "\033" "D"
170 
171 
172 //==========================================================================================================================================
176 //==========================================================================================================================================
177 #define oC_VT100_SCROLL_UP "\033" "M"
178 
179 //==========================================================================================================================================
183 //==========================================================================================================================================
184 #define oC_VT100_SET_TAB "\033" "H"
185 
186 //==========================================================================================================================================
190 //==========================================================================================================================================
191 #define oC_VT100_CLEAR_TAB "\033" "[g"
192 
193 //==========================================================================================================================================
197 //==========================================================================================================================================
198 #define oC_VT100_CLEAR_ALL_TABS "\033" "[3g"
199 
200 //==========================================================================================================================================
204 //==========================================================================================================================================
205 #define oC_VT100_ERASE_END_OF_LINE "\033" "[K"
206 
207 //==========================================================================================================================================
211 //==========================================================================================================================================
212 #define oC_VT100_ERASE_START_OF_LINE "\033" "[1K"
213 
214 //==========================================================================================================================================
218 //==========================================================================================================================================
219 #define oC_VT100_ERASE_LINE "\033" "[2K"
220 
221 //==========================================================================================================================================
225 //==========================================================================================================================================
226 #define oC_VT100_ERASE_DOWN "\033" "[J"
227 
228 //==========================================================================================================================================
232 //==========================================================================================================================================
233 #define oC_VT100_ERASE_UP "\033" "[1J"
234 
235 //==========================================================================================================================================
239 //==========================================================================================================================================
240 #define oC_VT100_ERASE_SCREEN "\033" "[2J"
241 
242 /* Console attributes */
243 #define oC_VT100_RESET_ALL_ATTRIBUTES "\033[0m"
244 #define oC_VT100_BRIGHT "\033[1m"
245 #define oC_VT100_DIM "\033[2m"
246 #define oC_VT100_UNDERSCORE "\033[4m"
247 #define oC_VT100_BLINK "\033[5m"
248 #define oC_VT100_REVERSE "\033[7m"
249 #define oC_VT100_HIDDEN "\033[8m"
250 
251 /* Foreground Colors */
252 #define oC_VT100_FG_BLACK "\033[30m"
253 #define oC_VT100_FG_RED "\033[31m"
254 #define oC_VT100_FG_GREEN "\033[32m"
255 #define oC_VT100_FG_YELLOW "\033[33m"
256 #define oC_VT100_FG_BLUE "\033[34m"
257 #define oC_VT100_FG_MAGENTA "\033[35m"
258 #define oC_VT100_FG_CYAN "\033[36m"
259 #define oC_VT100_FG_WHITE "\033[37m"
260 
261 /* Background Colors */
262 #define oC_VT100_BG_BLACK "\033[40m"
263 #define oC_VT100_BG_RED "\033[41m"
264 #define oC_VT100_BG_GREEN "\033[42m"
265 #define oC_VT100_BG_YELLOW "\033[43m"
266 #define oC_VT100_BG_BLUE "\033[44m"
267 #define oC_VT100_BG_MAGENTA "\033[45m"
268 #define oC_VT100_BG_CYAN "\033[46m"
269 #define oC_VT100_BG_WHITE "\033[47m"
270 
271 //==========================================================================================================================================
275 //==========================================================================================================================================
276 #define oC_VT100_BORDER_LU "\e(0\x6A\e(B"
277 #define oC_VT100_BORDER_LD "\e(0\x6B\e(B"
278 #define oC_VT100_BORDER_DR "\e(0\x6C\e(B"
279 #define oC_VT100_BORDER_UR "\e(0\x6D\e(B"
280 #define oC_VT100_BORDER_LUDR "\e(0\x6E\e(B"
281 #define oC_VT100_BORDER_LR "\e(0\x71\e(B"
282 #define oC_VT100_BORDER_UDR "\e(0\x74\e(B"
283 #define oC_VT100_BORDER_LUD "\e(0\x75\e(B"
284 #define oC_VT100_BORDER_LUR "\e(0\x76\e(B"
285 #define oC_VT100_BORDER_LDR "\e(0\x77\e(B"
286 #define oC_VT100_BORDER_UD "\e(0\x78\e(B"
287 
288 #undef _________________________________________MACROS_SECTION_____________________________________________________________________________
289 
290 
291 #endif /* SYSTEM_CORE_TERMINALS_VT100_OC_VT100_H_ */