Rev 2726 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2726 | Rev 2787 | ||
---|---|---|---|
1 | #ifndef _EFI_CON_H |
1 | #ifndef _EFI_CON_H |
2 | #define _EFI_CON_H |
2 | #define _EFI_CON_H |
3 | 3 | ||
4 | /*++ |
4 | /*++ |
5 | 5 | ||
6 | Copyright (c) 1998 Intel Corporation |
6 | Copyright (c) 1998 Intel Corporation |
7 | 7 | ||
8 | Module Name: |
8 | Module Name: |
9 | 9 | ||
10 | eficon.h |
10 | eficon.h |
11 | 11 | ||
12 | Abstract: |
12 | Abstract: |
13 | 13 | ||
14 | EFI console protocols |
14 | EFI console protocols |
15 | 15 | ||
16 | 16 | ||
17 | 17 | ||
18 | Revision History |
18 | Revision History |
19 | 19 | ||
20 | --*/ |
20 | --*/ |
21 | 21 | ||
22 | // |
22 | // |
23 | // Text output protocol |
23 | // Text output protocol |
24 | // |
24 | // |
25 | 25 | ||
26 | #define SIMPLE_TEXT_OUTPUT_PROTOCOL \ |
26 | #define SIMPLE_TEXT_OUTPUT_PROTOCOL \ |
27 | { 0x387477c2, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} } |
27 | { 0x387477c2, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} } |
28 | 28 | ||
29 | INTERFACE_DECL(_SIMPLE_TEXT_OUTPUT_INTERFACE); |
29 | INTERFACE_DECL(_SIMPLE_TEXT_OUTPUT_INTERFACE); |
30 | 30 | ||
31 | typedef |
31 | typedef |
32 | EFI_STATUS |
32 | EFI_STATUS |
33 | (EFIAPI *EFI_TEXT_RESET) ( |
33 | (EFIAPI *EFI_TEXT_RESET) ( |
34 | IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This, |
34 | IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This, |
35 | IN BOOLEAN ExtendedVerification |
35 | IN BOOLEAN ExtendedVerification |
36 | ); |
36 | ); |
37 | 37 | ||
38 | typedef |
38 | typedef |
39 | EFI_STATUS |
39 | EFI_STATUS |
40 | (EFIAPI *EFI_TEXT_OUTPUT_STRING) ( |
40 | (EFIAPI *EFI_TEXT_OUTPUT_STRING) ( |
41 | IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This, |
41 | IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This, |
42 | IN CHAR16 *String |
42 | IN CHAR16 *String |
43 | ); |
43 | ); |
44 | 44 | ||
45 | typedef |
45 | typedef |
46 | EFI_STATUS |
46 | EFI_STATUS |
47 | (EFIAPI *EFI_TEXT_TEST_STRING) ( |
47 | (EFIAPI *EFI_TEXT_TEST_STRING) ( |
48 | IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This, |
48 | IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This, |
49 | IN CHAR16 *String |
49 | IN CHAR16 *String |
50 | ); |
50 | ); |
51 | 51 | ||
52 | typedef |
52 | typedef |
53 | EFI_STATUS |
53 | EFI_STATUS |
54 | (EFIAPI *EFI_TEXT_QUERY_MODE) ( |
54 | (EFIAPI *EFI_TEXT_QUERY_MODE) ( |
55 | IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This, |
55 | IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This, |
56 | IN UINTN ModeNumber, |
56 | IN UINTN ModeNumber, |
57 | OUT UINTN *Columns, |
57 | OUT UINTN *Columns, |
58 | OUT UINTN *Rows |
58 | OUT UINTN *Rows |
59 | ); |
59 | ); |
60 | 60 | ||
61 | typedef |
61 | typedef |
62 | EFI_STATUS |
62 | EFI_STATUS |
63 | (EFIAPI *EFI_TEXT_SET_MODE) ( |
63 | (EFIAPI *EFI_TEXT_SET_MODE) ( |
64 | IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This, |
64 | IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This, |
65 | IN UINTN ModeNumber |
65 | IN UINTN ModeNumber |
66 | ); |
66 | ); |
67 | 67 | ||
68 | typedef |
68 | typedef |
69 | EFI_STATUS |
69 | EFI_STATUS |
70 | (EFIAPI *EFI_TEXT_SET_ATTRIBUTE) ( |
70 | (EFIAPI *EFI_TEXT_SET_ATTRIBUTE) ( |
71 | IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This, |
71 | IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This, |
72 | IN UINTN Attribute |
72 | IN UINTN Attribute |
73 | ); |
73 | ); |
74 | 74 | ||
75 | #define EFI_BLACK 0x00 |
75 | #define EFI_BLACK 0x00 |
76 | #define EFI_BLUE 0x01 |
76 | #define EFI_BLUE 0x01 |
77 | #define EFI_GREEN 0x02 |
77 | #define EFI_GREEN 0x02 |
78 | #define EFI_CYAN (EFI_BLUE | EFI_GREEN) |
78 | #define EFI_CYAN (EFI_BLUE | EFI_GREEN) |
79 | #define EFI_RED 0x04 |
79 | #define EFI_RED 0x04 |
80 | #define EFI_MAGENTA (EFI_BLUE | EFI_RED) |
80 | #define EFI_MAGENTA (EFI_BLUE | EFI_RED) |
81 | #define EFI_BROWN (EFI_GREEN | EFI_RED) |
81 | #define EFI_BROWN (EFI_GREEN | EFI_RED) |
82 | #define EFI_LIGHTGRAY (EFI_BLUE | EFI_GREEN | EFI_RED) |
82 | #define EFI_LIGHTGRAY (EFI_BLUE | EFI_GREEN | EFI_RED) |
83 | #define EFI_BRIGHT 0x08 |
83 | #define EFI_BRIGHT 0x08 |
84 | #define EFI_DARKGRAY (EFI_BRIGHT) |
84 | #define EFI_DARKGRAY (EFI_BRIGHT) |
85 | #define EFI_LIGHTBLUE (EFI_BLUE | EFI_BRIGHT) |
85 | #define EFI_LIGHTBLUE (EFI_BLUE | EFI_BRIGHT) |
86 | #define EFI_LIGHTGREEN (EFI_GREEN | EFI_BRIGHT) |
86 | #define EFI_LIGHTGREEN (EFI_GREEN | EFI_BRIGHT) |
87 | #define EFI_LIGHTCYAN (EFI_CYAN | EFI_BRIGHT) |
87 | #define EFI_LIGHTCYAN (EFI_CYAN | EFI_BRIGHT) |
88 | #define EFI_LIGHTRED (EFI_RED | EFI_BRIGHT) |
88 | #define EFI_LIGHTRED (EFI_RED | EFI_BRIGHT) |
89 | #define EFI_LIGHTMAGENTA (EFI_MAGENTA | EFI_BRIGHT) |
89 | #define EFI_LIGHTMAGENTA (EFI_MAGENTA | EFI_BRIGHT) |
90 | #define EFI_YELLOW (EFI_BROWN | EFI_BRIGHT) |
90 | #define EFI_YELLOW (EFI_BROWN | EFI_BRIGHT) |
91 | #define EFI_WHITE (EFI_BLUE | EFI_GREEN | EFI_RED | EFI_BRIGHT) |
91 | #define EFI_WHITE (EFI_BLUE | EFI_GREEN | EFI_RED | EFI_BRIGHT) |
92 | 92 | ||
93 | #define EFI_TEXT_ATTR(f,b) ((f) | ((b) << 4)) |
93 | #define EFI_TEXT_ATTR(f,b) ((f) | ((b) << 4)) |
94 | 94 | ||
95 | #define EFI_BACKGROUND_BLACK 0x00 |
95 | #define EFI_BACKGROUND_BLACK 0x00 |
96 | #define EFI_BACKGROUND_BLUE 0x10 |
96 | #define EFI_BACKGROUND_BLUE 0x10 |
97 | #define EFI_BACKGROUND_GREEN 0x20 |
97 | #define EFI_BACKGROUND_GREEN 0x20 |
98 | #define EFI_BACKGROUND_CYAN (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_GREEN) |
98 | #define EFI_BACKGROUND_CYAN (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_GREEN) |
99 | #define EFI_BACKGROUND_RED 0x40 |
99 | #define EFI_BACKGROUND_RED 0x40 |
100 | #define EFI_BACKGROUND_MAGENTA (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_RED) |
100 | #define EFI_BACKGROUND_MAGENTA (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_RED) |
101 | #define EFI_BACKGROUND_BROWN (EFI_BACKGROUND_GREEN | 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) |
102 | #define EFI_BACKGROUND_LIGHTGRAY (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_GREEN | EFI_BACKGROUND_RED) |
103 | 103 | ||
104 | 104 | ||
105 | typedef |
105 | typedef |
106 | EFI_STATUS |
106 | EFI_STATUS |
107 | (EFIAPI *EFI_TEXT_CLEAR_SCREEN) ( |
107 | (EFIAPI *EFI_TEXT_CLEAR_SCREEN) ( |
108 | IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This |
108 | IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This |
109 | ); |
109 | ); |
110 | 110 | ||
111 | typedef |
111 | typedef |
112 | EFI_STATUS |
112 | EFI_STATUS |
113 | (EFIAPI *EFI_TEXT_SET_CURSOR_POSITION) ( |
113 | (EFIAPI *EFI_TEXT_SET_CURSOR_POSITION) ( |
114 | IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This, |
114 | IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This, |
115 | IN UINTN Column, |
115 | IN UINTN Column, |
116 | IN UINTN Row |
116 | IN UINTN Row |
117 | ); |
117 | ); |
118 | 118 | ||
119 | typedef |
119 | typedef |
120 | EFI_STATUS |
120 | EFI_STATUS |
121 | (EFIAPI *EFI_TEXT_ENABLE_CURSOR) ( |
121 | (EFIAPI *EFI_TEXT_ENABLE_CURSOR) ( |
122 | IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This, |
122 | IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE *This, |
123 | IN BOOLEAN Enable |
123 | IN BOOLEAN Enable |
124 | ); |
124 | ); |
125 | 125 | ||
126 | typedef struct { |
126 | typedef struct { |
127 | INT32 MaxMode; |
127 | INT32 MaxMode; |
128 | // current settings |
128 | // current settings |
129 | INT32 Mode; |
129 | INT32 Mode; |
130 | INT32 Attribute; |
130 | INT32 Attribute; |
131 | INT32 CursorColumn; |
131 | INT32 CursorColumn; |
132 | INT32 CursorRow; |
132 | INT32 CursorRow; |
133 | BOOLEAN CursorVisible; |
133 | BOOLEAN CursorVisible; |
134 | } SIMPLE_TEXT_OUTPUT_MODE; |
134 | } SIMPLE_TEXT_OUTPUT_MODE; |
135 | 135 | ||
136 | typedef struct _SIMPLE_TEXT_OUTPUT_INTERFACE { |
136 | typedef struct _SIMPLE_TEXT_OUTPUT_INTERFACE { |
137 | EFI_TEXT_RESET Reset; |
137 | EFI_TEXT_RESET Reset; |
138 | 138 | ||
139 | EFI_TEXT_OUTPUT_STRING OutputString; |
139 | EFI_TEXT_OUTPUT_STRING OutputString; |
140 | EFI_TEXT_TEST_STRING TestString; |
140 | EFI_TEXT_TEST_STRING TestString; |
141 | 141 | ||
142 | EFI_TEXT_QUERY_MODE QueryMode; |
142 | EFI_TEXT_QUERY_MODE QueryMode; |
143 | EFI_TEXT_SET_MODE SetMode; |
143 | EFI_TEXT_SET_MODE SetMode; |
144 | EFI_TEXT_SET_ATTRIBUTE SetAttribute; |
144 | EFI_TEXT_SET_ATTRIBUTE SetAttribute; |
145 | 145 | ||
146 | EFI_TEXT_CLEAR_SCREEN ClearScreen; |
146 | EFI_TEXT_CLEAR_SCREEN ClearScreen; |
147 | EFI_TEXT_SET_CURSOR_POSITION SetCursorPosition; |
147 | EFI_TEXT_SET_CURSOR_POSITION SetCursorPosition; |
148 | EFI_TEXT_ENABLE_CURSOR EnableCursor; |
148 | EFI_TEXT_ENABLE_CURSOR EnableCursor; |
149 | 149 | ||
150 | // Current mode |
150 | // Current mode |
151 | SIMPLE_TEXT_OUTPUT_MODE *Mode; |
151 | SIMPLE_TEXT_OUTPUT_MODE *Mode; |
152 | } SIMPLE_TEXT_OUTPUT_INTERFACE; |
152 | } SIMPLE_TEXT_OUTPUT_INTERFACE; |
153 | 153 | ||
154 | // |
154 | // |
155 | // Define's for required EFI Unicode Box Draw character |
155 | // Define's for required EFI Unicode Box Draw character |
156 | // |
156 | // |
157 | 157 | ||
158 | #define BOXDRAW_HORIZONTAL 0x2500 |
158 | #define BOXDRAW_HORIZONTAL 0x2500 |
159 | #define BOXDRAW_VERTICAL 0x2502 |
159 | #define BOXDRAW_VERTICAL 0x2502 |
160 | #define BOXDRAW_DOWN_RIGHT 0x250c |
160 | #define BOXDRAW_DOWN_RIGHT 0x250c |
161 | #define BOXDRAW_DOWN_LEFT 0x2510 |
161 | #define BOXDRAW_DOWN_LEFT 0x2510 |
162 | #define BOXDRAW_UP_RIGHT 0x2514 |
162 | #define BOXDRAW_UP_RIGHT 0x2514 |
163 | #define BOXDRAW_UP_LEFT 0x2518 |
163 | #define BOXDRAW_UP_LEFT 0x2518 |
164 | #define BOXDRAW_VERTICAL_RIGHT 0x251c |
164 | #define BOXDRAW_VERTICAL_RIGHT 0x251c |
165 | #define BOXDRAW_VERTICAL_LEFT 0x2524 |
165 | #define BOXDRAW_VERTICAL_LEFT 0x2524 |
166 | #define BOXDRAW_DOWN_HORIZONTAL 0x252c |
166 | #define BOXDRAW_DOWN_HORIZONTAL 0x252c |
167 | #define BOXDRAW_UP_HORIZONTAL 0x2534 |
167 | #define BOXDRAW_UP_HORIZONTAL 0x2534 |
168 | #define BOXDRAW_VERTICAL_HORIZONTAL 0x253c |
168 | #define BOXDRAW_VERTICAL_HORIZONTAL 0x253c |
169 | 169 | ||
170 | #define BOXDRAW_DOUBLE_HORIZONTAL 0x2550 |
170 | #define BOXDRAW_DOUBLE_HORIZONTAL 0x2550 |
171 | #define BOXDRAW_DOUBLE_VERTICAL 0x2551 |
171 | #define BOXDRAW_DOUBLE_VERTICAL 0x2551 |
172 | #define BOXDRAW_DOWN_RIGHT_DOUBLE 0x2552 |
172 | #define BOXDRAW_DOWN_RIGHT_DOUBLE 0x2552 |
173 | #define BOXDRAW_DOWN_DOUBLE_RIGHT 0x2553 |
173 | #define BOXDRAW_DOWN_DOUBLE_RIGHT 0x2553 |
174 | #define BOXDRAW_DOUBLE_DOWN_RIGHT 0x2554 |
174 | #define BOXDRAW_DOUBLE_DOWN_RIGHT 0x2554 |
175 | 175 | ||
176 | #define BOXDRAW_DOWN_LEFT_DOUBLE 0x2555 |
176 | #define BOXDRAW_DOWN_LEFT_DOUBLE 0x2555 |
177 | #define BOXDRAW_DOWN_DOUBLE_LEFT 0x2556 |
177 | #define BOXDRAW_DOWN_DOUBLE_LEFT 0x2556 |
178 | #define BOXDRAW_DOUBLE_DOWN_LEFT 0x2557 |
178 | #define BOXDRAW_DOUBLE_DOWN_LEFT 0x2557 |
179 | 179 | ||
180 | #define BOXDRAW_UP_RIGHT_DOUBLE 0x2558 |
180 | #define BOXDRAW_UP_RIGHT_DOUBLE 0x2558 |
181 | #define BOXDRAW_UP_DOUBLE_RIGHT 0x2559 |
181 | #define BOXDRAW_UP_DOUBLE_RIGHT 0x2559 |
182 | #define BOXDRAW_DOUBLE_UP_RIGHT 0x255a |
182 | #define BOXDRAW_DOUBLE_UP_RIGHT 0x255a |
183 | 183 | ||
184 | #define BOXDRAW_UP_LEFT_DOUBLE 0x255b |
184 | #define BOXDRAW_UP_LEFT_DOUBLE 0x255b |
185 | #define BOXDRAW_UP_DOUBLE_LEFT 0x255c |
185 | #define BOXDRAW_UP_DOUBLE_LEFT 0x255c |
186 | #define BOXDRAW_DOUBLE_UP_LEFT 0x255d |
186 | #define BOXDRAW_DOUBLE_UP_LEFT 0x255d |
187 | 187 | ||
188 | #define BOXDRAW_VERTICAL_RIGHT_DOUBLE 0x255e |
188 | #define BOXDRAW_VERTICAL_RIGHT_DOUBLE 0x255e |
189 | #define BOXDRAW_VERTICAL_DOUBLE_RIGHT 0x255f |
189 | #define BOXDRAW_VERTICAL_DOUBLE_RIGHT 0x255f |
190 | #define BOXDRAW_DOUBLE_VERTICAL_RIGHT 0x2560 |
190 | #define BOXDRAW_DOUBLE_VERTICAL_RIGHT 0x2560 |
191 | 191 | ||
192 | #define BOXDRAW_VERTICAL_LEFT_DOUBLE 0x2561 |
192 | #define BOXDRAW_VERTICAL_LEFT_DOUBLE 0x2561 |
193 | #define BOXDRAW_VERTICAL_DOUBLE_LEFT 0x2562 |
193 | #define BOXDRAW_VERTICAL_DOUBLE_LEFT 0x2562 |
194 | #define BOXDRAW_DOUBLE_VERTICAL_LEFT 0x2563 |
194 | #define BOXDRAW_DOUBLE_VERTICAL_LEFT 0x2563 |
195 | 195 | ||
196 | #define BOXDRAW_DOWN_HORIZONTAL_DOUBLE 0x2564 |
196 | #define BOXDRAW_DOWN_HORIZONTAL_DOUBLE 0x2564 |
197 | #define BOXDRAW_DOWN_DOUBLE_HORIZONTAL 0x2565 |
197 | #define BOXDRAW_DOWN_DOUBLE_HORIZONTAL 0x2565 |
198 | #define BOXDRAW_DOUBLE_DOWN_HORIZONTAL 0x2566 |
198 | #define BOXDRAW_DOUBLE_DOWN_HORIZONTAL 0x2566 |
199 | 199 | ||
200 | #define BOXDRAW_UP_HORIZONTAL_DOUBLE 0x2567 |
200 | #define BOXDRAW_UP_HORIZONTAL_DOUBLE 0x2567 |
201 | #define BOXDRAW_UP_DOUBLE_HORIZONTAL 0x2568 |
201 | #define BOXDRAW_UP_DOUBLE_HORIZONTAL 0x2568 |
202 | #define BOXDRAW_DOUBLE_UP_HORIZONTAL 0x2569 |
202 | #define BOXDRAW_DOUBLE_UP_HORIZONTAL 0x2569 |
203 | 203 | ||
204 | #define BOXDRAW_VERTICAL_HORIZONTAL_DOUBLE 0x256a |
204 | #define BOXDRAW_VERTICAL_HORIZONTAL_DOUBLE 0x256a |
205 | #define BOXDRAW_VERTICAL_DOUBLE_HORIZONTAL 0x256b |
205 | #define BOXDRAW_VERTICAL_DOUBLE_HORIZONTAL 0x256b |
206 | #define BOXDRAW_DOUBLE_VERTICAL_HORIZONTAL 0x256c |
206 | #define BOXDRAW_DOUBLE_VERTICAL_HORIZONTAL 0x256c |
207 | 207 | ||
208 | // |
208 | // |
209 | // EFI Required Block Elements Code Chart |
209 | // EFI Required Block Elements Code Chart |
210 | // |
210 | // |
211 | 211 | ||
212 | #define BLOCKELEMENT_FULL_BLOCK 0x2588 |
212 | #define BLOCKELEMENT_FULL_BLOCK 0x2588 |
213 | #define BLOCKELEMENT_LIGHT_SHADE 0x2591 |
213 | #define BLOCKELEMENT_LIGHT_SHADE 0x2591 |
214 | // |
214 | // |
215 | // EFI Required Geometric Shapes Code Chart |
215 | // EFI Required Geometric Shapes Code Chart |
216 | // |
216 | // |
217 | 217 | ||
218 | #define GEOMETRICSHAPE_UP_TRIANGLE 0x25b2 |
218 | #define GEOMETRICSHAPE_UP_TRIANGLE 0x25b2 |
219 | #define GEOMETRICSHAPE_RIGHT_TRIANGLE 0x25ba |
219 | #define GEOMETRICSHAPE_RIGHT_TRIANGLE 0x25ba |
220 | #define GEOMETRICSHAPE_DOWN_TRIANGLE 0x25bc |
220 | #define GEOMETRICSHAPE_DOWN_TRIANGLE 0x25bc |
221 | #define GEOMETRICSHAPE_LEFT_TRIANGLE 0x25c4 |
221 | #define GEOMETRICSHAPE_LEFT_TRIANGLE 0x25c4 |
222 | 222 | ||
223 | // |
223 | // |
224 | // EFI Required Arrow shapes |
224 | // EFI Required Arrow shapes |
225 | // |
225 | // |
226 | 226 | ||
227 | #define ARROW_UP 0x2191 |
227 | #define ARROW_UP 0x2191 |
228 | #define ARROW_DOWN 0x2193 |
228 | #define ARROW_DOWN 0x2193 |
229 | 229 | ||
230 | // |
230 | // |
231 | // Text input protocol |
231 | // Text input protocol |
232 | // |
232 | // |
233 | 233 | ||
234 | #define SIMPLE_TEXT_INPUT_PROTOCOL \ |
234 | #define SIMPLE_TEXT_INPUT_PROTOCOL \ |
235 | { 0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} } |
235 | { 0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} } |
236 | 236 | ||
237 | INTERFACE_DECL(_SIMPLE_INPUT_INTERFACE); |
237 | INTERFACE_DECL(_SIMPLE_INPUT_INTERFACE); |
238 | 238 | ||
239 | typedef struct { |
239 | typedef struct { |
240 | UINT16 ScanCode; |
240 | UINT16 ScanCode; |
241 | CHAR16 UnicodeChar; |
241 | CHAR16 UnicodeChar; |
242 | } EFI_INPUT_KEY; |
242 | } EFI_INPUT_KEY; |
243 | 243 | ||
244 | // |
244 | // |
245 | // Baseline unicode control chars |
245 | // Baseline unicode control chars |
246 | // |
246 | // |
247 | 247 | ||
248 | #define CHAR_NULL 0x0000 |
248 | #define CHAR_NULL 0x0000 |
249 | #define CHAR_BACKSPACE 0x0008 |
249 | #define CHAR_BACKSPACE 0x0008 |
250 | #define CHAR_TAB 0x0009 |
250 | #define CHAR_TAB 0x0009 |
251 | #define CHAR_LINEFEED 0x000A |
251 | #define CHAR_LINEFEED 0x000A |
252 | #define CHAR_CARRIAGE_RETURN 0x000D |
252 | #define CHAR_CARRIAGE_RETURN 0x000D |
253 | 253 | ||
254 | // |
254 | // |
255 | // Scan codes for base line keys |
255 | // Scan codes for base line keys |
256 | // |
256 | // |
257 | 257 | ||
258 | #define SCAN_NULL 0x0000 |
258 | #define SCAN_NULL 0x0000 |
259 | #define SCAN_UP 0x0001 |
259 | #define SCAN_UP 0x0001 |
260 | #define SCAN_DOWN 0x0002 |
260 | #define SCAN_DOWN 0x0002 |
261 | #define SCAN_RIGHT 0x0003 |
261 | #define SCAN_RIGHT 0x0003 |
262 | #define SCAN_LEFT 0x0004 |
262 | #define SCAN_LEFT 0x0004 |
263 | #define SCAN_HOME 0x0005 |
263 | #define SCAN_HOME 0x0005 |
264 | #define SCAN_END 0x0006 |
264 | #define SCAN_END 0x0006 |
265 | #define SCAN_INSERT 0x0007 |
265 | #define SCAN_INSERT 0x0007 |
266 | #define SCAN_DELETE 0x0008 |
266 | #define SCAN_DELETE 0x0008 |
267 | #define SCAN_PAGE_UP 0x0009 |
267 | #define SCAN_PAGE_UP 0x0009 |
268 | #define SCAN_PAGE_DOWN 0x000A |
268 | #define SCAN_PAGE_DOWN 0x000A |
269 | #define SCAN_F1 0x000B |
269 | #define SCAN_F1 0x000B |
270 | #define SCAN_F2 0x000C |
270 | #define SCAN_F2 0x000C |
271 | #define SCAN_F3 0x000D |
271 | #define SCAN_F3 0x000D |
272 | #define SCAN_F4 0x000E |
272 | #define SCAN_F4 0x000E |
273 | #define SCAN_F5 0x000F |
273 | #define SCAN_F5 0x000F |
274 | #define SCAN_F6 0x0010 |
274 | #define SCAN_F6 0x0010 |
275 | #define SCAN_F7 0x0011 |
275 | #define SCAN_F7 0x0011 |
276 | #define SCAN_F8 0x0012 |
276 | #define SCAN_F8 0x0012 |
277 | #define SCAN_F9 0x0013 |
277 | #define SCAN_F9 0x0013 |
278 | #define SCAN_F10 0x0014 |
278 | #define SCAN_F10 0x0014 |
279 | #define SCAN_ESC 0x0017 |
279 | #define SCAN_ESC 0x0017 |
280 | 280 | ||
281 | typedef |
281 | typedef |
282 | EFI_STATUS |
282 | EFI_STATUS |
283 | (EFIAPI *EFI_INPUT_RESET) ( |
283 | (EFIAPI *EFI_INPUT_RESET) ( |
284 | IN struct _SIMPLE_INPUT_INTERFACE *This, |
284 | IN struct _SIMPLE_INPUT_INTERFACE *This, |
285 | IN BOOLEAN ExtendedVerification |
285 | IN BOOLEAN ExtendedVerification |
286 | ); |
286 | ); |
287 | 287 | ||
288 | typedef |
288 | typedef |
289 | EFI_STATUS |
289 | EFI_STATUS |
290 | (EFIAPI *EFI_INPUT_READ_KEY) ( |
290 | (EFIAPI *EFI_INPUT_READ_KEY) ( |
291 | IN struct _SIMPLE_INPUT_INTERFACE *This, |
291 | IN struct _SIMPLE_INPUT_INTERFACE *This, |
292 | OUT EFI_INPUT_KEY *Key |
292 | OUT EFI_INPUT_KEY *Key |
293 | ); |
293 | ); |
294 | 294 | ||
295 | typedef struct _SIMPLE_INPUT_INTERFACE { |
295 | typedef struct _SIMPLE_INPUT_INTERFACE { |
296 | EFI_INPUT_RESET Reset; |
296 | EFI_INPUT_RESET Reset; |
297 | EFI_INPUT_READ_KEY ReadKeyStroke; |
297 | EFI_INPUT_READ_KEY ReadKeyStroke; |
298 | EFI_EVENT WaitForKey; |
298 | EFI_EVENT WaitForKey; |
299 | } SIMPLE_INPUT_INTERFACE; |
299 | } SIMPLE_INPUT_INTERFACE; |
300 | 300 | ||
301 | #endif |
301 | #endif |
302 | 302 | ||
303 | 303 |