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
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.
18 Console based on Win32 APIs.
20 This file attaches a SimpleTextIn protocol to a previously open window.
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
33 #define WIN_NT_SIMPLE_TEXT_PRIVATE_DATA_SIGNATURE \
34 EFI_SIGNATURE_32('N','T','s','c')
41 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SimpleTextOut
;
42 EFI_SIMPLE_TEXT_OUTPUT_MODE SimpleTextOutMode
;
44 EFI_WIN_NT_IO_PROTOCOL
*WinNtIo
;
45 EFI_WIN_NT_THUNK_PROTOCOL
*WinNtThunk
;
48 // SimpleTextOut Private Data including Win32 types.
58 EFI_SIMPLE_TEXT_INPUT_PROTOCOL SimpleTextIn
;
60 EFI_UNICODE_STRING_TABLE
*ControllerNameTable
;
62 } WIN_NT_SIMPLE_TEXT_PRIVATE_DATA
;
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)
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)
71 // Console Globale Variables
73 extern EFI_DRIVER_BINDING_PROTOCOL gWinNtConsoleDriverBinding
;
74 extern EFI_COMPONENT_NAME_PROTOCOL gWinNtConsoleComponentName
;
79 } WIN_NT_SIMPLE_TEXT_OUT_MODE
;
82 // Simple Text Out protocol member functions
88 WinNtSimpleTextOutReset (
89 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
90 IN BOOLEAN ExtendedVerification
96 TODO: Add function description
100 This - TODO: add argument description
101 ExtendedVerification - TODO: add argument description
105 TODO: add return values
113 WinNtSimpleTextOutOutputString (
114 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
121 TODO: Add function description
125 This - TODO: add argument description
126 String - TODO: add argument description
130 TODO: add return values
138 WinNtSimpleTextOutTestString (
139 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
146 TODO: Add function description
150 This - TODO: add argument description
151 String - TODO: add argument description
155 TODO: add return values
163 WinNtSimpleTextOutQueryMode (
164 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
173 TODO: Add function description
177 This - TODO: add argument description
178 ModeNumber - TODO: add argument description
179 Columns - TODO: add argument description
180 Rows - TODO: add argument description
184 TODO: add return values
192 WinNtSimpleTextOutSetMode (
193 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
200 TODO: Add function description
204 This - TODO: add argument description
205 ModeNumber - TODO: add argument description
209 TODO: add return values
217 WinNtSimpleTextOutSetAttribute (
218 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
225 TODO: Add function description
229 This - TODO: add argument description
230 Attribute - TODO: add argument description
234 TODO: add return values
242 WinNtSimpleTextOutClearScreen (
243 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
249 TODO: Add function description
253 This - TODO: add argument description
257 TODO: add return values
265 WinNtSimpleTextOutSetCursorPosition (
266 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
274 TODO: Add function description
278 This - TODO: add argument description
279 Column - TODO: add argument description
280 Row - TODO: add argument description
284 TODO: add return values
292 WinNtSimpleTextOutEnableCursor (
293 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
300 TODO: Add function description
304 This - TODO: add argument description
305 Enable - TODO: add argument description
309 TODO: add return values
315 // Simple Text Out constructor and destructor.
318 WinNtSimpleTextOutOpenWindow (
319 IN OUT WIN_NT_SIMPLE_TEXT_PRIVATE_DATA
*Private
325 TODO: Add function description
329 Private - TODO: add argument description
333 TODO: add return values
339 WinNtSimpleTextOutCloseWindow (
340 IN OUT WIN_NT_SIMPLE_TEXT_PRIVATE_DATA
*Console
346 TODO: Add function description
350 Console - TODO: add argument description
354 TODO: add return values
360 // Simple Text In protocol member functions.
365 WinNtSimpleTextInReset (
366 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
367 IN BOOLEAN ExtendedVerification
373 TODO: Add function description
377 This - TODO: add argument description
378 ExtendedVerification - TODO: add argument description
382 TODO: add return values
390 WinNtSimpleTextInReadKeyStroke (
391 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
392 OUT EFI_INPUT_KEY
*Key
398 TODO: Add function description
402 This - TODO: add argument description
403 Key - TODO: add argument description
407 TODO: add return values
415 WinNtSimpleTextInWaitForKey (
423 TODO: Add function description
427 Event - TODO: add argument description
428 Context - TODO: add argument description
432 TODO: add return values
438 // Simple Text In constructor
441 WinNtSimpleTextInAttachToWindow (
442 IN WIN_NT_SIMPLE_TEXT_PRIVATE_DATA
*Private
448 TODO: Add function description
452 Private - TODO: add argument description
456 TODO: add return values
466 InitializeWinNtConsole (
467 IN EFI_HANDLE ImageHandle
,
468 IN EFI_SYSTEM_TABLE
*SystemTable
474 TODO: Add function description
478 ImageHandle - TODO: add argument description
479 SystemTable - TODO: add argument description
483 TODO: add return values
489 AppendDevicePathInstanceToVar (
490 IN CHAR16
*VariableName
,
491 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePathInstance
497 TODO: Add function description
501 VariableName - TODO: add argument description
502 DevicePathInstance - TODO: add argument description
506 TODO: add return values