6 Copyright (c) 1998 Intel Corporation
23 // Text output protocol
26 #define SIMPLE_TEXT_OUTPUT_PROTOCOL \
27 { 0x387477c2, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
29 INTERFACE_DECL(_SIMPLE_TEXT_OUTPUT_INTERFACE
);
33 (EFIAPI
*EFI_TEXT_RESET
) (
34 IN
struct _SIMPLE_TEXT_OUTPUT_INTERFACE
*This
,
35 IN BOOLEAN ExtendedVerification
40 (EFIAPI
*EFI_TEXT_OUTPUT_STRING
) (
41 IN
struct _SIMPLE_TEXT_OUTPUT_INTERFACE
*This
,
47 (EFIAPI
*EFI_TEXT_TEST_STRING
) (
48 IN
struct _SIMPLE_TEXT_OUTPUT_INTERFACE
*This
,
54 (EFIAPI
*EFI_TEXT_QUERY_MODE
) (
55 IN
struct _SIMPLE_TEXT_OUTPUT_INTERFACE
*This
,
63 (EFIAPI
*EFI_TEXT_SET_MODE
) (
64 IN
struct _SIMPLE_TEXT_OUTPUT_INTERFACE
*This
,
70 (EFIAPI
*EFI_TEXT_SET_ATTRIBUTE
) (
71 IN
struct _SIMPLE_TEXT_OUTPUT_INTERFACE
*This
,
75 #define EFI_BLACK 0x00
77 #define EFI_GREEN 0x02
78 #define EFI_CYAN (EFI_BLUE | EFI_GREEN)
80 #define EFI_MAGENTA (EFI_BLUE | EFI_RED)
81 #define EFI_BROWN (EFI_GREEN | EFI_RED)
82 #define EFI_LIGHTGRAY (EFI_BLUE | EFI_GREEN | EFI_RED)
83 #define EFI_BRIGHT 0x08
84 #define EFI_DARKGRAY (EFI_BRIGHT)
85 #define EFI_LIGHTBLUE (EFI_BLUE | EFI_BRIGHT)
86 #define EFI_LIGHTGREEN (EFI_GREEN | EFI_BRIGHT)
87 #define EFI_LIGHTCYAN (EFI_CYAN | EFI_BRIGHT)
88 #define EFI_LIGHTRED (EFI_RED | EFI_BRIGHT)
89 #define EFI_LIGHTMAGENTA (EFI_MAGENTA | EFI_BRIGHT)
90 #define EFI_YELLOW (EFI_BROWN | EFI_BRIGHT)
91 #define EFI_WHITE (EFI_BLUE | EFI_GREEN | EFI_RED | EFI_BRIGHT)
93 #define EFI_TEXT_ATTR(f,b) ((f) | ((b) << 4))
95 #define EFI_BACKGROUND_BLACK 0x00
96 #define EFI_BACKGROUND_BLUE 0x10
97 #define EFI_BACKGROUND_GREEN 0x20
98 #define EFI_BACKGROUND_CYAN (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_GREEN)
99 #define EFI_BACKGROUND_RED 0x40
100 #define EFI_BACKGROUND_MAGENTA (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_RED)
101 #define EFI_BACKGROUND_BROWN (EFI_BACKGROUND_GREEN | EFI_BACKGROUND_RED)
102 #define EFI_BACKGROUND_LIGHTGRAY (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_GREEN | EFI_BACKGROUND_RED)
107 (EFIAPI
*EFI_TEXT_CLEAR_SCREEN
) (
108 IN
struct _SIMPLE_TEXT_OUTPUT_INTERFACE
*This
113 (EFIAPI
*EFI_TEXT_SET_CURSOR_POSITION
) (
114 IN
struct _SIMPLE_TEXT_OUTPUT_INTERFACE
*This
,
121 (EFIAPI
*EFI_TEXT_ENABLE_CURSOR
) (
122 IN
struct _SIMPLE_TEXT_OUTPUT_INTERFACE
*This
,
133 BOOLEAN CursorVisible
;
134 } SIMPLE_TEXT_OUTPUT_MODE
;
136 typedef struct _SIMPLE_TEXT_OUTPUT_INTERFACE
{
137 EFI_TEXT_RESET Reset
;
139 EFI_TEXT_OUTPUT_STRING OutputString
;
140 EFI_TEXT_TEST_STRING TestString
;
142 EFI_TEXT_QUERY_MODE QueryMode
;
143 EFI_TEXT_SET_MODE SetMode
;
144 EFI_TEXT_SET_ATTRIBUTE SetAttribute
;
146 EFI_TEXT_CLEAR_SCREEN ClearScreen
;
147 EFI_TEXT_SET_CURSOR_POSITION SetCursorPosition
;
148 EFI_TEXT_ENABLE_CURSOR EnableCursor
;
151 SIMPLE_TEXT_OUTPUT_MODE
*Mode
;
152 } SIMPLE_TEXT_OUTPUT_INTERFACE
;
155 // Define's for required EFI Unicode Box Draw character
158 #define BOXDRAW_HORIZONTAL 0x2500
159 #define BOXDRAW_VERTICAL 0x2502
160 #define BOXDRAW_DOWN_RIGHT 0x250c
161 #define BOXDRAW_DOWN_LEFT 0x2510
162 #define BOXDRAW_UP_RIGHT 0x2514
163 #define BOXDRAW_UP_LEFT 0x2518
164 #define BOXDRAW_VERTICAL_RIGHT 0x251c
165 #define BOXDRAW_VERTICAL_LEFT 0x2524
166 #define BOXDRAW_DOWN_HORIZONTAL 0x252c
167 #define BOXDRAW_UP_HORIZONTAL 0x2534
168 #define BOXDRAW_VERTICAL_HORIZONTAL 0x253c
170 #define BOXDRAW_DOUBLE_HORIZONTAL 0x2550
171 #define BOXDRAW_DOUBLE_VERTICAL 0x2551
172 #define BOXDRAW_DOWN_RIGHT_DOUBLE 0x2552
173 #define BOXDRAW_DOWN_DOUBLE_RIGHT 0x2553
174 #define BOXDRAW_DOUBLE_DOWN_RIGHT 0x2554
176 #define BOXDRAW_DOWN_LEFT_DOUBLE 0x2555
177 #define BOXDRAW_DOWN_DOUBLE_LEFT 0x2556
178 #define BOXDRAW_DOUBLE_DOWN_LEFT 0x2557
180 #define BOXDRAW_UP_RIGHT_DOUBLE 0x2558
181 #define BOXDRAW_UP_DOUBLE_RIGHT 0x2559
182 #define BOXDRAW_DOUBLE_UP_RIGHT 0x255a
184 #define BOXDRAW_UP_LEFT_DOUBLE 0x255b
185 #define BOXDRAW_UP_DOUBLE_LEFT 0x255c
186 #define BOXDRAW_DOUBLE_UP_LEFT 0x255d
188 #define BOXDRAW_VERTICAL_RIGHT_DOUBLE 0x255e
189 #define BOXDRAW_VERTICAL_DOUBLE_RIGHT 0x255f
190 #define BOXDRAW_DOUBLE_VERTICAL_RIGHT 0x2560
192 #define BOXDRAW_VERTICAL_LEFT_DOUBLE 0x2561
193 #define BOXDRAW_VERTICAL_DOUBLE_LEFT 0x2562
194 #define BOXDRAW_DOUBLE_VERTICAL_LEFT 0x2563
196 #define BOXDRAW_DOWN_HORIZONTAL_DOUBLE 0x2564
197 #define BOXDRAW_DOWN_DOUBLE_HORIZONTAL 0x2565
198 #define BOXDRAW_DOUBLE_DOWN_HORIZONTAL 0x2566
200 #define BOXDRAW_UP_HORIZONTAL_DOUBLE 0x2567
201 #define BOXDRAW_UP_DOUBLE_HORIZONTAL 0x2568
202 #define BOXDRAW_DOUBLE_UP_HORIZONTAL 0x2569
204 #define BOXDRAW_VERTICAL_HORIZONTAL_DOUBLE 0x256a
205 #define BOXDRAW_VERTICAL_DOUBLE_HORIZONTAL 0x256b
206 #define BOXDRAW_DOUBLE_VERTICAL_HORIZONTAL 0x256c
209 // EFI Required Block Elements Code Chart
212 #define BLOCKELEMENT_FULL_BLOCK 0x2588
213 #define BLOCKELEMENT_LIGHT_SHADE 0x2591
215 // EFI Required Geometric Shapes Code Chart
218 #define GEOMETRICSHAPE_UP_TRIANGLE 0x25b2
219 #define GEOMETRICSHAPE_RIGHT_TRIANGLE 0x25ba
220 #define GEOMETRICSHAPE_DOWN_TRIANGLE 0x25bc
221 #define GEOMETRICSHAPE_LEFT_TRIANGLE 0x25c4
224 // EFI Required Arrow shapes
227 #define ARROW_UP 0x2191
228 #define ARROW_DOWN 0x2193
231 // Text input protocol
234 #define SIMPLE_TEXT_INPUT_PROTOCOL \
235 { 0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
237 INTERFACE_DECL(_SIMPLE_INPUT_INTERFACE
);
245 // Baseline unicode control chars
248 #define CHAR_NULL 0x0000
249 #define CHAR_BACKSPACE 0x0008
250 #define CHAR_TAB 0x0009
251 #define CHAR_LINEFEED 0x000A
252 #define CHAR_CARRIAGE_RETURN 0x000D
255 // Scan codes for base line keys
258 #define SCAN_NULL 0x0000
259 #define SCAN_UP 0x0001
260 #define SCAN_DOWN 0x0002
261 #define SCAN_RIGHT 0x0003
262 #define SCAN_LEFT 0x0004
263 #define SCAN_HOME 0x0005
264 #define SCAN_END 0x0006
265 #define SCAN_INSERT 0x0007
266 #define SCAN_DELETE 0x0008
267 #define SCAN_PAGE_UP 0x0009
268 #define SCAN_PAGE_DOWN 0x000A
269 #define SCAN_F1 0x000B
270 #define SCAN_F2 0x000C
271 #define SCAN_F3 0x000D
272 #define SCAN_F4 0x000E
273 #define SCAN_F5 0x000F
274 #define SCAN_F6 0x0010
275 #define SCAN_F7 0x0011
276 #define SCAN_F8 0x0012
277 #define SCAN_F9 0x0013
278 #define SCAN_F10 0x0014
279 #define SCAN_ESC 0x0017
283 (EFIAPI
*EFI_INPUT_RESET
) (
284 IN
struct _SIMPLE_INPUT_INTERFACE
*This
,
285 IN BOOLEAN ExtendedVerification
290 (EFIAPI
*EFI_INPUT_READ_KEY
) (
291 IN
struct _SIMPLE_INPUT_INTERFACE
*This
,
292 OUT EFI_INPUT_KEY
*Key
295 typedef struct _SIMPLE_INPUT_INTERFACE
{
296 EFI_INPUT_RESET Reset
;
297 EFI_INPUT_READ_KEY ReadKeyStroke
;
298 EFI_EVENT WaitForKey
;
299 } SIMPLE_INPUT_INTERFACE
;