]> git.proxmox.com Git - mirror_edk2.git/blob - EdkUnixPkg/Dxe/UnixThunk/Bus/Console/Console.h
Unix version of EFI emulator
[mirror_edk2.git] / EdkUnixPkg / Dxe / UnixThunk / Bus / Console / Console.h
1 /*++
2
3 Copyright (c) 2004 - 2005, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 Console.h
15
16 Abstract:
17
18 Console based on Win32 APIs.
19
20 This file attaches a SimpleTextIn protocol to a previously open window.
21
22 The constructor for this protocol depends on an open window. Currently
23 the SimpleTextOut protocol creates a window when it's constructor is called.
24 Thus this code must run after the constructor for the SimpleTextOut
25 protocol
26
27 --*/
28
29 #ifndef _CONSOLE_H_
30 #define _CONSOLE_H_
31
32 #define UNIX_SIMPLE_TEXT_PRIVATE_DATA_SIGNATURE \
33 EFI_SIGNATURE_32('U','X','s','c')
34
35 typedef struct {
36 UINT64 Signature;
37
38 EFI_HANDLE Handle;
39
40 EFI_SIMPLE_TEXT_OUT_PROTOCOL SimpleTextOut;
41 EFI_SIMPLE_TEXT_OUTPUT_MODE SimpleTextOutMode;
42
43 EFI_UNIX_IO_PROTOCOL *UnixIo;
44 EFI_UNIX_THUNK_PROTOCOL *UnixThunk;
45
46 //
47 // SimpleTextOut Private Data including Win32 types.
48 //
49 // HANDLE NtOutHandle;
50 // HANDLE NtInHandle;
51
52 //COORD MaxScreenSize;
53 //COORD Position;
54 //WORD Attribute;
55 BOOLEAN CursorEnable;
56
57 EFI_SIMPLE_TEXT_IN_PROTOCOL SimpleTextIn;
58
59 EFI_UNICODE_STRING_TABLE *ControllerNameTable;
60
61 } UNIX_SIMPLE_TEXT_PRIVATE_DATA;
62
63 #define UNIX_SIMPLE_TEXT_OUT_PRIVATE_DATA_FROM_THIS(a) \
64 CR(a, UNIX_SIMPLE_TEXT_PRIVATE_DATA, SimpleTextOut, UNIX_SIMPLE_TEXT_PRIVATE_DATA_SIGNATURE)
65
66 #define UNIX_SIMPLE_TEXT_IN_PRIVATE_DATA_FROM_THIS(a) \
67 CR(a, UNIX_SIMPLE_TEXT_PRIVATE_DATA, SimpleTextIn, UNIX_SIMPLE_TEXT_PRIVATE_DATA_SIGNATURE)
68
69 //
70 // Console Globale Variables
71 //
72 extern EFI_DRIVER_BINDING_PROTOCOL gUnixConsoleDriverBinding;
73 extern EFI_COMPONENT_NAME_PROTOCOL gUnixConsoleComponentName;
74
75 typedef struct {
76 UINTN ColumnsX;
77 UINTN RowsY;
78 } UNIX_SIMPLE_TEXT_OUT_MODE;
79
80 #if 0
81 //
82 // Simple Text Out protocol member functions
83 //
84
85 STATIC
86 EFI_STATUS
87 EFIAPI
88 UnixSimpleTextOutReset (
89 IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
90 IN BOOLEAN ExtendedVerification
91 )
92 /*++
93
94 Routine Description:
95
96 TODO: Add function description
97
98 Arguments:
99
100 This - TODO: add argument description
101 ExtendedVerification - TODO: add argument description
102
103 Returns:
104
105 TODO: add return values
106
107 --*/
108 ;
109
110 STATIC
111 EFI_STATUS
112 EFIAPI
113 UnixSimpleTextOutOutputString (
114 IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
115 IN CHAR16 *String
116 )
117 /*++
118
119 Routine Description:
120
121 TODO: Add function description
122
123 Arguments:
124
125 This - TODO: add argument description
126 String - TODO: add argument description
127
128 Returns:
129
130 TODO: add return values
131
132 --*/
133 ;
134
135 STATIC
136 EFI_STATUS
137 EFIAPI
138 UnixSimpleTextOutTestString (
139 IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
140 IN CHAR16 *String
141 )
142 /*++
143
144 Routine Description:
145
146 TODO: Add function description
147
148 Arguments:
149
150 This - TODO: add argument description
151 String - TODO: add argument description
152
153 Returns:
154
155 TODO: add return values
156
157 --*/
158 ;
159
160 STATIC
161 EFI_STATUS
162 EFIAPI
163 UnixSimpleTextOutQueryMode (
164 IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
165 IN UINTN ModeNumber,
166 OUT UINTN *Columns,
167 OUT UINTN *Rows
168 )
169 /*++
170
171 Routine Description:
172
173 TODO: Add function description
174
175 Arguments:
176
177 This - TODO: add argument description
178 ModeNumber - TODO: add argument description
179 Columns - TODO: add argument description
180 Rows - TODO: add argument description
181
182 Returns:
183
184 TODO: add return values
185
186 --*/
187 ;
188
189 EFI_STATUS
190 EFIAPI
191 UnixSimpleTextOutSetMode (
192 IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
193 IN UINTN ModeNumber
194 )
195 /*++
196
197 Routine Description:
198
199 TODO: Add function description
200
201 Arguments:
202
203 This - TODO: add argument description
204 ModeNumber - TODO: add argument description
205
206 Returns:
207
208 TODO: add return values
209
210 --*/
211 ;
212
213 STATIC
214 EFI_STATUS
215 EFIAPI
216 UnixSimpleTextOutSetAttribute (
217 IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
218 IN UINTN Attribute
219 )
220 /*++
221
222 Routine Description:
223
224 TODO: Add function description
225
226 Arguments:
227
228 This - TODO: add argument description
229 Attribute - TODO: add argument description
230
231 Returns:
232
233 TODO: add return values
234
235 --*/
236 ;
237
238 STATIC
239 EFI_STATUS
240 EFIAPI
241 UnixSimpleTextOutClearScreen (
242 IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This
243 )
244 /*++
245
246 Routine Description:
247
248 TODO: Add function description
249
250 Arguments:
251
252 This - TODO: add argument description
253
254 Returns:
255
256 TODO: add return values
257
258 --*/
259 ;
260
261 STATIC
262 EFI_STATUS
263 EFIAPI
264 UnixSimpleTextOutSetCursorPosition (
265 IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
266 IN UINTN Column,
267 IN UINTN Row
268 )
269 /*++
270
271 Routine Description:
272
273 TODO: Add function description
274
275 Arguments:
276
277 This - TODO: add argument description
278 Column - TODO: add argument description
279 Row - TODO: add argument description
280
281 Returns:
282
283 TODO: add return values
284
285 --*/
286 ;
287
288 STATIC
289 EFI_STATUS
290 EFIAPI
291 UnixSimpleTextOutEnableCursor (
292 IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
293 IN BOOLEAN Enable
294 )
295 /*++
296
297 Routine Description:
298
299 TODO: Add function description
300
301 Arguments:
302
303 This - TODO: add argument description
304 Enable - TODO: add argument description
305
306 Returns:
307
308 TODO: add return values
309
310 --*/
311 ;
312
313 #endif
314 //
315 // Simple Text Out constructor and destructor.
316 //
317 EFI_STATUS
318 UnixSimpleTextOutOpenWindow (
319 IN OUT UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private
320 )
321 /*++
322
323 Routine Description:
324
325 TODO: Add function description
326
327 Arguments:
328
329 Private - TODO: add argument description
330
331 Returns:
332
333 TODO: add return values
334
335 --*/
336 ;
337
338 EFI_STATUS
339 UnixSimpleTextOutCloseWindow (
340 IN OUT UNIX_SIMPLE_TEXT_PRIVATE_DATA *Console
341 )
342 /*++
343
344 Routine Description:
345
346 TODO: Add function description
347
348 Arguments:
349
350 Console - TODO: add argument description
351
352 Returns:
353
354 TODO: add return values
355
356 --*/
357 ;
358
359 #if 0
360 //
361 // Simple Text In protocol member functions.
362 //
363 STATIC
364 EFI_STATUS
365 EFIAPI
366 UnixSimpleTextInReset (
367 IN EFI_SIMPLE_TEXT_IN_PROTOCOL *This,
368 IN BOOLEAN ExtendedVerification
369 )
370 /*++
371
372 Routine Description:
373
374 TODO: Add function description
375
376 Arguments:
377
378 This - TODO: add argument description
379 ExtendedVerification - TODO: add argument description
380
381 Returns:
382
383 TODO: add return values
384
385 --*/
386 ;
387
388 STATIC
389 EFI_STATUS
390 EFIAPI
391 UnixSimpleTextInReadKeyStroke (
392 IN EFI_SIMPLE_TEXT_IN_PROTOCOL *This,
393 OUT EFI_INPUT_KEY *Key
394 )
395 /*++
396
397 Routine Description:
398
399 TODO: Add function description
400
401 Arguments:
402
403 This - TODO: add argument description
404 Key - TODO: add argument description
405
406 Returns:
407
408 TODO: add return values
409
410 --*/
411 ;
412
413 STATIC
414 VOID
415 EFIAPI
416 UnixSimpleTextInWaitForKey (
417 IN EFI_EVENT Event,
418 IN VOID *Context
419 )
420 /*++
421
422 Routine Description:
423
424 TODO: Add function description
425
426 Arguments:
427
428 Event - TODO: add argument description
429 Context - TODO: add argument description
430
431 Returns:
432
433 TODO: add return values
434
435 --*/
436 ;
437
438 #endif
439 //
440 // Simple Text In constructor
441 //
442 EFI_STATUS
443 UnixSimpleTextInAttachToWindow (
444 IN UNIX_SIMPLE_TEXT_PRIVATE_DATA *Private
445 )
446 /*++
447
448 Routine Description:
449
450 TODO: Add function description
451
452 Arguments:
453
454 Private - TODO: add argument description
455
456 Returns:
457
458 TODO: add return values
459
460 --*/
461 ;
462
463 //
464 // Main Entry Point
465 //
466 EFI_STATUS
467 EFIAPI
468 InitializeUnixConsole (
469 IN EFI_HANDLE ImageHandle,
470 IN EFI_SYSTEM_TABLE *SystemTable
471 )
472 /*++
473
474 Routine Description:
475
476 TODO: Add function description
477
478 Arguments:
479
480 ImageHandle - TODO: add argument description
481 SystemTable - TODO: add argument description
482
483 Returns:
484
485 TODO: add return values
486
487 --*/
488 ;
489
490 EFI_STATUS
491 AppendDevicePathInstanceToVar (
492 IN CHAR16 *VariableName,
493 IN EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance
494 )
495 /*++
496
497 Routine Description:
498
499 TODO: Add function description
500
501 Arguments:
502
503 VariableName - TODO: add argument description
504 DevicePathInstance - TODO: add argument description
505
506 Returns:
507
508 TODO: add return values
509
510 --*/
511 ;
512
513 #endif