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