Sync usage with man page.
[netbsd-mini2440.git] / sys / arch / ia64 / stand / efi / include / eficon.h
bloba18790201a7121a9e125a486fb93755e6abd202b
1 /* $NetBSD: eficon.h,v 1.1 2006/04/07 14:21:29 cherry Exp $ */
2 /* $FreeBSD: src/sys/boot/efi/include/eficon.h,v 1.2 2002/05/19 03:17:20 marcel Exp $ */
3 #ifndef _EFI_CON_H
4 #define _EFI_CON_H
6 /*++
8 Copyright (c) 1998 Intel Corporation
10 Module Name:
12 eficon.h
14 Abstract:
16 EFI console protocols
20 Revision History
22 --*/
25 * Text output protocol
28 #define SIMPLE_TEXT_OUTPUT_PROTOCOL \
29 { 0x387477c2, 0x69c7, 0x11d2, 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b }
31 INTERFACE_DECL(_SIMPLE_TEXT_OUTPUT_INTERFACE);
33 typedef
34 EFI_STATUS
35 (EFIAPI *EFI_TEXT_RESET) (
36 IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
37 IN BOOLEAN ExtendedVerification
40 typedef
41 EFI_STATUS
42 (EFIAPI *EFI_TEXT_OUTPUT_STRING) (
43 IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
44 IN CHAR16 *String
47 typedef
48 EFI_STATUS
49 (EFIAPI *EFI_TEXT_TEST_STRING) (
50 IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
51 IN CHAR16 *String
54 typedef
55 EFI_STATUS
56 (EFIAPI *EFI_TEXT_QUERY_MODE) (
57 IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
58 IN UINTN ModeNumber,
59 OUT UINTN *Columns,
60 OUT UINTN *Rows
63 typedef
64 EFI_STATUS
65 (EFIAPI *EFI_TEXT_SET_MODE) (
66 IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
67 IN UINTN ModeNumber
70 typedef
71 EFI_STATUS
72 (EFIAPI *EFI_TEXT_SET_ATTRIBUTE) (
73 IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
74 IN UINTN Attribute
77 #define EFI_BLACK 0x00
78 #define EFI_BLUE 0x01
79 #define EFI_GREEN 0x02
80 #define EFI_CYAN (EFI_BLUE | EFI_GREEN)
81 #define EFI_RED 0x04
82 #define EFI_MAGENTA (EFI_BLUE | EFI_RED)
83 #define EFI_BROWN (EFI_GREEN | EFI_RED)
84 #define EFI_LIGHTGRAY (EFI_BLUE | EFI_GREEN | EFI_RED)
85 #define EFI_BRIGHT 0x08
86 #define EFI_DARKGRAY (EFI_BRIGHT)
87 #define EFI_LIGHTBLUE (EFI_BLUE | EFI_BRIGHT)
88 #define EFI_LIGHTGREEN (EFI_GREEN | EFI_BRIGHT)
89 #define EFI_LIGHTCYAN (EFI_CYAN | EFI_BRIGHT)
90 #define EFI_LIGHTRED (EFI_RED | EFI_BRIGHT)
91 #define EFI_LIGHTMAGENTA (EFI_MAGENTA | EFI_BRIGHT)
92 #define EFI_YELLOW (EFI_BROWN | EFI_BRIGHT)
93 #define EFI_WHITE (EFI_BLUE | EFI_GREEN | EFI_RED | EFI_BRIGHT)
95 #define EFI_TEXT_ATTR(f,b) ((f) | ((b) << 4))
97 #define EFI_BACKGROUND_BLACK 0x00
98 #define EFI_BACKGROUND_BLUE 0x10
99 #define EFI_BACKGROUND_GREEN 0x20
100 #define EFI_BACKGROUND_CYAN (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_GREEN)
101 #define EFI_BACKGROUND_RED 0x40
102 #define EFI_BACKGROUND_MAGENTA (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_RED)
103 #define EFI_BACKGROUND_BROWN (EFI_BACKGROUND_GREEN | EFI_BACKGROUND_RED)
104 #define EFI_BACKGROUND_LIGHTGRAY (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_GREEN | EFI_BACKGROUND_RED)
107 typedef
108 EFI_STATUS
109 (EFIAPI *EFI_TEXT_CLEAR_SCREEN) (
110 IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This
113 typedef
114 EFI_STATUS
115 (EFIAPI *EFI_TEXT_SET_CURSOR_POSITION) (
116 IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
117 IN UINTN Column,
118 IN UINTN Row
121 typedef
122 EFI_STATUS
123 (EFIAPI *EFI_TEXT_ENABLE_CURSOR) (
124 IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This,
125 IN BOOLEAN Enable
128 typedef struct {
129 INT32 MaxMode;
130 /* current settings */
131 INT32 Mode;
132 INT32 Attribute;
133 INT32 CursorColumn;
134 INT32 CursorRow;
135 BOOLEAN CursorVisible;
136 } SIMPLE_TEXT_OUTPUT_MODE;
138 typedef struct _SIMPLE_TEXT_OUTPUT_INTERFACE {
139 EFI_TEXT_RESET Reset;
141 EFI_TEXT_OUTPUT_STRING OutputString;
142 EFI_TEXT_TEST_STRING TestString;
144 EFI_TEXT_QUERY_MODE QueryMode;
145 EFI_TEXT_SET_MODE SetMode;
146 EFI_TEXT_SET_ATTRIBUTE SetAttribute;
148 EFI_TEXT_CLEAR_SCREEN ClearScreen;
149 EFI_TEXT_SET_CURSOR_POSITION SetCursorPosition;
150 EFI_TEXT_ENABLE_CURSOR EnableCursor;
152 /* Current mode */
153 SIMPLE_TEXT_OUTPUT_MODE *Mode;
154 } SIMPLE_TEXT_OUTPUT_INTERFACE;
157 * Define's for required EFI Unicode Box Draw character
160 #define BOXDRAW_HORIZONTAL 0x2500
161 #define BOXDRAW_VERTICAL 0x2502
162 #define BOXDRAW_DOWN_RIGHT 0x250c
163 #define BOXDRAW_DOWN_LEFT 0x2510
164 #define BOXDRAW_UP_RIGHT 0x2514
165 #define BOXDRAW_UP_LEFT 0x2518
166 #define BOXDRAW_VERTICAL_RIGHT 0x251c
167 #define BOXDRAW_VERTICAL_LEFT 0x2524
168 #define BOXDRAW_DOWN_HORIZONTAL 0x252c
169 #define BOXDRAW_UP_HORIZONTAL 0x2534
170 #define BOXDRAW_VERTICAL_HORIZONTAL 0x253c
172 #define BOXDRAW_DOUBLE_HORIZONTAL 0x2550
173 #define BOXDRAW_DOUBLE_VERTICAL 0x2551
174 #define BOXDRAW_DOWN_RIGHT_DOUBLE 0x2552
175 #define BOXDRAW_DOWN_DOUBLE_RIGHT 0x2553
176 #define BOXDRAW_DOUBLE_DOWN_RIGHT 0x2554
178 #define BOXDRAW_DOWN_LEFT_DOUBLE 0x2555
179 #define BOXDRAW_DOWN_DOUBLE_LEFT 0x2556
180 #define BOXDRAW_DOUBLE_DOWN_LEFT 0x2557
182 #define BOXDRAW_UP_RIGHT_DOUBLE 0x2558
183 #define BOXDRAW_UP_DOUBLE_RIGHT 0x2559
184 #define BOXDRAW_DOUBLE_UP_RIGHT 0x255a
186 #define BOXDRAW_UP_LEFT_DOUBLE 0x255b
187 #define BOXDRAW_UP_DOUBLE_LEFT 0x255c
188 #define BOXDRAW_DOUBLE_UP_LEFT 0x255d
190 #define BOXDRAW_VERTICAL_RIGHT_DOUBLE 0x255e
191 #define BOXDRAW_VERTICAL_DOUBLE_RIGHT 0x255f
192 #define BOXDRAW_DOUBLE_VERTICAL_RIGHT 0x2560
194 #define BOXDRAW_VERTICAL_LEFT_DOUBLE 0x2561
195 #define BOXDRAW_VERTICAL_DOUBLE_LEFT 0x2562
196 #define BOXDRAW_DOUBLE_VERTICAL_LEFT 0x2563
198 #define BOXDRAW_DOWN_HORIZONTAL_DOUBLE 0x2564
199 #define BOXDRAW_DOWN_DOUBLE_HORIZONTAL 0x2565
200 #define BOXDRAW_DOUBLE_DOWN_HORIZONTAL 0x2566
202 #define BOXDRAW_UP_HORIZONTAL_DOUBLE 0x2567
203 #define BOXDRAW_UP_DOUBLE_HORIZONTAL 0x2568
204 #define BOXDRAW_DOUBLE_UP_HORIZONTAL 0x2569
206 #define BOXDRAW_VERTICAL_HORIZONTAL_DOUBLE 0x256a
207 #define BOXDRAW_VERTICAL_DOUBLE_HORIZONTAL 0x256b
208 #define BOXDRAW_DOUBLE_VERTICAL_HORIZONTAL 0x256c
211 * EFI Required Block Elements Code Chart
213 #define BLOCKELEMENT_FULL_BLOCK 0x2588
214 #define BLOCKELEMENT_LIGHT_SHADE 0x2591
217 * EFI Required Geometric Shapes Code Chart
219 #define GEOMETRICSHAPE_UP_TRIANGLE 0x25b2
220 #define GEOMETRICSHAPE_RIGHT_TRIANGLE 0x25ba
221 #define GEOMETRICSHAPE_DOWN_TRIANGLE 0x25bc
222 #define GEOMETRICSHAPE_LEFT_TRIANGLE 0x25c4
225 * 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);
239 typedef struct {
240 UINT16 ScanCode;
241 CHAR16 UnicodeChar;
242 } EFI_INPUT_KEY;
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
257 #define SCAN_NULL 0x0000
258 #define SCAN_UP 0x0001
259 #define SCAN_DOWN 0x0002
260 #define SCAN_RIGHT 0x0003
261 #define SCAN_LEFT 0x0004
262 #define SCAN_HOME 0x0005
263 #define SCAN_END 0x0006
264 #define SCAN_INSERT 0x0007
265 #define SCAN_DELETE 0x0008
266 #define SCAN_PAGE_UP 0x0009
267 #define SCAN_PAGE_DOWN 0x000A
268 #define SCAN_F1 0x000B
269 #define SCAN_F2 0x000C
270 #define SCAN_F3 0x000D
271 #define SCAN_F4 0x000E
272 #define SCAN_F5 0x000F
273 #define SCAN_F6 0x0010
274 #define SCAN_F7 0x0011
275 #define SCAN_F8 0x0012
276 #define SCAN_F9 0x0013
277 #define SCAN_F10 0x0014
278 #define SCAN_ESC 0x0017
280 typedef
281 EFI_STATUS
282 (EFIAPI *EFI_INPUT_RESET) (
283 IN struct _SIMPLE_INPUT_INTERFACE *This,
284 IN BOOLEAN ExtendedVerification
287 typedef
288 EFI_STATUS
289 (EFIAPI *EFI_INPUT_READ_KEY) (
290 IN struct _SIMPLE_INPUT_INTERFACE *This,
291 OUT EFI_INPUT_KEY *Key
294 typedef struct _SIMPLE_INPUT_INTERFACE {
295 EFI_INPUT_RESET Reset;
296 EFI_INPUT_READ_KEY ReadKeyStroke;
297 EFI_EVENT WaitForKey;
298 } SIMPLE_INPUT_INTERFACE;
300 #endif