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
;
75 extern EFI_COMPONENT_NAME2_PROTOCOL gWinNtConsoleComponentName2
;
80 } WIN_NT_SIMPLE_TEXT_OUT_MODE
;
83 // Simple Text Out protocol member functions
89 WinNtSimpleTextOutReset (
90 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
91 IN BOOLEAN ExtendedVerification
97 TODO: Add function description
101 This - TODO: add argument description
102 ExtendedVerification - TODO: add argument description
106 TODO: add return values
114 WinNtSimpleTextOutOutputString (
115 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
122 TODO: Add function description
126 This - TODO: add argument description
127 String - TODO: add argument description
131 TODO: add return values
139 WinNtSimpleTextOutTestString (
140 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
147 TODO: Add function description
151 This - TODO: add argument description
152 String - TODO: add argument description
156 TODO: add return values
164 WinNtSimpleTextOutQueryMode (
165 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
174 TODO: Add function description
178 This - TODO: add argument description
179 ModeNumber - TODO: add argument description
180 Columns - TODO: add argument description
181 Rows - TODO: add argument description
185 TODO: add return values
193 WinNtSimpleTextOutSetMode (
194 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
201 TODO: Add function description
205 This - TODO: add argument description
206 ModeNumber - TODO: add argument description
210 TODO: add return values
218 WinNtSimpleTextOutSetAttribute (
219 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
226 TODO: Add function description
230 This - TODO: add argument description
231 Attribute - TODO: add argument description
235 TODO: add return values
243 WinNtSimpleTextOutClearScreen (
244 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
250 TODO: Add function description
254 This - TODO: add argument description
258 TODO: add return values
266 WinNtSimpleTextOutSetCursorPosition (
267 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
275 TODO: Add function description
279 This - TODO: add argument description
280 Column - TODO: add argument description
281 Row - TODO: add argument description
285 TODO: add return values
293 WinNtSimpleTextOutEnableCursor (
294 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL
*This
,
301 TODO: Add function description
305 This - TODO: add argument description
306 Enable - TODO: add argument description
310 TODO: add return values
316 // Simple Text Out constructor and destructor.
319 WinNtSimpleTextOutOpenWindow (
320 IN OUT WIN_NT_SIMPLE_TEXT_PRIVATE_DATA
*Private
326 TODO: Add function description
330 Private - TODO: add argument description
334 TODO: add return values
340 WinNtSimpleTextOutCloseWindow (
341 IN OUT WIN_NT_SIMPLE_TEXT_PRIVATE_DATA
*Console
347 TODO: Add function description
351 Console - TODO: add argument description
355 TODO: add return values
361 // Simple Text In protocol member functions.
366 WinNtSimpleTextInReset (
367 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
368 IN BOOLEAN ExtendedVerification
374 TODO: Add function description
378 This - TODO: add argument description
379 ExtendedVerification - TODO: add argument description
383 TODO: add return values
391 WinNtSimpleTextInReadKeyStroke (
392 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL
*This
,
393 OUT EFI_INPUT_KEY
*Key
399 TODO: Add function description
403 This - TODO: add argument description
404 Key - TODO: add argument description
408 TODO: add return values
416 WinNtSimpleTextInWaitForKey (
424 TODO: Add function description
428 Event - TODO: add argument description
429 Context - TODO: add argument description
433 TODO: add return values
439 // Simple Text In constructor
442 WinNtSimpleTextInAttachToWindow (
443 IN WIN_NT_SIMPLE_TEXT_PRIVATE_DATA
*Private
449 TODO: Add function description
453 Private - TODO: add argument description
457 TODO: add return values
467 InitializeWinNtConsole (
468 IN EFI_HANDLE ImageHandle
,
469 IN EFI_SYSTEM_TABLE
*SystemTable
475 TODO: Add function description
479 ImageHandle - TODO: add argument description
480 SystemTable - TODO: add argument description
484 TODO: add return values
490 AppendDevicePathInstanceToVar (
491 IN CHAR16
*VariableName
,
492 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePathInstance
498 TODO: Add function description
502 VariableName - TODO: add argument description
503 DevicePathInstance - TODO: add argument description
507 TODO: add return values