Obsoleted by new schema and new build tools.
[mirror_edk2.git] / EdkNt32Pkg / Dxe / WinNtThunk / Bus / Uga / WinNtUga.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 WinNtUga.h
15
16 Abstract:
17
18 Private data for the Uga driver that is bound to the WinNt Thunk protocol
19
20 --*/
21
22 #ifndef _WIN_NT_UGA_H_
23 #define _WIN_NT_UGA_H_
24
25
26
27 #define MAX_Q 256
28
29 typedef struct {
30 UINTN Front;
31 UINTN Rear;
32 UINTN Count;
33 EFI_INPUT_KEY Q[MAX_Q];
34 } UGA_QUEUE_FIXED;
35
36 #define WIN_NT_UGA_CLASS_NAME L"WinNtUgaWindow"
37
38 #define UGA_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('S', 'g', 'o', 'N')
39 typedef struct {
40 UINT64 Signature;
41
42 EFI_HANDLE Handle;
43 EFI_UGA_DRAW_PROTOCOL UgaDraw;
44 EFI_SIMPLE_TEXT_IN_PROTOCOL SimpleTextIn;
45
46 EFI_WIN_NT_THUNK_PROTOCOL *WinNtThunk;
47
48 EFI_UNICODE_STRING_TABLE *ControllerNameTable;
49
50 //
51 // UGA Private Data for GetMode ()
52 //
53 UINT32 HorizontalResolution;
54 UINT32 VerticalResolution;
55 UINT32 ColorDepth;
56 UINT32 RefreshRate;
57
58 //
59 // UGA Private Data knowing when to start hardware
60 //
61 BOOLEAN HardwareNeedsStarting;
62
63 CHAR16 *WindowName;
64 CHAR16 Buffer[160];
65
66 HANDLE ThreadInited; // Semaphore
67 HANDLE ThreadHandle; // Thread
68 DWORD ThreadId;
69
70 HWND WindowHandle;
71 WNDCLASSEX WindowsClass;
72
73 //
74 // This screen is used to redraw the scree when windows events happen. It's
75 // updated in the main thread and displayed in the windows thread.
76 //
77 BITMAPV4HEADER *VirtualScreenInfo;
78 RGBQUAD *VirtualScreen;
79
80 EFI_UGA_PIXEL *FillLine;
81
82 //
83 // Keyboard Queue used by Simple Text In. WinProc thread adds, and main
84 // thread removes.
85 //
86 CRITICAL_SECTION QCriticalSection;
87 UGA_QUEUE_FIXED Queue;
88
89 } UGA_PRIVATE_DATA;
90
91 #define UGA_DRAW_PRIVATE_DATA_FROM_THIS(a) \
92 CR(a, UGA_PRIVATE_DATA, UgaDraw, UGA_PRIVATE_DATA_SIGNATURE)
93
94 #define UGA_PRIVATE_DATA_FROM_TEXT_IN_THIS(a) \
95 CR(a, UGA_PRIVATE_DATA, SimpleTextIn, UGA_PRIVATE_DATA_SIGNATURE)
96
97 //
98 // Global Protocol Variables
99 //
100 extern EFI_DRIVER_BINDING_PROTOCOL gWinNtUgaDriverBinding;
101 extern EFI_COMPONENT_NAME_PROTOCOL gWinNtUgaComponentName;
102
103 //
104 // Uga Hardware abstraction internal worker functions
105 //
106 EFI_STATUS
107 WinNtUgaSupported (
108 IN EFI_WIN_NT_IO_PROTOCOL *WinNtIo
109 )
110 /*++
111
112 Routine Description:
113
114 TODO: Add function description
115
116 Arguments:
117
118 WinNtIo - TODO: add argument description
119
120 Returns:
121
122 TODO: add return values
123
124 --*/
125 ;
126
127 EFI_STATUS
128 WinNtUgaConstructor (
129 IN UGA_PRIVATE_DATA *Private
130 )
131 /*++
132
133 Routine Description:
134
135 TODO: Add function description
136
137 Arguments:
138
139 Private - TODO: add argument description
140
141 Returns:
142
143 TODO: add return values
144
145 --*/
146 ;
147
148 EFI_STATUS
149 WinNtUgaDestructor (
150 IN UGA_PRIVATE_DATA *Private
151 )
152 /*++
153
154 Routine Description:
155
156 TODO: Add function description
157
158 Arguments:
159
160 Private - TODO: add argument description
161
162 Returns:
163
164 TODO: add return values
165
166 --*/
167 ;
168
169 //
170 // EFI 1.1 driver model prototypes for Win NT UGA
171 //
172
173 EFI_STATUS
174 EFIAPI
175 WinNtUgaInitialize (
176 IN EFI_HANDLE ImageHandle,
177 IN EFI_SYSTEM_TABLE *SystemTable
178 )
179 /*++
180
181 Routine Description:
182
183 TODO: Add function description
184
185 Arguments:
186
187 ImageHandle - TODO: add argument description
188 SystemTable - TODO: add argument description
189
190 Returns:
191
192 TODO: add return values
193
194 --*/
195 ;
196
197 EFI_STATUS
198 EFIAPI
199 WinNtUgaDriverBindingSupported (
200 IN EFI_DRIVER_BINDING_PROTOCOL *This,
201 IN EFI_HANDLE Handle,
202 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
203 )
204 /*++
205
206 Routine Description:
207
208 TODO: Add function description
209
210 Arguments:
211
212 This - TODO: add argument description
213 Handle - TODO: add argument description
214 RemainingDevicePath - TODO: add argument description
215
216 Returns:
217
218 TODO: add return values
219
220 --*/
221 ;
222
223 EFI_STATUS
224 EFIAPI
225 WinNtUgaDriverBindingStart (
226 IN EFI_DRIVER_BINDING_PROTOCOL *This,
227 IN EFI_HANDLE Handle,
228 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
229 )
230 /*++
231
232 Routine Description:
233
234 TODO: Add function description
235
236 Arguments:
237
238 This - TODO: add argument description
239 Handle - TODO: add argument description
240 RemainingDevicePath - TODO: add argument description
241
242 Returns:
243
244 TODO: add return values
245
246 --*/
247 ;
248
249 EFI_STATUS
250 EFIAPI
251 WinNtUgaDriverBindingStop (
252 IN EFI_DRIVER_BINDING_PROTOCOL *This,
253 IN EFI_HANDLE Handle,
254 IN UINTN NumberOfChildren,
255 IN EFI_HANDLE *ChildHandleBuffer
256 )
257 /*++
258
259 Routine Description:
260
261 TODO: Add function description
262
263 Arguments:
264
265 This - TODO: add argument description
266 Handle - TODO: add argument description
267 NumberOfChildren - TODO: add argument description
268 ChildHandleBuffer - TODO: add argument description
269
270 Returns:
271
272 TODO: add return values
273
274 --*/
275 ;
276
277 EFI_STATUS
278 UgaPrivateAddQ (
279 IN UGA_PRIVATE_DATA *Private,
280 IN EFI_INPUT_KEY Key
281 )
282 /*++
283
284 Routine Description:
285
286 TODO: Add function description
287
288 Arguments:
289
290 Private - TODO: add argument description
291 Key - TODO: add argument description
292
293 Returns:
294
295 TODO: add return values
296
297 --*/
298 ;
299
300 EFI_STATUS
301 WinNtUgaInitializeSimpleTextInForWindow (
302 IN UGA_PRIVATE_DATA *Private
303 )
304 /*++
305
306 Routine Description:
307
308 TODO: Add function description
309
310 Arguments:
311
312 Private - TODO: add argument description
313
314 Returns:
315
316 TODO: add return values
317
318 --*/
319 ;
320
321 EFI_STATUS
322 WinNtUgaDestroySimpleTextInForWindow (
323 IN UGA_PRIVATE_DATA *Private
324 )
325 /*++
326
327 Routine Description:
328
329 TODO: Add function description
330
331 Arguments:
332
333 Private - TODO: add argument description
334
335 Returns:
336
337 TODO: add return values
338
339 --*/
340 ;
341
342 UINTN
343 Atoi (
344 IN CHAR16 *String
345 )
346 /*++
347
348 Routine Description:
349
350 TODO: Add function description
351
352 Arguments:
353
354 String - TODO: add argument description
355
356 Returns:
357
358 TODO: add return values
359
360 --*/
361 ;
362
363 #endif