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 Private data for the Gop driver that is bound to the WinNt Thunk protocol
23 #ifndef _WIN_NT_GOP_H_
24 #define _WIN_NT_GOP_H_
26 //@MT:#include "EfiWinNT.h"
27 //@MT:#include "Tiano.h"
28 //@MT:#include "EfiDriverLib.h"
31 // Driver Consumed Protocols
33 //@MT:#include EFI_PROTOCOL_DEFINITION (DevicePath)
34 //@MT:#include EFI_PROTOCOL_DEFINITION (WinNtIo)
37 // Driver Produced Protocols
39 //@MT:#include EFI_PROTOCOL_DEFINITION (DriverBinding)
40 //@MT:#include EFI_PROTOCOL_DEFINITION (ComponentName)
41 //@MT:#include EFI_PROTOCOL_DEFINITION (GraphicsOutput)
42 //@MT:#include "LinkedList.h"
50 EFI_INPUT_KEY Q
[MAX_Q
];
53 #define WIN_NT_GOP_CLASS_NAME L"WinNtGopWindow"
55 #define GOP_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('S', 'g', 'o', 'N')
57 #define GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER 0xffff
60 UINT32 HorizontalResolution
;
61 UINT32 VerticalResolution
;
70 EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput
;
71 EFI_SIMPLE_TEXT_INPUT_PROTOCOL SimpleTextIn
;
73 EFI_WIN_NT_THUNK_PROTOCOL
*WinNtThunk
;
75 EFI_UNICODE_STRING_TABLE
*ControllerNameTable
;
78 // GOP Private Data for QueryMode ()
80 GOP_MODE_DATA
*ModeData
;
83 // GOP Private Data knowing when to start hardware
85 BOOLEAN HardwareNeedsStarting
;
90 HANDLE ThreadInited
; // Semaphore
91 HANDLE ThreadHandle
; // Thread
95 WNDCLASSEX WindowsClass
;
98 // This screen is used to redraw the scree when windows events happen. It's
99 // updated in the main thread and displayed in the windows thread.
101 BITMAPV4HEADER
*VirtualScreenInfo
;
102 RGBQUAD
*VirtualScreen
;
104 EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*FillLine
;
107 // Keyboard Queue used by Simple Text In. WinProc thread adds, and main
110 CRITICAL_SECTION QCriticalSection
;
111 GOP_QUEUE_FIXED Queue
;
115 #define GOP_PRIVATE_DATA_FROM_THIS(a) \
116 CR(a, GOP_PRIVATE_DATA, GraphicsOutput, GOP_PRIVATE_DATA_SIGNATURE)
118 #define GOP_PRIVATE_DATA_FROM_TEXT_IN_THIS(a) \
119 CR(a, GOP_PRIVATE_DATA, SimpleTextIn, GOP_PRIVATE_DATA_SIGNATURE)
122 // Global Protocol Variables
124 extern EFI_DRIVER_BINDING_PROTOCOL gWinNtGopDriverBinding
;
125 extern EFI_COMPONENT_NAME_PROTOCOL gWinNtGopComponentName
;
128 // Gop Hardware abstraction internal worker functions
132 TODO: Add function description
134 @param WinNtIo TODO: add argument description
136 @return TODO: add return values
141 IN EFI_WIN_NT_IO_PROTOCOL
*WinNtIo
147 TODO: Add function description
149 @param Private TODO: add argument description
151 @return TODO: add return values
155 WinNtGopConstructor (
156 IN GOP_PRIVATE_DATA
*Private
162 TODO: Add function description
164 @param Private TODO: add argument description
166 @return TODO: add return values
171 IN GOP_PRIVATE_DATA
*Private
176 // EFI 1.1 driver model prototypes for Win NT GOP
181 TODO: Add function description
183 @param ImageHandle TODO: add argument description
184 @param SystemTable TODO: add argument description
186 @return TODO: add return values
192 IN EFI_HANDLE ImageHandle
,
193 IN EFI_SYSTEM_TABLE
*SystemTable
199 TODO: Add function description
201 @param This TODO: add argument description
202 @param Handle TODO: add argument description
203 @param RemainingDevicePath TODO: add argument description
205 @return TODO: add return values
210 WinNtGopDriverBindingSupported (
211 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
212 IN EFI_HANDLE Handle
,
213 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
219 TODO: Add function description
221 @param This TODO: add argument description
222 @param Handle TODO: add argument description
223 @param RemainingDevicePath TODO: add argument description
225 @return TODO: add return values
230 WinNtGopDriverBindingStart (
231 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
232 IN EFI_HANDLE Handle
,
233 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
239 TODO: Add function description
241 @param This TODO: add argument description
242 @param Handle TODO: add argument description
243 @param NumberOfChildren TODO: add argument description
244 @param ChildHandleBuffer TODO: add argument description
246 @return TODO: add return values
251 WinNtGopDriverBindingStop (
252 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
253 IN EFI_HANDLE Handle
,
254 IN UINTN NumberOfChildren
,
255 IN EFI_HANDLE
*ChildHandleBuffer
261 TODO: Add function description
263 @param Private TODO: add argument description
264 @param Key TODO: add argument description
266 @return TODO: add return values
271 IN GOP_PRIVATE_DATA
*Private
,
278 TODO: Add function description
280 @param Private TODO: add argument description
282 @return TODO: add return values
286 WinNtGopInitializeSimpleTextInForWindow (
287 IN GOP_PRIVATE_DATA
*Private
293 TODO: Add function description
295 @param Private TODO: add argument description
297 @return TODO: add return values
301 WinNtGopDestroySimpleTextInForWindow (
302 IN GOP_PRIVATE_DATA
*Private
308 TODO: Add function description
310 @param String TODO: add argument description
312 @return TODO: add return values