]> git.proxmox.com Git - mirror_edk2.git/blob - Nt32Pkg/WinNtConsoleDxe/Console.h
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2920 6f19259b...
[mirror_edk2.git] / Nt32Pkg / WinNtConsoleDxe / Console.h
1 /*++
2
3 Copyright (c) 2006, 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
33 #define WIN_NT_SIMPLE_TEXT_PRIVATE_DATA_SIGNATURE \
34 EFI_SIGNATURE_32('N','T','s','c')
35
36 typedef struct {
37 UINT64 Signature;
38
39 EFI_HANDLE Handle;
40
41 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SimpleTextOut;
42 EFI_SIMPLE_TEXT_OUTPUT_MODE SimpleTextOutMode;
43
44 EFI_WIN_NT_IO_PROTOCOL *WinNtIo;
45 EFI_WIN_NT_THUNK_PROTOCOL *WinNtThunk;
46
47 //
48 // SimpleTextOut Private Data including Win32 types.
49 //
50 HANDLE NtOutHandle;
51 HANDLE NtInHandle;
52
53 COORD MaxScreenSize;
54 COORD Possition;
55 WORD Attribute;
56 BOOLEAN CursorEnable;
57
58 EFI_SIMPLE_TEXT_INPUT_PROTOCOL SimpleTextIn;
59
60 EFI_UNICODE_STRING_TABLE *ControllerNameTable;
61
62 } WIN_NT_SIMPLE_TEXT_PRIVATE_DATA;
63
64 #define WIN_NT_SIMPLE_TEXT_OUT_PRIVATE_DATA_FROM_THIS(a) \
65 CR(a, WIN_NT_SIMPLE_TEXT_PRIVATE_DATA, SimpleTextOut, WIN_NT_SIMPLE_TEXT_PRIVATE_DATA_SIGNATURE)
66
67 #define WIN_NT_SIMPLE_TEXT_IN_PRIVATE_DATA_FROM_THIS(a) \
68 CR(a, WIN_NT_SIMPLE_TEXT_PRIVATE_DATA, SimpleTextIn, WIN_NT_SIMPLE_TEXT_PRIVATE_DATA_SIGNATURE)
69
70 //
71 // Console Globale Variables
72 //
73 extern EFI_DRIVER_BINDING_PROTOCOL gWinNtConsoleDriverBinding;
74 extern EFI_COMPONENT_NAME_PROTOCOL gWinNtConsoleComponentName;
75
76 typedef struct {
77 UINTN ColumnsX;
78 UINTN RowsY;
79 } WIN_NT_SIMPLE_TEXT_OUT_MODE;
80
81 //
82 // Simple Text Out protocol member functions
83 //
84
85 STATIC
86 EFI_STATUS
87 EFIAPI
88 WinNtSimpleTextOutReset (
89 IN EFI_SIMPLE_TEXT_OUTPUT_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 WinNtSimpleTextOutOutputString (
114 IN EFI_SIMPLE_TEXT_OUTPUT_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 WinNtSimpleTextOutTestString (
139 IN EFI_SIMPLE_TEXT_OUTPUT_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 WinNtSimpleTextOutQueryMode (
164 IN EFI_SIMPLE_TEXT_OUTPUT_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 STATIC
190 EFI_STATUS
191 EFIAPI
192 WinNtSimpleTextOutSetMode (
193 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
194 IN UINTN ModeNumber
195 )
196 /*++
197
198 Routine Description:
199
200 TODO: Add function description
201
202 Arguments:
203
204 This - TODO: add argument description
205 ModeNumber - TODO: add argument description
206
207 Returns:
208
209 TODO: add return values
210
211 --*/
212 ;
213
214 STATIC
215 EFI_STATUS
216 EFIAPI
217 WinNtSimpleTextOutSetAttribute (
218 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
219 IN UINTN Attribute
220 )
221 /*++
222
223 Routine Description:
224
225 TODO: Add function description
226
227 Arguments:
228
229 This - TODO: add argument description
230 Attribute - TODO: add argument description
231
232 Returns:
233
234 TODO: add return values
235
236 --*/
237 ;
238
239 STATIC
240 EFI_STATUS
241 EFIAPI
242 WinNtSimpleTextOutClearScreen (
243 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This
244 )
245 /*++
246
247 Routine Description:
248
249 TODO: Add function description
250
251 Arguments:
252
253 This - TODO: add argument description
254
255 Returns:
256
257 TODO: add return values
258
259 --*/
260 ;
261
262 STATIC
263 EFI_STATUS
264 EFIAPI
265 WinNtSimpleTextOutSetCursorPosition (
266 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
267 IN UINTN Column,
268 IN UINTN Row
269 )
270 /*++
271
272 Routine Description:
273
274 TODO: Add function description
275
276 Arguments:
277
278 This - TODO: add argument description
279 Column - TODO: add argument description
280 Row - TODO: add argument description
281
282 Returns:
283
284 TODO: add return values
285
286 --*/
287 ;
288
289 STATIC
290 EFI_STATUS
291 EFIAPI
292 WinNtSimpleTextOutEnableCursor (
293 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
294 IN BOOLEAN Enable
295 )
296 /*++
297
298 Routine Description:
299
300 TODO: Add function description
301
302 Arguments:
303
304 This - TODO: add argument description
305 Enable - TODO: add argument description
306
307 Returns:
308
309 TODO: add return values
310
311 --*/
312 ;
313
314 //
315 // Simple Text Out constructor and destructor.
316 //
317 EFI_STATUS
318 WinNtSimpleTextOutOpenWindow (
319 IN OUT WIN_NT_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 WinNtSimpleTextOutCloseWindow (
340 IN OUT WIN_NT_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 //
360 // Simple Text In protocol member functions.
361 //
362 STATIC
363 EFI_STATUS
364 EFIAPI
365 WinNtSimpleTextInReset (
366 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
367 IN BOOLEAN ExtendedVerification
368 )
369 /*++
370
371 Routine Description:
372
373 TODO: Add function description
374
375 Arguments:
376
377 This - TODO: add argument description
378 ExtendedVerification - TODO: add argument description
379
380 Returns:
381
382 TODO: add return values
383
384 --*/
385 ;
386
387 STATIC
388 EFI_STATUS
389 EFIAPI
390 WinNtSimpleTextInReadKeyStroke (
391 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
392 OUT EFI_INPUT_KEY *Key
393 )
394 /*++
395
396 Routine Description:
397
398 TODO: Add function description
399
400 Arguments:
401
402 This - TODO: add argument description
403 Key - TODO: add argument description
404
405 Returns:
406
407 TODO: add return values
408
409 --*/
410 ;
411
412 STATIC
413 VOID
414 EFIAPI
415 WinNtSimpleTextInWaitForKey (
416 IN EFI_EVENT Event,
417 IN VOID *Context
418 )
419 /*++
420
421 Routine Description:
422
423 TODO: Add function description
424
425 Arguments:
426
427 Event - TODO: add argument description
428 Context - TODO: add argument description
429
430 Returns:
431
432 TODO: add return values
433
434 --*/
435 ;
436
437 //
438 // Simple Text In constructor
439 //
440 EFI_STATUS
441 WinNtSimpleTextInAttachToWindow (
442 IN WIN_NT_SIMPLE_TEXT_PRIVATE_DATA *Private
443 )
444 /*++
445
446 Routine Description:
447
448 TODO: Add function description
449
450 Arguments:
451
452 Private - TODO: add argument description
453
454 Returns:
455
456 TODO: add return values
457
458 --*/
459 ;
460
461 //
462 // Main Entry Point
463 //
464 EFI_STATUS
465 EFIAPI
466 InitializeWinNtConsole (
467 IN EFI_HANDLE ImageHandle,
468 IN EFI_SYSTEM_TABLE *SystemTable
469 )
470 /*++
471
472 Routine Description:
473
474 TODO: Add function description
475
476 Arguments:
477
478 ImageHandle - TODO: add argument description
479 SystemTable - TODO: add argument description
480
481 Returns:
482
483 TODO: add return values
484
485 --*/
486 ;
487
488 EFI_STATUS
489 AppendDevicePathInstanceToVar (
490 IN CHAR16 *VariableName,
491 IN EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance
492 )
493 /*++
494
495 Routine Description:
496
497 TODO: Add function description
498
499 Arguments:
500
501 VariableName - TODO: add argument description
502 DevicePathInstance - TODO: add argument description
503
504 Returns:
505
506 TODO: add return values
507
508 --*/
509 ;
510
511 #endif