]> git.proxmox.com Git - mirror_edk2.git/blob - UnixPkg/UnixUgaDxe/UnixUga.h
sync comments, fix function header, rename variable name to follow coding style.
[mirror_edk2.git] / UnixPkg / UnixUgaDxe / UnixUga.h
1 /*++
2
3 Copyright (c) 2006 - 2008, 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 UnixUga.h
15
16 Abstract:
17
18 Private data for the Uga driver that is bound to the Unix Thunk protocol
19
20 --*/
21
22 #ifndef _UNIX_UGA_H_
23 #define _UNIX_UGA_H_
24
25 #include "PiDxe.h"
26 #include <Guid/EventGroup.h>
27 #include <Protocol/SimpleTextIn.h>
28 #include <Protocol/UgaDraw.h>
29 #include "Protocol/UnixUgaIo.h"
30 #include <Library/DebugLib.h>
31 #include <Library/BaseLib.h>
32 #include <Library/UefiDriverEntryPoint.h>
33 #include <Library/UefiLib.h>
34 #include <Library/BaseMemoryLib.h>
35 #include <Library/MemoryAllocationLib.h>
36 #include <Library/UefiBootServicesTableLib.h>
37 #include "UnixDxe.h"
38
39 extern EFI_DRIVER_BINDING_PROTOCOL gUnixUgaDriverBinding;
40 extern EFI_COMPONENT_NAME_PROTOCOL gUnixUgaComponentName;
41
42 #define UNIX_UGA_CLASS_NAME L"UnixUgaWindow"
43
44 #define UGA_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('S', 'g', 'o', 'N')
45 typedef struct {
46 UINT64 Signature;
47
48 EFI_HANDLE Handle;
49 EFI_UGA_DRAW_PROTOCOL UgaDraw;
50 EFI_SIMPLE_TEXT_INPUT_PROTOCOL SimpleTextIn;
51
52 EFI_UNIX_THUNK_PROTOCOL *UnixThunk;
53
54 EFI_UNICODE_STRING_TABLE *ControllerNameTable;
55
56 //
57 // UGA Private Data for GetMode ()
58 //
59 UINT32 HorizontalResolution;
60 UINT32 VerticalResolution;
61 UINT32 ColorDepth;
62 UINT32 RefreshRate;
63
64 //
65 // UGA Private Data knowing when to start hardware
66 //
67 BOOLEAN HardwareNeedsStarting;
68
69 CHAR16 *WindowName;
70
71 EFI_UNIX_UGA_IO_PROTOCOL *UgaIo;
72
73 } UGA_PRIVATE_DATA;
74
75 #define UGA_DRAW_PRIVATE_DATA_FROM_THIS(a) \
76 CR(a, UGA_PRIVATE_DATA, UgaDraw, UGA_PRIVATE_DATA_SIGNATURE)
77
78 #define UGA_PRIVATE_DATA_FROM_TEXT_IN_THIS(a) \
79 CR(a, UGA_PRIVATE_DATA, SimpleTextIn, UGA_PRIVATE_DATA_SIGNATURE)
80
81 //
82 // Global Protocol Variables
83 //
84 extern EFI_DRIVER_BINDING_PROTOCOL gUnixUgaDriverBinding;
85 extern EFI_COMPONENT_NAME_PROTOCOL gUnixUgaComponentName;
86
87 //
88 // Uga Hardware abstraction internal worker functions
89 //
90 EFI_STATUS
91 UnixUgaSupported (
92 IN EFI_UNIX_IO_PROTOCOL *UnixIo
93 )
94 /*++
95
96 Routine Description:
97
98 TODO: Add function description
99
100 Arguments:
101
102 UnixIo - TODO: add argument description
103
104 Returns:
105
106 TODO: add return values
107
108 --*/
109 ;
110
111 EFI_STATUS
112 UnixUgaConstructor (
113 IN UGA_PRIVATE_DATA *Private
114 )
115 /*++
116
117 Routine Description:
118
119 TODO: Add function description
120
121 Arguments:
122
123 Private - TODO: add argument description
124
125 Returns:
126
127 TODO: add return values
128
129 --*/
130 ;
131
132 EFI_STATUS
133 UnixUgaDestructor (
134 IN UGA_PRIVATE_DATA *Private
135 )
136 /*++
137
138 Routine Description:
139
140 TODO: Add function description
141
142 Arguments:
143
144 Private - TODO: add argument description
145
146 Returns:
147
148 TODO: add return values
149
150 --*/
151 ;
152
153 //
154 // EFI 1.1 driver model prototypes for Win UNIX UGA
155 //
156
157 EFI_STATUS
158 EFIAPI
159 UnixUgaInitialize (
160 IN EFI_HANDLE ImageHandle,
161 IN EFI_SYSTEM_TABLE *SystemTable
162 )
163 /*++
164
165 Routine Description:
166
167 TODO: Add function description
168
169 Arguments:
170
171 ImageHandle - TODO: add argument description
172 SystemTable - TODO: add argument description
173
174 Returns:
175
176 TODO: add return values
177
178 --*/
179 ;
180
181 EFI_STATUS
182 EFIAPI
183 UnixUgaDriverBindingSupported (
184 IN EFI_DRIVER_BINDING_PROTOCOL *This,
185 IN EFI_HANDLE Handle,
186 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
187 )
188 /*++
189
190 Routine Description:
191
192 TODO: Add function description
193
194 Arguments:
195
196 This - TODO: add argument description
197 Handle - TODO: add argument description
198 RemainingDevicePath - TODO: add argument description
199
200 Returns:
201
202 TODO: add return values
203
204 --*/
205 ;
206
207 EFI_STATUS
208 EFIAPI
209 UnixUgaDriverBindingStart (
210 IN EFI_DRIVER_BINDING_PROTOCOL *This,
211 IN EFI_HANDLE Handle,
212 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
213 )
214 /*++
215
216 Routine Description:
217
218 TODO: Add function description
219
220 Arguments:
221
222 This - TODO: add argument description
223 Handle - TODO: add argument description
224 RemainingDevicePath - TODO: add argument description
225
226 Returns:
227
228 TODO: add return values
229
230 --*/
231 ;
232
233 EFI_STATUS
234 EFIAPI
235 UnixUgaDriverBindingStop (
236 IN EFI_DRIVER_BINDING_PROTOCOL *This,
237 IN EFI_HANDLE Handle,
238 IN UINTN NumberOfChildren,
239 IN EFI_HANDLE *ChildHandleBuffer
240 )
241 /*++
242
243 Routine Description:
244
245 TODO: Add function description
246
247 Arguments:
248
249 This - TODO: add argument description
250 Handle - TODO: add argument description
251 NumberOfChildren - TODO: add argument description
252 ChildHandleBuffer - TODO: add argument description
253
254 Returns:
255
256 TODO: add return values
257
258 --*/
259 ;
260
261 EFI_STATUS
262 UgaPrivateAddQ (
263 IN UGA_PRIVATE_DATA *Private,
264 IN EFI_INPUT_KEY Key
265 )
266 /*++
267
268 Routine Description:
269
270 TODO: Add function description
271
272 Arguments:
273
274 Private - TODO: add argument description
275 Key - TODO: add argument description
276
277 Returns:
278
279 TODO: add return values
280
281 --*/
282 ;
283
284 EFI_STATUS
285 UnixUgaInitializeSimpleTextInForWindow (
286 IN UGA_PRIVATE_DATA *Private
287 )
288 /*++
289
290 Routine Description:
291
292 TODO: Add function description
293
294 Arguments:
295
296 Private - TODO: add argument description
297
298 Returns:
299
300 TODO: add return values
301
302 --*/
303 ;
304 #endif