]>
Commit | Line | Data |
---|---|---|
ac644614 | 1 | /** @file\r |
e90b081a | 2 | Private structures definitions in HiiDatabase.\r |
ac644614 | 3 | \r |
e5c861ac | 4 | Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r |
e5eed7d3 | 5 | This program and the accompanying materials\r |
ac644614 | 6 | are licensed and made available under the terms and conditions of the BSD License\r |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
ac644614 | 13 | **/\r |
14 | \r | |
15 | #ifndef __HII_DATABASE_PRIVATE_H__\r | |
16 | #define __HII_DATABASE_PRIVATE_H__\r | |
17 | \r | |
60c93673 | 18 | #include <Uefi.h>\r |
ac644614 | 19 | \r |
ac644614 | 20 | #include <Protocol/DevicePath.h>\r |
21 | #include <Protocol/HiiFont.h>\r | |
22 | #include <Protocol/HiiImage.h>\r | |
23 | #include <Protocol/HiiString.h>\r | |
24 | #include <Protocol/HiiDatabase.h>\r | |
25 | #include <Protocol/HiiConfigRouting.h>\r | |
26 | #include <Protocol/HiiConfigAccess.h>\r | |
27 | #include <Protocol/SimpleTextOut.h>\r | |
28 | \r | |
29 | #include <Guid/HiiKeyBoardLayout.h>\r | |
b9982883 | 30 | #include <Guid/GlobalVariable.h>\r |
ac644614 | 31 | \r |
32 | \r | |
33 | #include <Library/DebugLib.h>\r | |
34 | #include <Library/BaseMemoryLib.h>\r | |
35 | #include <Library/UefiDriverEntryPoint.h>\r | |
36 | #include <Library/UefiBootServicesTableLib.h>\r | |
37 | #include <Library/BaseLib.h>\r | |
38 | #include <Library/DevicePathLib.h>\r | |
39 | #include <Library/MemoryAllocationLib.h>\r | |
c27eb358 | 40 | #include <Library/UefiLib.h>\r |
e94358a3 | 41 | #include <Library/PcdLib.h>\r |
8db9d51d | 42 | #include <Library/UefiRuntimeServicesTableLib.h>\r |
63d55bb9 | 43 | #include <Library/PrintLib.h>\r |
8db9d51d | 44 | \r |
ac644614 | 45 | #define MAX_STRING_LENGTH 1024\r |
46 | #define MAX_FONT_NAME_LEN 256\r | |
47 | #define NARROW_BASELINE 15\r | |
48 | #define WIDE_BASELINE 14\r | |
49 | #define SYS_FONT_INFO_MASK 0x37\r | |
50 | #define REPLACE_UNKNOWN_GLYPH 0xFFFD\r | |
51 | #define PROPORTIONAL_GLYPH 0x80\r | |
52 | #define NARROW_GLYPH 0x40\r | |
53 | \r | |
54 | #define BITMAP_LEN_1_BIT(Width, Height) (((Width) + 7) / 8 * (Height))\r | |
55 | #define BITMAP_LEN_4_BIT(Width, Height) (((Width) + 1) / 2 * (Height))\r | |
56 | #define BITMAP_LEN_8_BIT(Width, Height) ((Width) * (Height))\r | |
57 | #define BITMAP_LEN_24_BIT(Width, Height) ((Width) * (Height) * 3)\r | |
58 | \r | |
84f9a9ec LG |
59 | //\r |
60 | // IFR data structure\r | |
61 | //\r | |
62 | // BASE_CR (a, IFR_DEFAULT_VALUE_DATA, Entry) to get the whole structure.\r | |
63 | \r | |
64 | typedef struct {\r | |
65 | LIST_ENTRY Entry; // Link to VarStorage\r | |
66 | EFI_GUID Guid;\r | |
67 | CHAR16 *Name;\r | |
68 | EFI_VARSTORE_ID VarStoreId;\r | |
69 | UINT16 Size;\r | |
70 | LIST_ENTRY BlockEntry; // Link to its Block array\r | |
71 | } IFR_VARSTORAGE_DATA;\r | |
72 | \r | |
73 | typedef struct {\r | |
74 | LIST_ENTRY Entry; // Link to Block array\r | |
75 | UINT16 Offset;\r | |
76 | UINT16 Width;\r | |
77 | EFI_QUESTION_ID QuestionId;\r | |
78 | UINT8 OpCode;\r | |
79 | UINT8 Scope;\r | |
80 | LIST_ENTRY DefaultValueEntry; // Link to its default value array\r | |
81 | } IFR_BLOCK_DATA;\r | |
82 | \r | |
ef40f0f6 ED |
83 | //\r |
84 | // Get default value from IFR data.\r | |
85 | //\r | |
86 | typedef enum {\r | |
eb5e7d3e ED |
87 | DefaultValueFromDefault = 0, // Get from the minimum or first one when not set default value.\r |
88 | DefaultValueFromFlag, // Get default value from the defalut flag.\r | |
89 | DefaultValueFromOpcode // Get default value from default opcode, highest priority.\r | |
ef40f0f6 ED |
90 | } DEFAULT_VALUE_TYPE;\r |
91 | \r | |
84f9a9ec LG |
92 | typedef struct {\r |
93 | LIST_ENTRY Entry;\r | |
ef40f0f6 ED |
94 | DEFAULT_VALUE_TYPE Type;\r |
95 | BOOLEAN Cleaned; // Whether this value is cleaned\r | |
96 | // TRUE Cleaned, the value can't be used\r | |
97 | // FALSE Not cleaned, the value can be used.\r | |
84f9a9ec | 98 | UINT16 DefaultId;\r |
e7fd76d1 | 99 | EFI_IFR_TYPE_VALUE Value;\r |
84f9a9ec LG |
100 | } IFR_DEFAULT_DATA;\r |
101 | \r | |
ac644614 | 102 | //\r |
103 | // Storage types\r | |
104 | //\r | |
105 | #define EFI_HII_VARSTORE_BUFFER 0\r | |
106 | #define EFI_HII_VARSTORE_NAME_VALUE 1\r | |
107 | #define EFI_HII_VARSTORE_EFI_VARIABLE 2\r | |
108 | \r | |
f3f2e05d | 109 | #define HII_FORMSET_STORAGE_SIGNATURE SIGNATURE_32 ('H', 'S', 'T', 'G')\r |
ac644614 | 110 | typedef struct {\r |
111 | UINTN Signature;\r | |
112 | LIST_ENTRY Entry;\r | |
113 | \r | |
114 | EFI_HII_HANDLE HiiHandle;\r | |
115 | EFI_HANDLE DriverHandle;\r | |
116 | \r | |
117 | UINT8 Type; // EFI_HII_VARSTORE_BUFFER, EFI_HII_VARSTORE_NAME_VALUE, EFI_HII_VARSTORE_EFI_VARIABLE\r | |
118 | EFI_GUID Guid;\r | |
119 | CHAR16 *Name;\r | |
120 | UINT16 Size;\r | |
121 | } HII_FORMSET_STORAGE;\r | |
122 | \r | |
ac644614 | 123 | \r |
124 | //\r | |
125 | // String Package definitions\r | |
126 | //\r | |
f3f2e05d | 127 | #define HII_STRING_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','s','p')\r |
ac644614 | 128 | typedef struct _HII_STRING_PACKAGE_INSTANCE {\r |
129 | UINTN Signature;\r | |
130 | EFI_HII_STRING_PACKAGE_HDR *StringPkgHdr;\r | |
131 | UINT8 *StringBlock;\r | |
132 | LIST_ENTRY StringEntry;\r | |
133 | LIST_ENTRY FontInfoList; // local font info list\r | |
134 | UINT8 FontId;\r | |
d6a82eaf | 135 | EFI_STRING_ID MaxStringId; // record StringId\r |
ac644614 | 136 | } HII_STRING_PACKAGE_INSTANCE;\r |
137 | \r | |
138 | //\r | |
139 | // Form Package definitions\r | |
140 | //\r | |
f3f2e05d | 141 | #define HII_IFR_PACKAGE_SIGNATURE SIGNATURE_32 ('h','f','r','p')\r |
ac644614 | 142 | typedef struct _HII_IFR_PACKAGE_INSTANCE {\r |
143 | UINTN Signature;\r | |
144 | EFI_HII_PACKAGE_HEADER FormPkgHdr;\r | |
145 | UINT8 *IfrData;\r | |
146 | LIST_ENTRY IfrEntry;\r | |
147 | } HII_IFR_PACKAGE_INSTANCE;\r | |
148 | \r | |
149 | //\r | |
150 | // Simple Font Package definitions\r | |
151 | //\r | |
f3f2e05d | 152 | #define HII_S_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','s','f','p')\r |
ac644614 | 153 | typedef struct _HII_SIMPLE_FONT_PACKAGE_INSTANCE {\r |
154 | UINTN Signature;\r | |
155 | EFI_HII_SIMPLE_FONT_PACKAGE_HDR *SimpleFontPkgHdr;\r | |
156 | LIST_ENTRY SimpleFontEntry;\r | |
157 | } HII_SIMPLE_FONT_PACKAGE_INSTANCE;\r | |
158 | \r | |
159 | //\r | |
160 | // Font Package definitions\r | |
161 | //\r | |
f3f2e05d | 162 | #define HII_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','f','p')\r |
ac644614 | 163 | typedef struct _HII_FONT_PACKAGE_INSTANCE {\r |
164 | UINTN Signature;\r | |
165 | EFI_HII_FONT_PACKAGE_HDR *FontPkgHdr;\r | |
f6cf5cf8 LG |
166 | UINT16 Height;\r |
167 | UINT16 BaseLine;\r | |
ac644614 | 168 | UINT8 *GlyphBlock;\r |
169 | LIST_ENTRY FontEntry;\r | |
170 | LIST_ENTRY GlyphInfoList;\r | |
171 | } HII_FONT_PACKAGE_INSTANCE;\r | |
172 | \r | |
f3f2e05d | 173 | #define HII_GLYPH_INFO_SIGNATURE SIGNATURE_32 ('h','g','i','s')\r |
ac644614 | 174 | typedef struct _HII_GLYPH_INFO {\r |
175 | UINTN Signature;\r | |
176 | LIST_ENTRY Entry;\r | |
177 | CHAR16 CharId;\r | |
178 | EFI_HII_GLYPH_INFO Cell;\r | |
179 | } HII_GLYPH_INFO;\r | |
180 | \r | |
f3f2e05d | 181 | #define HII_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','l','f','i')\r |
ac644614 | 182 | typedef struct _HII_FONT_INFO {\r |
183 | UINTN Signature;\r | |
184 | LIST_ENTRY Entry;\r | |
185 | LIST_ENTRY *GlobalEntry;\r | |
186 | UINT8 FontId;\r | |
187 | } HII_FONT_INFO;\r | |
188 | \r | |
f3f2e05d | 189 | #define HII_GLOBAL_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','g','f','i')\r |
ac644614 | 190 | typedef struct _HII_GLOBAL_FONT_INFO {\r |
191 | UINTN Signature;\r | |
192 | LIST_ENTRY Entry;\r | |
193 | HII_FONT_PACKAGE_INSTANCE *FontPackage;\r | |
194 | UINTN FontInfoSize;\r | |
195 | EFI_FONT_INFO *FontInfo;\r | |
196 | } HII_GLOBAL_FONT_INFO;\r | |
197 | \r | |
198 | //\r | |
199 | // Image Package definitions\r | |
200 | //\r | |
201 | \r | |
202 | #define HII_PIXEL_MASK 0x80\r | |
203 | \r | |
204 | typedef struct _HII_IMAGE_PACKAGE_INSTANCE {\r | |
205 | EFI_HII_IMAGE_PACKAGE_HDR ImagePkgHdr;\r | |
206 | UINT32 ImageBlockSize;\r | |
207 | UINT32 PaletteInfoSize;\r | |
208 | UINT8 *ImageBlock;\r | |
209 | UINT8 *PaletteBlock;\r | |
210 | } HII_IMAGE_PACKAGE_INSTANCE;\r | |
211 | \r | |
212 | //\r | |
213 | // Keyboard Layout Pacakge definitions\r | |
214 | //\r | |
f3f2e05d | 215 | #define HII_KB_LAYOUT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','k','l','p')\r |
ac644614 | 216 | typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE {\r |
217 | UINTN Signature;\r | |
218 | UINT8 *KeyboardPkg;\r | |
219 | LIST_ENTRY KeyboardEntry;\r | |
220 | } HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE;\r | |
221 | \r | |
222 | //\r | |
223 | // Guid Package definitions\r | |
224 | //\r | |
f3f2e05d | 225 | #define HII_GUID_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','g','p')\r |
ac644614 | 226 | typedef struct _HII_GUID_PACKAGE_INSTANCE {\r |
227 | UINTN Signature;\r | |
228 | UINT8 *GuidPkg;\r | |
229 | LIST_ENTRY GuidEntry;\r | |
230 | } HII_GUID_PACKAGE_INSTANCE;\r | |
231 | \r | |
232 | //\r | |
233 | // A package list can contain only one or less than one device path package.\r | |
234 | // This rule also applies to image package since ImageId can not be duplicate.\r | |
235 | //\r | |
236 | typedef struct _HII_DATABASE_PACKAGE_LIST_INSTANCE {\r | |
237 | EFI_HII_PACKAGE_LIST_HEADER PackageListHdr;\r | |
238 | LIST_ENTRY GuidPkgHdr;\r | |
239 | LIST_ENTRY FormPkgHdr;\r | |
240 | LIST_ENTRY KeyboardLayoutHdr;\r | |
241 | LIST_ENTRY StringPkgHdr;\r | |
242 | LIST_ENTRY FontPkgHdr;\r | |
243 | HII_IMAGE_PACKAGE_INSTANCE *ImagePkg;\r | |
244 | LIST_ENTRY SimpleFontPkgHdr;\r | |
245 | UINT8 *DevicePathPkg;\r | |
246 | } HII_DATABASE_PACKAGE_LIST_INSTANCE;\r | |
247 | \r | |
f3f2e05d | 248 | #define HII_HANDLE_SIGNATURE SIGNATURE_32 ('h','i','h','l')\r |
ac644614 | 249 | \r |
250 | typedef struct {\r | |
251 | UINTN Signature;\r | |
252 | LIST_ENTRY Handle;\r | |
253 | UINTN Key;\r | |
254 | } HII_HANDLE;\r | |
255 | \r | |
f3f2e05d | 256 | #define HII_DATABASE_RECORD_SIGNATURE SIGNATURE_32 ('h','i','d','r')\r |
ac644614 | 257 | \r |
258 | typedef struct _HII_DATABASE_RECORD {\r | |
259 | UINTN Signature;\r | |
260 | HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList;\r | |
261 | EFI_HANDLE DriverHandle;\r | |
262 | EFI_HII_HANDLE Handle;\r | |
263 | LIST_ENTRY DatabaseEntry;\r | |
264 | } HII_DATABASE_RECORD;\r | |
265 | \r | |
f3f2e05d | 266 | #define HII_DATABASE_NOTIFY_SIGNATURE SIGNATURE_32 ('h','i','d','n')\r |
ac644614 | 267 | \r |
268 | typedef struct _HII_DATABASE_NOTIFY {\r | |
269 | UINTN Signature;\r | |
270 | EFI_HANDLE NotifyHandle;\r | |
271 | UINT8 PackageType;\r | |
272 | EFI_GUID *PackageGuid;\r | |
273 | EFI_HII_DATABASE_NOTIFY PackageNotifyFn;\r | |
274 | EFI_HII_DATABASE_NOTIFY_TYPE NotifyType;\r | |
275 | LIST_ENTRY DatabaseNotifyEntry;\r | |
276 | } HII_DATABASE_NOTIFY;\r | |
277 | \r | |
f3f2e05d | 278 | #define HII_DATABASE_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('H', 'i', 'D', 'p')\r |
ac644614 | 279 | \r |
280 | typedef struct _HII_DATABASE_PRIVATE_DATA {\r | |
281 | UINTN Signature;\r | |
282 | LIST_ENTRY DatabaseList;\r | |
283 | LIST_ENTRY DatabaseNotifyList;\r | |
284 | EFI_HII_FONT_PROTOCOL HiiFont;\r | |
ac644614 | 285 | EFI_HII_IMAGE_PROTOCOL HiiImage;\r |
ac644614 | 286 | EFI_HII_STRING_PROTOCOL HiiString;\r |
287 | EFI_HII_DATABASE_PROTOCOL HiiDatabase;\r | |
288 | EFI_HII_CONFIG_ROUTING_PROTOCOL ConfigRouting;\r | |
289 | LIST_ENTRY HiiHandleList;\r | |
290 | INTN HiiHandleCount;\r | |
291 | LIST_ENTRY FontInfoList; // global font info list\r | |
292 | UINTN Attribute; // default system color\r | |
293 | EFI_GUID CurrentLayoutGuid;\r | |
294 | EFI_HII_KEYBOARD_LAYOUT *CurrentLayout;\r | |
295 | } HII_DATABASE_PRIVATE_DATA;\r | |
296 | \r | |
297 | #define HII_FONT_DATABASE_PRIVATE_DATA_FROM_THIS(a) \\r | |
298 | CR (a, \\r | |
299 | HII_DATABASE_PRIVATE_DATA, \\r | |
300 | HiiFont, \\r | |
301 | HII_DATABASE_PRIVATE_DATA_SIGNATURE \\r | |
302 | )\r | |
303 | \r | |
304 | #define HII_IMAGE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \\r | |
305 | CR (a, \\r | |
306 | HII_DATABASE_PRIVATE_DATA, \\r | |
307 | HiiImage, \\r | |
308 | HII_DATABASE_PRIVATE_DATA_SIGNATURE \\r | |
309 | )\r | |
310 | \r | |
311 | #define HII_STRING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \\r | |
312 | CR (a, \\r | |
313 | HII_DATABASE_PRIVATE_DATA, \\r | |
314 | HiiString, \\r | |
315 | HII_DATABASE_PRIVATE_DATA_SIGNATURE \\r | |
316 | )\r | |
317 | \r | |
318 | #define HII_DATABASE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \\r | |
319 | CR (a, \\r | |
320 | HII_DATABASE_PRIVATE_DATA, \\r | |
321 | HiiDatabase, \\r | |
322 | HII_DATABASE_PRIVATE_DATA_SIGNATURE \\r | |
323 | )\r | |
324 | \r | |
325 | #define CONFIG_ROUTING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \\r | |
326 | CR (a, \\r | |
327 | HII_DATABASE_PRIVATE_DATA, \\r | |
328 | ConfigRouting, \\r | |
329 | HII_DATABASE_PRIVATE_DATA_SIGNATURE \\r | |
330 | )\r | |
331 | \r | |
332 | //\r | |
333 | // Internal function prototypes.\r | |
334 | //\r | |
335 | \r | |
336 | /**\r | |
e90b081a | 337 | This function checks whether a handle is a valid EFI_HII_HANDLE.\r |
ac644614 | 338 | \r |
339 | @param Handle Pointer to a EFI_HII_HANDLE\r | |
340 | \r | |
341 | @retval TRUE Valid\r | |
342 | @retval FALSE Invalid\r | |
343 | \r | |
344 | **/\r | |
345 | BOOLEAN\r | |
346 | IsHiiHandleValid (\r | |
347 | EFI_HII_HANDLE Handle\r | |
ed66e1bc | 348 | );\r |
ac644614 | 349 | \r |
350 | \r | |
351 | /**\r | |
352 | This function checks whether EFI_FONT_INFO exists in current database. If\r | |
353 | FontInfoMask is specified, check what options can be used to make a match.\r | |
354 | Note that the masks relate to where the system default should be supplied\r | |
355 | are ignored by this function.\r | |
356 | \r | |
357 | @param Private Hii database private structure.\r | |
358 | @param FontInfo Points to EFI_FONT_INFO structure.\r | |
359 | @param FontInfoMask If not NULL, describes what options can be used\r | |
360 | to make a match between the font requested and\r | |
361 | the font available. The caller must guarantee\r | |
362 | this mask is valid.\r | |
363 | @param FontHandle On entry, Points to the font handle returned by a\r | |
364 | previous call to GetFontInfo() or NULL to start\r | |
365 | with the first font.\r | |
366 | @param GlobalFontInfo If not NULL, output the corresponding globa font\r | |
367 | info.\r | |
368 | \r | |
369 | @retval TRUE Existed\r | |
370 | @retval FALSE Not existed\r | |
371 | \r | |
372 | **/\r | |
373 | BOOLEAN\r | |
374 | IsFontInfoExisted (\r | |
375 | IN HII_DATABASE_PRIVATE_DATA *Private,\r | |
376 | IN EFI_FONT_INFO *FontInfo,\r | |
377 | IN EFI_FONT_INFO_MASK *FontInfoMask, OPTIONAL\r | |
378 | IN EFI_FONT_HANDLE FontHandle, OPTIONAL\r | |
379 | OUT HII_GLOBAL_FONT_INFO **GlobalFontInfo OPTIONAL\r | |
ed66e1bc | 380 | );\r |
ac644614 | 381 | \r |
8d00a0f1 | 382 | /**\r |
383 | \r | |
384 | This function invokes the matching registered function.\r | |
385 | \r | |
386 | @param Private HII Database driver private structure.\r | |
387 | @param NotifyType The type of change concerning the database.\r | |
388 | @param PackageInstance Points to the package referred to by the notification.\r | |
389 | @param PackageType Package type\r | |
390 | @param Handle The handle of the package list which contains the specified package.\r | |
391 | \r | |
392 | @retval EFI_SUCCESS Already checked all registered function and invoked \r | |
393 | if matched.\r | |
394 | @retval EFI_INVALID_PARAMETER Any input parameter is not valid.\r | |
395 | \r | |
396 | **/\r | |
397 | EFI_STATUS\r | |
398 | InvokeRegisteredFunction (\r | |
399 | IN HII_DATABASE_PRIVATE_DATA *Private, \r | |
400 | IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType,\r | |
401 | IN VOID *PackageInstance,\r | |
402 | IN UINT8 PackageType,\r | |
403 | IN EFI_HII_HANDLE Handle\r | |
404 | )\r | |
405 | ;\r | |
ac644614 | 406 | \r |
407 | /**\r | |
408 | Retrieve system default font and color.\r | |
409 | \r | |
410 | @param Private HII database driver private data.\r | |
411 | @param FontInfo Points to system default font output-related\r | |
412 | information. It's caller's responsibility to free\r | |
413 | this buffer.\r | |
414 | @param FontInfoSize If not NULL, output the size of buffer FontInfo.\r | |
415 | \r | |
416 | @retval EFI_SUCCESS Cell information is added to the GlyphInfoList.\r | |
417 | @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the\r | |
418 | task.\r | |
419 | @retval EFI_INVALID_PARAMETER Any input parameter is invalid.\r | |
420 | \r | |
421 | **/\r | |
422 | EFI_STATUS\r | |
423 | GetSystemFont (\r | |
424 | IN HII_DATABASE_PRIVATE_DATA *Private,\r | |
425 | OUT EFI_FONT_DISPLAY_INFO **FontInfo,\r | |
426 | OUT UINTN *FontInfoSize OPTIONAL\r | |
ed66e1bc | 427 | );\r |
ac644614 | 428 | \r |
429 | \r | |
430 | /**\r | |
431 | Parse all string blocks to find a String block specified by StringId.\r | |
432 | If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks\r | |
d6a82eaf LG |
433 | within this string package and backup its information. If LastStringId is \r |
434 | specified, the string id of last string block will also be output.\r | |
435 | If StringId = 0, output the string id of last string block (EFI_HII_SIBT_STRING).\r | |
ac644614 | 436 | \r |
437 | @param Private Hii database private structure.\r | |
438 | @param StringPackage Hii string package instance.\r | |
439 | @param StringId The string's id, which is unique within\r | |
440 | PackageList.\r | |
441 | @param BlockType Output the block type of found string block.\r | |
442 | @param StringBlockAddr Output the block address of found string block.\r | |
443 | @param StringTextOffset Offset, relative to the found block address, of\r | |
444 | the string text information.\r | |
d6a82eaf | 445 | @param LastStringId Output the last string id when StringId = 0 or StringId = -1.\r |
e5c861ac | 446 | @param StartStringId The first id in the skip block which StringId in the block.\r |
ac644614 | 447 | \r |
448 | @retval EFI_SUCCESS The string text and font is retrieved\r | |
449 | successfully.\r | |
450 | @retval EFI_NOT_FOUND The specified text or font info can not be found\r | |
451 | out.\r | |
452 | @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the\r | |
453 | task.\r | |
454 | \r | |
455 | **/\r | |
456 | EFI_STATUS\r | |
457 | FindStringBlock (\r | |
458 | IN HII_DATABASE_PRIVATE_DATA *Private,\r | |
459 | IN HII_STRING_PACKAGE_INSTANCE *StringPackage,\r | |
460 | IN EFI_STRING_ID StringId,\r | |
461 | OUT UINT8 *BlockType, OPTIONAL\r | |
462 | OUT UINT8 **StringBlockAddr, OPTIONAL\r | |
463 | OUT UINTN *StringTextOffset, OPTIONAL\r | |
e5c861ac ED |
464 | OUT EFI_STRING_ID *LastStringId, OPTIONAL\r |
465 | OUT EFI_STRING_ID *StartStringId OPTIONAL\r | |
ed66e1bc | 466 | );\r |
ac644614 | 467 | \r |
468 | \r | |
469 | /**\r | |
470 | Parse all glyph blocks to find a glyph block specified by CharValue.\r | |
471 | If CharValue = (CHAR16) (-1), collect all default character cell information\r | |
472 | within this font package and backup its information.\r | |
473 | \r | |
474 | @param FontPackage Hii string package instance.\r | |
475 | @param CharValue Unicode character value, which identifies a glyph\r | |
476 | block.\r | |
477 | @param GlyphBuffer Output the corresponding bitmap data of the found\r | |
478 | block. It is the caller's responsiblity to free\r | |
479 | this buffer.\r | |
480 | @param Cell Output cell information of the encoded bitmap.\r | |
481 | @param GlyphBufferLen If not NULL, output the length of GlyphBuffer.\r | |
482 | \r | |
483 | @retval EFI_SUCCESS The bitmap data is retrieved successfully.\r | |
484 | @retval EFI_NOT_FOUND The specified CharValue does not exist in current\r | |
485 | database.\r | |
486 | @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the\r | |
487 | task.\r | |
488 | \r | |
489 | **/\r | |
490 | EFI_STATUS\r | |
491 | FindGlyphBlock (\r | |
492 | IN HII_FONT_PACKAGE_INSTANCE *FontPackage,\r | |
493 | IN CHAR16 CharValue,\r | |
494 | OUT UINT8 **GlyphBuffer, OPTIONAL\r | |
495 | OUT EFI_HII_GLYPH_INFO *Cell, OPTIONAL\r | |
496 | OUT UINTN *GlyphBufferLen OPTIONAL\r | |
ed66e1bc | 497 | );\r |
ac644614 | 498 | \r |
8567300a LG |
499 | /**\r |
500 | This function exports Form packages to a buffer.\r | |
501 | This is a internal function.\r | |
502 | \r | |
503 | @param Private Hii database private structure.\r | |
504 | @param Handle Identification of a package list.\r | |
505 | @param PackageList Pointer to a package list which will be exported.\r | |
506 | @param UsedSize The length of buffer be used.\r | |
507 | @param BufferSize Length of the Buffer.\r | |
508 | @param Buffer Allocated space for storing exported data.\r | |
509 | @param ResultSize The size of the already exported content of this\r | |
510 | package list.\r | |
511 | \r | |
512 | @retval EFI_SUCCESS Form Packages are exported successfully.\r | |
513 | @retval EFI_INVALID_PARAMETER Any input parameter is invalid.\r | |
514 | \r | |
515 | **/\r | |
516 | EFI_STATUS\r | |
517 | ExportFormPackages (\r | |
518 | IN HII_DATABASE_PRIVATE_DATA *Private,\r | |
519 | IN EFI_HII_HANDLE Handle,\r | |
520 | IN HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageList,\r | |
521 | IN UINTN UsedSize,\r | |
522 | IN UINTN BufferSize,\r | |
523 | IN OUT VOID *Buffer,\r | |
524 | IN OUT UINTN *ResultSize\r | |
525 | );\r | |
526 | \r | |
ac644614 | 527 | //\r |
528 | // EFI_HII_FONT_PROTOCOL protocol interfaces\r | |
529 | //\r | |
530 | \r | |
531 | \r | |
532 | /**\r | |
533 | Renders a string to a bitmap or to the display.\r | |
534 | \r | |
535 | @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.\r | |
536 | @param Flags Describes how the string is to be drawn.\r | |
537 | @param String Points to the null-terminated string to be\r | |
538 | displayed.\r | |
539 | @param StringInfo Points to the string output information,\r | |
540 | including the color and font. If NULL, then the\r | |
541 | string will be output in the default system font\r | |
542 | and color.\r | |
543 | @param Blt If this points to a non-NULL on entry, this\r | |
544 | points to the image, which is Width pixels wide\r | |
545 | and Height pixels high. The string will be drawn\r | |
546 | onto this image and\r | |
547 | EFI_HII_OUT_FLAG_CLIP is implied. If this points\r | |
548 | to a NULL on entry, then a buffer\r | |
549 | will be allocated to hold the generated image and\r | |
550 | the pointer updated on exit. It is the caller's\r | |
551 | responsibility to free this buffer.\r | |
e90b081a | 552 | @param BltX Together with BltX, Specifies the offset from the left and top edge\r |
553 | of the image of the first character cell in the\r | |
554 | image.\r | |
555 | @param BltY Together with BltY, Specifies the offset from the left and top edge\r | |
ac644614 | 556 | of the image of the first character cell in the\r |
557 | image.\r | |
558 | @param RowInfoArray If this is non-NULL on entry, then on exit, this\r | |
559 | will point to an allocated buffer containing\r | |
560 | row information and RowInfoArraySize will be\r | |
561 | updated to contain the number of elements.\r | |
562 | This array describes the characters which were at\r | |
563 | least partially drawn and the heights of the\r | |
564 | rows. It is the caller's responsibility to free\r | |
565 | this buffer.\r | |
566 | @param RowInfoArraySize If this is non-NULL on entry, then on exit it\r | |
567 | contains the number of elements in RowInfoArray.\r | |
568 | @param ColumnInfoArray If this is non-NULL, then on return it will be\r | |
569 | filled with the horizontal offset for each\r | |
570 | character in the string on the row where it is\r | |
571 | displayed. Non-printing characters will have\r | |
572 | the offset ~0. The caller is responsible to\r | |
573 | allocate a buffer large enough so that there\r | |
574 | is one entry for each character in the string,\r | |
575 | not including the null-terminator. It is possible\r | |
576 | when character display is normalized that some\r | |
577 | character cells overlap.\r | |
578 | \r | |
579 | @retval EFI_SUCCESS The string was successfully rendered.\r | |
580 | @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for\r | |
581 | RowInfoArray or Blt.\r | |
813acf3a | 582 | @retval EFI_INVALID_PARAMETER The String or Blt.\r |
583 | @retval EFI_INVALID_PARAMETER Flags were invalid combination..\r | |
ac644614 | 584 | \r |
585 | **/\r | |
586 | EFI_STATUS\r | |
587 | EFIAPI\r | |
588 | HiiStringToImage (\r | |
589 | IN CONST EFI_HII_FONT_PROTOCOL *This,\r | |
590 | IN EFI_HII_OUT_FLAGS Flags,\r | |
591 | IN CONST EFI_STRING String,\r | |
592 | IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL,\r | |
593 | IN OUT EFI_IMAGE_OUTPUT **Blt,\r | |
594 | IN UINTN BltX,\r | |
595 | IN UINTN BltY,\r | |
596 | OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,\r | |
597 | OUT UINTN *RowInfoArraySize OPTIONAL,\r | |
598 | OUT UINTN *ColumnInfoArray OPTIONAL\r | |
ed66e1bc | 599 | );\r |
ac644614 | 600 | \r |
601 | \r | |
602 | /**\r | |
603 | Render a string to a bitmap or the screen containing the contents of the specified string.\r | |
604 | \r | |
605 | @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.\r | |
606 | @param Flags Describes how the string is to be drawn.\r | |
607 | @param PackageList The package list in the HII database to search\r | |
608 | for the specified string.\r | |
609 | @param StringId The string's id, which is unique within\r | |
610 | PackageList.\r | |
611 | @param Language Points to the language for the retrieved string.\r | |
612 | If NULL, then the current system language is\r | |
613 | used.\r | |
614 | @param StringInfo Points to the string output information,\r | |
615 | including the color and font. If NULL, then the\r | |
616 | string will be output in the default system font\r | |
617 | and color.\r | |
618 | @param Blt If this points to a non-NULL on entry, this\r | |
619 | points to the image, which is Width pixels wide\r | |
620 | and Height pixels high. The string will be drawn\r | |
621 | onto this image and\r | |
622 | EFI_HII_OUT_FLAG_CLIP is implied. If this points\r | |
623 | to a NULL on entry, then a buffer\r | |
624 | will be allocated to hold the generated image and\r | |
625 | the pointer updated on exit. It is the caller's\r | |
626 | responsibility to free this buffer.\r | |
e90b081a | 627 | @param BltX Together with BltX, Specifies the offset from the left and top edge\r |
628 | of the image of the first character cell in the\r | |
629 | image.\r | |
630 | @param BltY Together with BltY, Specifies the offset from the left and top edge\r | |
ac644614 | 631 | of the image of the first character cell in the\r |
632 | image.\r | |
633 | @param RowInfoArray If this is non-NULL on entry, then on exit, this\r | |
634 | will point to an allocated buffer containing\r | |
635 | row information and RowInfoArraySize will be\r | |
636 | updated to contain the number of elements.\r | |
637 | This array describes the characters which were at\r | |
638 | least partially drawn and the heights of the\r | |
639 | rows. It is the caller's responsibility to free\r | |
640 | this buffer.\r | |
641 | @param RowInfoArraySize If this is non-NULL on entry, then on exit it\r | |
642 | contains the number of elements in RowInfoArray.\r | |
643 | @param ColumnInfoArray If this is non-NULL, then on return it will be\r | |
644 | filled with the horizontal offset for each\r | |
645 | character in the string on the row where it is\r | |
646 | displayed. Non-printing characters will have\r | |
647 | the offset ~0. The caller is responsible to\r | |
648 | allocate a buffer large enough so that there\r | |
649 | is one entry for each character in the string,\r | |
650 | not including the null-terminator. It is possible\r | |
651 | when character display is normalized that some\r | |
652 | character cells overlap.\r | |
653 | \r | |
654 | @retval EFI_SUCCESS The string was successfully rendered.\r | |
655 | @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for\r | |
656 | RowInfoArray or Blt.\r | |
813acf3a | 657 | @retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL.\r |
658 | @retval EFI_INVALID_PARAMETER Flags were invalid combination.\r | |
659 | @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not \r | |
660 | in the specified PackageList. \r | |
ac644614 | 661 | \r |
662 | **/\r | |
663 | EFI_STATUS\r | |
664 | EFIAPI\r | |
665 | HiiStringIdToImage (\r | |
666 | IN CONST EFI_HII_FONT_PROTOCOL *This,\r | |
667 | IN EFI_HII_OUT_FLAGS Flags,\r | |
668 | IN EFI_HII_HANDLE PackageList,\r | |
669 | IN EFI_STRING_ID StringId,\r | |
670 | IN CONST CHAR8* Language,\r | |
671 | IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL,\r | |
672 | IN OUT EFI_IMAGE_OUTPUT **Blt,\r | |
673 | IN UINTN BltX,\r | |
674 | IN UINTN BltY,\r | |
675 | OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,\r | |
676 | OUT UINTN *RowInfoArraySize OPTIONAL,\r | |
677 | OUT UINTN *ColumnInfoArray OPTIONAL\r | |
ed66e1bc | 678 | );\r |
ac644614 | 679 | \r |
680 | \r | |
681 | /**\r | |
682 | Convert the glyph for a single character into a bitmap.\r | |
683 | \r | |
684 | @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.\r | |
685 | @param Char Character to retrieve.\r | |
686 | @param StringInfo Points to the string font and color information\r | |
687 | or NULL if the string should use the default\r | |
688 | system font and color.\r | |
689 | @param Blt Thus must point to a NULL on entry. A buffer will\r | |
690 | be allocated to hold the output and the pointer\r | |
691 | updated on exit. It is the caller's\r | |
692 | responsibility to free this buffer.\r | |
693 | @param Baseline Number of pixels from the bottom of the bitmap to\r | |
694 | the baseline.\r | |
695 | \r | |
696 | @retval EFI_SUCCESS Glyph bitmap created.\r | |
697 | @retval EFI_OUT_OF_RESOURCES Unable to allocate the output buffer Blt.\r | |
698 | @retval EFI_WARN_UNKNOWN_GLYPH The glyph was unknown and was replaced with the\r | |
699 | glyph for Unicode character 0xFFFD.\r | |
700 | @retval EFI_INVALID_PARAMETER Blt is NULL or *Blt is not NULL.\r | |
701 | \r | |
702 | **/\r | |
703 | EFI_STATUS\r | |
704 | EFIAPI\r | |
705 | HiiGetGlyph (\r | |
706 | IN CONST EFI_HII_FONT_PROTOCOL *This,\r | |
707 | IN CHAR16 Char,\r | |
e90b081a | 708 | IN CONST EFI_FONT_DISPLAY_INFO *StringInfo,\r |
ac644614 | 709 | OUT EFI_IMAGE_OUTPUT **Blt,\r |
710 | OUT UINTN *Baseline OPTIONAL\r | |
ed66e1bc | 711 | );\r |
ac644614 | 712 | \r |
713 | \r | |
714 | /**\r | |
715 | This function iterates through fonts which match the specified font, using\r | |
716 | the specified criteria. If String is non-NULL, then all of the characters in\r | |
717 | the string must exist in order for a candidate font to be returned.\r | |
718 | \r | |
719 | @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.\r | |
720 | @param FontHandle On entry, points to the font handle returned by a\r | |
721 | previous call to GetFontInfo() or NULL to start\r | |
722 | with the first font. On return, points to the\r | |
723 | returned font handle or points to NULL if there\r | |
724 | are no more matching fonts.\r | |
725 | @param StringInfoIn Upon entry, points to the font to return\r | |
813acf3a | 726 | information about. If NULL, then the information about the system default \r |
727 | font will be returned.\r | |
ac644614 | 728 | @param StringInfoOut Upon return, contains the matching font's\r |
729 | information. If NULL, then no information is\r | |
730 | returned. It's caller's responsibility to free\r | |
731 | this buffer.\r | |
732 | @param String Points to the string which will be tested to\r | |
733 | determine if all characters are available. If\r | |
734 | NULL, then any font is acceptable.\r | |
735 | \r | |
736 | @retval EFI_SUCCESS Matching font returned successfully.\r | |
737 | @retval EFI_NOT_FOUND No matching font was found.\r | |
738 | @retval EFI_INVALID_PARAMETER StringInfoIn is NULL.\r | |
813acf3a | 739 | @retval EFI_INVALID_PARAMETER StringInfoIn->FontInfoMask is an invalid combination.\r |
ac644614 | 740 | @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the\r |
741 | request.\r | |
ac644614 | 742 | **/\r |
743 | EFI_STATUS\r | |
744 | EFIAPI\r | |
745 | HiiGetFontInfo (\r | |
746 | IN CONST EFI_HII_FONT_PROTOCOL *This,\r | |
747 | IN OUT EFI_FONT_HANDLE *FontHandle,\r | |
e90b081a | 748 | IN CONST EFI_FONT_DISPLAY_INFO *StringInfoIn, OPTIONAL\r |
ac644614 | 749 | OUT EFI_FONT_DISPLAY_INFO **StringInfoOut,\r |
750 | IN CONST EFI_STRING String OPTIONAL\r | |
ed66e1bc | 751 | );\r |
ac644614 | 752 | \r |
753 | //\r | |
754 | // EFI_HII_IMAGE_PROTOCOL interfaces\r | |
755 | //\r | |
756 | \r | |
757 | \r | |
758 | /**\r | |
759 | This function adds the image Image to the group of images owned by PackageList, and returns\r | |
760 | a new image identifier (ImageId).\r | |
761 | \r | |
762 | @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.\r | |
763 | @param PackageList Handle of the package list where this image will\r | |
764 | be added.\r | |
765 | @param ImageId On return, contains the new image id, which is\r | |
766 | unique within PackageList.\r | |
767 | @param Image Points to the image.\r | |
768 | \r | |
769 | @retval EFI_SUCCESS The new image was added successfully.\r | |
770 | @retval EFI_NOT_FOUND The specified PackageList could not be found in\r | |
771 | database.\r | |
772 | @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.\r | |
773 | @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.\r | |
774 | \r | |
775 | **/\r | |
776 | EFI_STATUS\r | |
777 | EFIAPI\r | |
778 | HiiNewImage (\r | |
779 | IN CONST EFI_HII_IMAGE_PROTOCOL *This,\r | |
780 | IN EFI_HII_HANDLE PackageList,\r | |
781 | OUT EFI_IMAGE_ID *ImageId,\r | |
782 | IN CONST EFI_IMAGE_INPUT *Image\r | |
ed66e1bc | 783 | );\r |
ac644614 | 784 | \r |
785 | \r | |
786 | /**\r | |
787 | This function retrieves the image specified by ImageId which is associated with\r | |
788 | the specified PackageList and copies it into the buffer specified by Image.\r | |
789 | \r | |
790 | @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.\r | |
791 | @param PackageList Handle of the package list where this image will\r | |
792 | be searched.\r | |
793 | @param ImageId The image's id,, which is unique within\r | |
794 | PackageList.\r | |
795 | @param Image Points to the image.\r | |
ac644614 | 796 | \r |
797 | @retval EFI_SUCCESS The new image was returned successfully.\r | |
798 | @retval EFI_NOT_FOUND The image specified by ImageId is not available.\r | |
813acf3a | 799 | The specified PackageList is not in the database.\r |
ac644614 | 800 | @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to\r |
801 | hold the image.\r | |
802 | @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.\r | |
813acf3a | 803 | @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not\r |
804 | enough memory.\r | |
ac644614 | 805 | \r |
806 | **/\r | |
807 | EFI_STATUS\r | |
808 | EFIAPI\r | |
809 | HiiGetImage (\r | |
810 | IN CONST EFI_HII_IMAGE_PROTOCOL *This,\r | |
811 | IN EFI_HII_HANDLE PackageList,\r | |
812 | IN EFI_IMAGE_ID ImageId,\r | |
813acf3a | 813 | OUT EFI_IMAGE_INPUT *Image\r |
ed66e1bc | 814 | );\r |
ac644614 | 815 | \r |
816 | \r | |
817 | /**\r | |
818 | This function updates the image specified by ImageId in the specified PackageListHandle to\r | |
819 | the image specified by Image.\r | |
820 | \r | |
821 | @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.\r | |
822 | @param PackageList The package list containing the images.\r | |
823 | @param ImageId The image's id,, which is unique within\r | |
824 | PackageList.\r | |
825 | @param Image Points to the image.\r | |
826 | \r | |
827 | @retval EFI_SUCCESS The new image was updated successfully.\r | |
828 | @retval EFI_NOT_FOUND The image specified by ImageId is not in the\r | |
813acf3a | 829 | database. The specified PackageList is not in the database.\r |
ac644614 | 830 | @retval EFI_INVALID_PARAMETER The Image was NULL.\r |
831 | \r | |
832 | **/\r | |
833 | EFI_STATUS\r | |
834 | EFIAPI\r | |
835 | HiiSetImage (\r | |
836 | IN CONST EFI_HII_IMAGE_PROTOCOL *This,\r | |
837 | IN EFI_HII_HANDLE PackageList,\r | |
838 | IN EFI_IMAGE_ID ImageId,\r | |
839 | IN CONST EFI_IMAGE_INPUT *Image\r | |
ed66e1bc | 840 | );\r |
ac644614 | 841 | \r |
842 | \r | |
843 | /**\r | |
844 | This function renders an image to a bitmap or the screen using the specified\r | |
845 | color and options. It draws the image on an existing bitmap, allocates a new\r | |
846 | bitmap or uses the screen. The images can be clipped.\r | |
847 | \r | |
848 | @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.\r | |
849 | @param Flags Describes how the image is to be drawn.\r | |
850 | @param Image Points to the image to be displayed.\r | |
851 | @param Blt If this points to a non-NULL on entry, this\r | |
852 | points to the image, which is Width pixels wide\r | |
853 | and Height pixels high. The image will be drawn\r | |
854 | onto this image and EFI_HII_DRAW_FLAG_CLIP is\r | |
855 | implied. If this points to a NULL on entry, then\r | |
856 | a buffer will be allocated to hold the generated\r | |
857 | image and the pointer updated on exit. It is the\r | |
858 | caller's responsibility to free this buffer.\r | |
e90b081a | 859 | @param BltX Specifies the offset from the left and top edge\r |
860 | of the output image of the first pixel in the\r | |
861 | image.\r | |
ac644614 | 862 | @param BltY Specifies the offset from the left and top edge\r |
863 | of the output image of the first pixel in the\r | |
864 | image.\r | |
865 | \r | |
866 | @retval EFI_SUCCESS The image was successfully drawn.\r | |
867 | @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.\r | |
868 | @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.\r | |
869 | @retval EFI_INVALID_PARAMETER Any combination of Flags is invalid.\r | |
870 | \r | |
871 | **/\r | |
872 | EFI_STATUS\r | |
873 | EFIAPI\r | |
874 | HiiDrawImage (\r | |
875 | IN CONST EFI_HII_IMAGE_PROTOCOL *This,\r | |
876 | IN EFI_HII_DRAW_FLAGS Flags,\r | |
877 | IN CONST EFI_IMAGE_INPUT *Image,\r | |
878 | IN OUT EFI_IMAGE_OUTPUT **Blt,\r | |
879 | IN UINTN BltX,\r | |
880 | IN UINTN BltY\r | |
ed66e1bc | 881 | );\r |
ac644614 | 882 | \r |
883 | \r | |
884 | /**\r | |
885 | This function renders an image to a bitmap or the screen using the specified\r | |
886 | color and options. It draws the image on an existing bitmap, allocates a new\r | |
887 | bitmap or uses the screen. The images can be clipped.\r | |
888 | \r | |
889 | @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.\r | |
890 | @param Flags Describes how the image is to be drawn.\r | |
891 | @param PackageList The package list in the HII database to search\r | |
892 | for the specified image.\r | |
893 | @param ImageId The image's id, which is unique within\r | |
894 | PackageList.\r | |
895 | @param Blt If this points to a non-NULL on entry, this\r | |
896 | points to the image, which is Width pixels wide\r | |
897 | and Height pixels high. The image will be drawn\r | |
898 | onto this image and\r | |
899 | EFI_HII_DRAW_FLAG_CLIP is implied. If this points\r | |
900 | to a NULL on entry, then a buffer will be\r | |
901 | allocated to hold the generated image and the\r | |
902 | pointer updated on exit. It is the caller's\r | |
903 | responsibility to free this buffer.\r | |
e90b081a | 904 | @param BltX Specifies the offset from the left and top edge\r |
905 | of the output image of the first pixel in the\r | |
906 | image.\r | |
ac644614 | 907 | @param BltY Specifies the offset from the left and top edge\r |
908 | of the output image of the first pixel in the\r | |
909 | image.\r | |
910 | \r | |
911 | @retval EFI_SUCCESS The image was successfully drawn.\r | |
912 | @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.\r | |
813acf3a | 913 | @retval EFI_INVALID_PARAMETER The Blt was NULL.\r |
914 | @retval EFI_NOT_FOUND The image specified by ImageId is not in the database. \r | |
915 | The specified PackageList is not in the database.\r | |
ac644614 | 916 | \r |
917 | **/\r | |
918 | EFI_STATUS\r | |
919 | EFIAPI\r | |
920 | HiiDrawImageId (\r | |
921 | IN CONST EFI_HII_IMAGE_PROTOCOL *This,\r | |
922 | IN EFI_HII_DRAW_FLAGS Flags,\r | |
923 | IN EFI_HII_HANDLE PackageList,\r | |
924 | IN EFI_IMAGE_ID ImageId,\r | |
925 | IN OUT EFI_IMAGE_OUTPUT **Blt,\r | |
926 | IN UINTN BltX,\r | |
927 | IN UINTN BltY\r | |
928 | )\r | |
929 | \r | |
930 | ;\r | |
931 | \r | |
932 | //\r | |
933 | // EFI_HII_STRING_PROTOCOL\r | |
934 | //\r | |
935 | \r | |
936 | \r | |
937 | /**\r | |
938 | This function adds the string String to the group of strings owned by PackageList, with the\r | |
939 | specified font information StringFontInfo and returns a new string id.\r | |
940 | \r | |
941 | @param This A pointer to the EFI_HII_STRING_PROTOCOL\r | |
942 | instance.\r | |
943 | @param PackageList Handle of the package list where this string will\r | |
944 | be added.\r | |
945 | @param StringId On return, contains the new strings id, which is\r | |
946 | unique within PackageList.\r | |
947 | @param Language Points to the language for the new string.\r | |
948 | @param LanguageName Points to the printable language name to\r | |
949 | associate with the passed in Language field.If\r | |
950 | LanguageName is not NULL and the string package\r | |
951 | header's LanguageName associated with a given\r | |
952 | Language is not zero, the LanguageName being\r | |
953 | passed in will be ignored.\r | |
954 | @param String Points to the new null-terminated string.\r | |
955 | @param StringFontInfo Points to the new string's font information or\r | |
956 | NULL if the string should have the default system\r | |
957 | font, size and style.\r | |
958 | \r | |
959 | @retval EFI_SUCCESS The new string was added successfully.\r | |
960 | @retval EFI_NOT_FOUND The specified PackageList could not be found in\r | |
961 | database.\r | |
962 | @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of\r | |
963 | resources.\r | |
964 | @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL or Language is\r | |
965 | NULL.\r | |
966 | \r | |
967 | **/\r | |
968 | EFI_STATUS\r | |
969 | EFIAPI\r | |
970 | HiiNewString (\r | |
971 | IN CONST EFI_HII_STRING_PROTOCOL *This,\r | |
972 | IN EFI_HII_HANDLE PackageList,\r | |
973 | OUT EFI_STRING_ID *StringId,\r | |
974 | IN CONST CHAR8 *Language,\r | |
975 | IN CONST CHAR16 *LanguageName, OPTIONAL\r | |
976 | IN CONST EFI_STRING String,\r | |
977 | IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL\r | |
ed66e1bc | 978 | );\r |
ac644614 | 979 | \r |
980 | \r | |
981 | /**\r | |
982 | This function retrieves the string specified by StringId which is associated\r | |
983 | with the specified PackageList in the language Language and copies it into\r | |
984 | the buffer specified by String.\r | |
985 | \r | |
986 | @param This A pointer to the EFI_HII_STRING_PROTOCOL\r | |
987 | instance.\r | |
988 | @param Language Points to the language for the retrieved string.\r | |
989 | @param PackageList The package list in the HII database to search\r | |
990 | for the specified string.\r | |
991 | @param StringId The string's id, which is unique within\r | |
992 | PackageList.\r | |
993 | @param String Points to the new null-terminated string.\r | |
994 | @param StringSize On entry, points to the size of the buffer\r | |
995 | pointed to by String, in bytes. On return,\r | |
996 | points to the length of the string, in bytes.\r | |
997 | @param StringFontInfo If not NULL, points to the string's font\r | |
998 | information. It's caller's responsibility to\r | |
999 | free this buffer.\r | |
1000 | \r | |
1001 | @retval EFI_SUCCESS The string was returned successfully.\r | |
1002 | @retval EFI_NOT_FOUND The string specified by StringId is not\r | |
1003 | available.\r | |
1004 | @retval EFI_NOT_FOUND The string specified by StringId is available but\r | |
813acf3a | 1005 | not in the specified language.\r |
1006 | The specified PackageList is not in the database.\r | |
1007 | @retval EFI_INVALID_LANGUAGE - The string specified by StringId is available but\r | |
ac644614 | 1008 | @retval EFI_BUFFER_TOO_SMALL The buffer specified by StringSize is too small\r |
1009 | to hold the string.\r | |
1010 | @retval EFI_INVALID_PARAMETER The String or Language or StringSize was NULL.\r | |
1011 | @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the\r | |
1012 | request.\r | |
1013 | \r | |
1014 | **/\r | |
1015 | EFI_STATUS\r | |
1016 | EFIAPI\r | |
1017 | HiiGetString (\r | |
1018 | IN CONST EFI_HII_STRING_PROTOCOL *This,\r | |
1019 | IN CONST CHAR8 *Language,\r | |
1020 | IN EFI_HII_HANDLE PackageList,\r | |
1021 | IN EFI_STRING_ID StringId,\r | |
1022 | OUT EFI_STRING String,\r | |
1023 | IN OUT UINTN *StringSize,\r | |
1024 | OUT EFI_FONT_INFO **StringFontInfo OPTIONAL\r | |
ed66e1bc | 1025 | );\r |
ac644614 | 1026 | \r |
1027 | \r | |
1028 | /**\r | |
1029 | This function updates the string specified by StringId in the specified PackageList to the text\r | |
1030 | specified by String and, optionally, the font information specified by StringFontInfo.\r | |
1031 | \r | |
1032 | @param This A pointer to the EFI_HII_STRING_PROTOCOL\r | |
1033 | instance.\r | |
1034 | @param PackageList The package list containing the strings.\r | |
1035 | @param StringId The string's id, which is unique within\r | |
1036 | PackageList.\r | |
1037 | @param Language Points to the language for the updated string.\r | |
1038 | @param String Points to the new null-terminated string.\r | |
1039 | @param StringFontInfo Points to the string's font information or NULL\r | |
1040 | if the string font information is not changed.\r | |
1041 | \r | |
1042 | @retval EFI_SUCCESS The string was updated successfully.\r | |
1043 | @retval EFI_NOT_FOUND The string specified by StringId is not in the\r | |
1044 | database.\r | |
1045 | @retval EFI_INVALID_PARAMETER The String or Language was NULL.\r | |
1046 | @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the\r | |
1047 | task.\r | |
1048 | \r | |
1049 | **/\r | |
1050 | EFI_STATUS\r | |
1051 | EFIAPI\r | |
1052 | HiiSetString (\r | |
1053 | IN CONST EFI_HII_STRING_PROTOCOL *This,\r | |
1054 | IN EFI_HII_HANDLE PackageList,\r | |
1055 | IN EFI_STRING_ID StringId,\r | |
1056 | IN CONST CHAR8 *Language,\r | |
1057 | IN CONST EFI_STRING String,\r | |
1058 | IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL\r | |
ed66e1bc | 1059 | );\r |
ac644614 | 1060 | \r |
1061 | \r | |
1062 | /**\r | |
1063 | This function returns the list of supported languages, in the format specified\r | |
1064 | in Appendix M of UEFI 2.1 spec.\r | |
1065 | \r | |
1066 | @param This A pointer to the EFI_HII_STRING_PROTOCOL\r | |
1067 | instance.\r | |
1068 | @param PackageList The package list to examine.\r | |
4f077902 SZ |
1069 | @param Languages Points to the buffer to hold the returned\r |
1070 | null-terminated ASCII string.\r | |
ac644614 | 1071 | @param LanguagesSize On entry, points to the size of the buffer\r |
1072 | pointed to by Languages, in bytes. On return,\r | |
1073 | points to the length of Languages, in bytes.\r | |
1074 | \r | |
1075 | @retval EFI_SUCCESS The languages were returned successfully.\r | |
1076 | @retval EFI_INVALID_PARAMETER The Languages or LanguagesSize was NULL.\r | |
1077 | @retval EFI_BUFFER_TOO_SMALL The LanguagesSize is too small to hold the list\r | |
1078 | of supported languages. LanguageSize is updated\r | |
1079 | to contain the required size.\r | |
1080 | @retval EFI_NOT_FOUND Could not find string package in specified\r | |
1081 | packagelist.\r | |
1082 | \r | |
1083 | **/\r | |
1084 | EFI_STATUS\r | |
1085 | EFIAPI\r | |
1086 | HiiGetLanguages (\r | |
1087 | IN CONST EFI_HII_STRING_PROTOCOL *This,\r | |
1088 | IN EFI_HII_HANDLE PackageList,\r | |
1089 | IN OUT CHAR8 *Languages,\r | |
1090 | IN OUT UINTN *LanguagesSize\r | |
ed66e1bc | 1091 | );\r |
ac644614 | 1092 | \r |
1093 | \r | |
1094 | /**\r | |
1095 | Each string package has associated with it a single primary language and zero\r | |
1096 | or more secondary languages. This routine returns the secondary languages\r | |
1097 | associated with a package list.\r | |
1098 | \r | |
1099 | @param This A pointer to the EFI_HII_STRING_PROTOCOL\r | |
1100 | instance.\r | |
1101 | @param PackageList The package list to examine.\r | |
4f077902 SZ |
1102 | @param PrimaryLanguage Points to the null-terminated ASCII string that specifies\r |
1103 | the primary language. Languages are specified in the\r | |
1104 | format specified in Appendix M of the UEFI 2.0 specification.\r | |
1105 | @param SecondaryLanguages Points to the buffer to hold the returned null-terminated\r | |
1106 | ASCII string that describes the list of\r | |
1107 | secondary languages for the specified\r | |
1108 | PrimaryLanguage. If there are no secondary\r | |
1109 | languages, the function returns successfully,\r | |
ac644614 | 1110 | but this is set to NULL.\r |
e90b081a | 1111 | @param SecondaryLanguagesSize On entry, points to the size of the buffer\r |
4f077902 SZ |
1112 | pointed to by SecondaryLanguages, in bytes. On\r |
1113 | return, points to the length of SecondaryLanguages\r | |
ac644614 | 1114 | in bytes.\r |
1115 | \r | |
1116 | @retval EFI_SUCCESS Secondary languages were correctly returned.\r | |
4f077902 SZ |
1117 | @retval EFI_INVALID_PARAMETER PrimaryLanguage or SecondaryLanguages or\r |
1118 | SecondaryLanguagesSize was NULL.\r | |
1119 | @retval EFI_BUFFER_TOO_SMALL The buffer specified by SecondaryLanguagesSize is\r | |
ac644614 | 1120 | too small to hold the returned information.\r |
4f077902 | 1121 | SecondaryLanguageSize is updated to hold the size of\r |
ac644614 | 1122 | the buffer required.\r |
4f077902 | 1123 | @retval EFI_INVALID_LANGUAGE The language specified by PrimaryLanguage is not\r |
ac644614 | 1124 | present in the specified package list.\r |
813acf3a | 1125 | @retval EFI_NOT_FOUND The specified PackageList is not in the Database. \r |
ac644614 | 1126 | \r |
1127 | **/\r | |
1128 | EFI_STATUS\r | |
1129 | EFIAPI\r | |
1130 | HiiGetSecondaryLanguages (\r | |
1131 | IN CONST EFI_HII_STRING_PROTOCOL *This,\r | |
1132 | IN EFI_HII_HANDLE PackageList,\r | |
4f077902 | 1133 | IN CONST CHAR8 *PrimaryLanguage,\r |
e90b081a | 1134 | IN OUT CHAR8 *SecondaryLanguages,\r |
1135 | IN OUT UINTN *SecondaryLanguagesSize\r | |
ed66e1bc | 1136 | );\r |
ac644614 | 1137 | \r |
1138 | //\r | |
1139 | // EFI_HII_DATABASE_PROTOCOL protocol interfaces\r | |
1140 | //\r | |
1141 | \r | |
1142 | \r | |
1143 | /**\r | |
1144 | This function adds the packages in the package list to the database and returns a handle. If there is a\r | |
1145 | EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will\r | |
1146 | create a package of type EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list.\r | |
1147 | \r | |
1148 | @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r | |
1149 | instance.\r | |
1150 | @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER\r | |
1151 | structure.\r | |
1152 | @param DriverHandle Associate the package list with this EFI handle.\r | |
b1a803d1 | 1153 | If a NULL is specified, this data will not be associate\r |
1154 | with any drivers and cannot have a callback induced.\r | |
ac644614 | 1155 | @param Handle A pointer to the EFI_HII_HANDLE instance.\r |
1156 | \r | |
1157 | @retval EFI_SUCCESS The package list associated with the Handle was\r | |
1158 | added to the HII database.\r | |
1159 | @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary resources for the\r | |
1160 | new database contents.\r | |
1161 | @retval EFI_INVALID_PARAMETER PackageList is NULL or Handle is NULL.\r | |
1162 | \r | |
1163 | **/\r | |
1164 | EFI_STATUS\r | |
1165 | EFIAPI\r | |
1166 | HiiNewPackageList (\r | |
1167 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r | |
1168 | IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList,\r | |
b1a803d1 | 1169 | IN CONST EFI_HANDLE DriverHandle, OPTIONAL\r |
ac644614 | 1170 | OUT EFI_HII_HANDLE *Handle\r |
ed66e1bc | 1171 | );\r |
ac644614 | 1172 | \r |
1173 | \r | |
1174 | /**\r | |
1175 | This function removes the package list that is associated with a handle Handle\r | |
1176 | from the HII database. Before removing the package, any registered functions\r | |
1177 | with the notification type REMOVE_PACK and the same package type will be called.\r | |
1178 | \r | |
1179 | @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r | |
1180 | instance.\r | |
1181 | @param Handle The handle that was registered to the data that\r | |
1182 | is requested for removal.\r | |
1183 | \r | |
1184 | @retval EFI_SUCCESS The data associated with the Handle was removed\r | |
1185 | from the HII database.\r | |
813acf3a | 1186 | @retval EFI_NOT_FOUND The specified Handle is not in database.\r |
ac644614 | 1187 | \r |
1188 | **/\r | |
1189 | EFI_STATUS\r | |
1190 | EFIAPI\r | |
1191 | HiiRemovePackageList (\r | |
1192 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r | |
1193 | IN EFI_HII_HANDLE Handle\r | |
ed66e1bc | 1194 | );\r |
ac644614 | 1195 | \r |
1196 | \r | |
1197 | /**\r | |
1198 | This function updates the existing package list (which has the specified Handle)\r | |
1199 | in the HII databases, using the new package list specified by PackageList.\r | |
1200 | \r | |
1201 | @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r | |
1202 | instance.\r | |
1203 | @param Handle The handle that was registered to the data that\r | |
1204 | is requested to be updated.\r | |
1205 | @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER\r | |
1206 | package.\r | |
1207 | \r | |
1208 | @retval EFI_SUCCESS The HII database was successfully updated.\r | |
1209 | @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory for the updated\r | |
1210 | database.\r | |
813acf3a | 1211 | @retval EFI_INVALID_PARAMETER PackageList was NULL.\r |
1212 | @retval EFI_NOT_FOUND The specified Handle is not in database.\r | |
ac644614 | 1213 | \r |
1214 | **/\r | |
1215 | EFI_STATUS\r | |
1216 | EFIAPI\r | |
1217 | HiiUpdatePackageList (\r | |
1218 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r | |
1219 | IN EFI_HII_HANDLE Handle,\r | |
1220 | IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList\r | |
ed66e1bc | 1221 | );\r |
ac644614 | 1222 | \r |
1223 | \r | |
1224 | /**\r | |
1225 | This function returns a list of the package handles of the specified type\r | |
1226 | that are currently active in the database. The pseudo-type\r | |
1227 | EFI_HII_PACKAGE_TYPE_ALL will cause all package handles to be listed.\r | |
1228 | \r | |
1229 | @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r | |
1230 | instance.\r | |
1231 | @param PackageType Specifies the package type of the packages to\r | |
1232 | list or EFI_HII_PACKAGE_TYPE_ALL for all packages\r | |
1233 | to be listed.\r | |
1234 | @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then\r | |
1235 | this is the pointer to the GUID which must match\r | |
1236 | the Guid field of EFI_HII_GUID_PACKAGE_GUID_HDR.\r | |
1237 | Otherwise, it must be NULL.\r | |
1238 | @param HandleBufferLength On input, a pointer to the length of the handle\r | |
1239 | buffer. On output, the length of the handle\r | |
1240 | buffer that is required for the handles found.\r | |
1241 | @param Handle An array of EFI_HII_HANDLE instances returned.\r | |
1242 | \r | |
1243 | @retval EFI_SUCCESS The matching handles are outputed successfully.\r | |
813acf3a | 1244 | HandleBufferLength is updated with the actual length.\r |
ac644614 | 1245 | @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that\r |
1246 | Handle is too small to support the number of\r | |
1247 | handles. HandleBufferLength is updated with a\r | |
1248 | value that will enable the data to fit.\r | |
1249 | @retval EFI_NOT_FOUND No matching handle could not be found in\r | |
1250 | database.\r | |
1251 | @retval EFI_INVALID_PARAMETER Handle or HandleBufferLength was NULL.\r | |
813acf3a | 1252 | @retval EFI_INVALID_PARAMETER PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but\r |
1253 | PackageGuid is not NULL, PackageType is a EFI_HII_\r | |
1254 | PACKAGE_TYPE_GUID but PackageGuid is NULL.\r | |
1255 | \r | |
ac644614 | 1256 | \r |
1257 | **/\r | |
1258 | EFI_STATUS\r | |
1259 | EFIAPI\r | |
1260 | HiiListPackageLists (\r | |
1261 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r | |
1262 | IN UINT8 PackageType,\r | |
1263 | IN CONST EFI_GUID *PackageGuid,\r | |
1264 | IN OUT UINTN *HandleBufferLength,\r | |
1265 | OUT EFI_HII_HANDLE *Handle\r | |
ed66e1bc | 1266 | );\r |
ac644614 | 1267 | \r |
1268 | \r | |
1269 | /**\r | |
1270 | This function will export one or all package lists in the database to a buffer.\r | |
1271 | For each package list exported, this function will call functions registered\r | |
1272 | with EXPORT_PACK and then copy the package list to the buffer.\r | |
1273 | \r | |
1274 | @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r | |
1275 | instance.\r | |
1276 | @param Handle An EFI_HII_HANDLE that corresponds to the desired\r | |
1277 | package list in the HII database to export or\r | |
1278 | NULL to indicate all package lists should be\r | |
1279 | exported.\r | |
1280 | @param BufferSize On input, a pointer to the length of the buffer.\r | |
1281 | On output, the length of the buffer that is\r | |
1282 | required for the exported data.\r | |
1283 | @param Buffer A pointer to a buffer that will contain the\r | |
1284 | results of the export function.\r | |
1285 | \r | |
1286 | @retval EFI_SUCCESS Package exported.\r | |
1287 | @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that\r | |
1288 | Handle is too small to support the number of\r | |
1289 | handles. HandleBufferLength is updated with\r | |
1290 | a value that will enable the data to fit.\r | |
1291 | @retval EFI_NOT_FOUND The specifiecd Handle could not be found in the\r | |
1292 | current database.\r | |
1293 | @retval EFI_INVALID_PARAMETER Handle or Buffer or BufferSize was NULL.\r | |
1294 | \r | |
1295 | **/\r | |
1296 | EFI_STATUS\r | |
1297 | EFIAPI\r | |
1298 | HiiExportPackageLists (\r | |
1299 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r | |
1300 | IN EFI_HII_HANDLE Handle,\r | |
1301 | IN OUT UINTN *BufferSize,\r | |
1302 | OUT EFI_HII_PACKAGE_LIST_HEADER *Buffer\r | |
ed66e1bc | 1303 | );\r |
ac644614 | 1304 | \r |
1305 | \r | |
1306 | /**\r | |
1307 | This function registers a function which will be called when specified actions related to packages of\r | |
1308 | the specified type occur in the HII database. By registering a function, other HII-related drivers are\r | |
1309 | notified when specific package types are added, removed or updated in the HII database.\r | |
1310 | Each driver or application which registers a notification should use\r | |
1311 | EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before exiting.\r | |
1312 | \r | |
1313 | @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r | |
1314 | instance.\r | |
1315 | @param PackageType Specifies the package type of the packages to\r | |
1316 | list or EFI_HII_PACKAGE_TYPE_ALL for all packages\r | |
1317 | to be listed.\r | |
1318 | @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then\r | |
1319 | this is the pointer to the GUID which must match\r | |
1320 | the Guid field of\r | |
1321 | EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must\r | |
1322 | be NULL.\r | |
1323 | @param PackageNotifyFn Points to the function to be called when the\r | |
1324 | event specified by\r | |
1325 | NotificationType occurs.\r | |
1326 | @param NotifyType Describes the types of notification which this\r | |
1327 | function will be receiving.\r | |
1328 | @param NotifyHandle Points to the unique handle assigned to the\r | |
1329 | registered notification. Can be used in\r | |
1330 | EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify()\r | |
1331 | to stop notifications.\r | |
1332 | \r | |
1333 | @retval EFI_SUCCESS Notification registered successfully.\r | |
1334 | @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary data structures\r | |
1335 | @retval EFI_INVALID_PARAMETER NotifyHandle is NULL.\r | |
1336 | @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when PackageType is not\r | |
1337 | EFI_HII_PACKAGE_TYPE_GUID.\r | |
1338 | @retval EFI_INVALID_PARAMETER PackageGuid is NULL when PackageType is\r | |
1339 | EFI_HII_PACKAGE_TYPE_GUID.\r | |
1340 | \r | |
1341 | **/\r | |
1342 | EFI_STATUS\r | |
1343 | EFIAPI\r | |
1344 | HiiRegisterPackageNotify (\r | |
1345 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r | |
1346 | IN UINT8 PackageType,\r | |
1347 | IN CONST EFI_GUID *PackageGuid,\r | |
1348 | IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn,\r | |
1349 | IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType,\r | |
1350 | OUT EFI_HANDLE *NotifyHandle\r | |
ed66e1bc | 1351 | );\r |
ac644614 | 1352 | \r |
1353 | \r | |
1354 | /**\r | |
1355 | Removes the specified HII database package-related notification.\r | |
1356 | \r | |
1357 | @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r | |
1358 | instance.\r | |
e90b081a | 1359 | @param NotificationHandle The handle of the notification function being\r |
ac644614 | 1360 | unregistered.\r |
1361 | \r | |
1362 | @retval EFI_SUCCESS Notification is unregistered successfully.\r | |
813acf3a | 1363 | @retval EFI_NOT_FOUND The incoming notification handle does not exist \r |
1364 | in current hii database.\r | |
ac644614 | 1365 | \r |
1366 | **/\r | |
1367 | EFI_STATUS\r | |
1368 | EFIAPI\r | |
1369 | HiiUnregisterPackageNotify (\r | |
1370 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r | |
1371 | IN EFI_HANDLE NotificationHandle\r | |
ed66e1bc | 1372 | );\r |
ac644614 | 1373 | \r |
1374 | \r | |
1375 | /**\r | |
1376 | This routine retrieves an array of GUID values for each keyboard layout that\r | |
1377 | was previously registered in the system.\r | |
1378 | \r | |
1379 | @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r | |
1380 | instance.\r | |
1381 | @param KeyGuidBufferLength On input, a pointer to the length of the keyboard\r | |
1382 | GUID buffer. On output, the length of the handle\r | |
1383 | buffer that is required for the handles found.\r | |
1384 | @param KeyGuidBuffer An array of keyboard layout GUID instances\r | |
1385 | returned.\r | |
1386 | \r | |
1387 | @retval EFI_SUCCESS KeyGuidBuffer was updated successfully.\r | |
1388 | @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength parameter indicates\r | |
1389 | that KeyGuidBuffer is too small to support the\r | |
1390 | number of GUIDs. KeyGuidBufferLength is\r | |
1391 | updated with a value that will enable the data to\r | |
1392 | fit.\r | |
1393 | @retval EFI_INVALID_PARAMETER The KeyGuidBuffer or KeyGuidBufferLength was\r | |
1394 | NULL.\r | |
1395 | @retval EFI_NOT_FOUND There was no keyboard layout.\r | |
1396 | \r | |
1397 | **/\r | |
1398 | EFI_STATUS\r | |
1399 | EFIAPI\r | |
1400 | HiiFindKeyboardLayouts (\r | |
1401 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r | |
1402 | IN OUT UINT16 *KeyGuidBufferLength,\r | |
1403 | OUT EFI_GUID *KeyGuidBuffer\r | |
ed66e1bc | 1404 | );\r |
ac644614 | 1405 | \r |
1406 | \r | |
1407 | /**\r | |
1408 | This routine retrieves the requested keyboard layout. The layout is a physical description of the keys\r | |
1409 | on a keyboard and the character(s) that are associated with a particular set of key strokes.\r | |
1410 | \r | |
1411 | @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r | |
1412 | instance.\r | |
1413 | @param KeyGuid A pointer to the unique ID associated with a\r | |
1414 | given keyboard layout. If KeyGuid is NULL then\r | |
1415 | the current layout will be retrieved.\r | |
1416 | @param KeyboardLayoutLength On input, a pointer to the length of the\r | |
1417 | KeyboardLayout buffer. On output, the length of\r | |
1418 | the data placed into KeyboardLayout.\r | |
1419 | @param KeyboardLayout A pointer to a buffer containing the retrieved\r | |
1420 | keyboard layout.\r | |
1421 | \r | |
1422 | @retval EFI_SUCCESS The keyboard layout was retrieved successfully.\r | |
1423 | @retval EFI_NOT_FOUND The requested keyboard layout was not found.\r | |
1424 | @retval EFI_INVALID_PARAMETER The KeyboardLayout or KeyboardLayoutLength was\r | |
1425 | NULL.\r | |
1426 | \r | |
1427 | **/\r | |
1428 | EFI_STATUS\r | |
1429 | EFIAPI\r | |
1430 | HiiGetKeyboardLayout (\r | |
1431 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r | |
1432 | IN CONST EFI_GUID *KeyGuid,\r | |
1433 | IN OUT UINT16 *KeyboardLayoutLength,\r | |
1434 | OUT EFI_HII_KEYBOARD_LAYOUT *KeyboardLayout\r | |
ed66e1bc | 1435 | );\r |
ac644614 | 1436 | \r |
1437 | \r | |
1438 | /**\r | |
1439 | This routine sets the default keyboard layout to the one referenced by KeyGuid. When this routine\r | |
1440 | is called, an event will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID\r | |
1441 | group type. This is so that agents which are sensitive to the current keyboard layout being changed\r | |
1442 | can be notified of this change.\r | |
1443 | \r | |
1444 | @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r | |
1445 | instance.\r | |
1446 | @param KeyGuid A pointer to the unique ID associated with a\r | |
1447 | given keyboard layout.\r | |
1448 | \r | |
1449 | @retval EFI_SUCCESS The current keyboard layout was successfully set.\r | |
1450 | @retval EFI_NOT_FOUND The referenced keyboard layout was not found, so\r | |
1451 | action was taken.\r | |
1452 | @retval EFI_INVALID_PARAMETER The KeyGuid was NULL.\r | |
1453 | \r | |
1454 | **/\r | |
1455 | EFI_STATUS\r | |
1456 | EFIAPI\r | |
1457 | HiiSetKeyboardLayout (\r | |
1458 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r | |
1459 | IN CONST EFI_GUID *KeyGuid\r | |
ed66e1bc | 1460 | );\r |
ac644614 | 1461 | \r |
1462 | \r | |
1463 | /**\r | |
1464 | Return the EFI handle associated with a package list.\r | |
1465 | \r | |
1466 | @param This A pointer to the EFI_HII_DATABASE_PROTOCOL\r | |
1467 | instance.\r | |
1468 | @param PackageListHandle An EFI_HII_HANDLE that corresponds to the desired\r | |
1469 | package list in the HIIdatabase.\r | |
1470 | @param DriverHandle On return, contains the EFI_HANDLE which was\r | |
1471 | registered with the package list in\r | |
1472 | NewPackageList().\r | |
1473 | \r | |
1474 | @retval EFI_SUCCESS The DriverHandle was returned successfully.\r | |
1475 | @retval EFI_INVALID_PARAMETER The PackageListHandle was not valid or\r | |
1476 | DriverHandle was NULL.\r | |
1477 | \r | |
1478 | **/\r | |
1479 | EFI_STATUS\r | |
1480 | EFIAPI\r | |
1481 | HiiGetPackageListHandle (\r | |
1482 | IN CONST EFI_HII_DATABASE_PROTOCOL *This,\r | |
1483 | IN EFI_HII_HANDLE PackageListHandle,\r | |
1484 | OUT EFI_HANDLE *DriverHandle\r | |
ed66e1bc | 1485 | );\r |
ac644614 | 1486 | \r |
1487 | //\r | |
1488 | // EFI_HII_CONFIG_ROUTING_PROTOCOL interfaces\r | |
1489 | //\r | |
1490 | \r | |
1491 | \r | |
1492 | /**\r | |
1493 | This function allows a caller to extract the current configuration\r | |
1494 | for one or more named elements from one or more drivers.\r | |
1495 | \r | |
1496 | @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL\r | |
1497 | instance.\r | |
1498 | @param Request A null-terminated Unicode string in\r | |
1499 | <MultiConfigRequest> format.\r | |
1500 | @param Progress On return, points to a character in the Request\r | |
1501 | string. Points to the string's null terminator if\r | |
1502 | request was successful. Points to the most recent\r | |
1503 | & before the first failing name / value pair (or\r | |
1504 | the beginning of the string if the failure is in\r | |
1505 | the first name / value pair) if the request was\r | |
1506 | not successful.\r | |
1507 | @param Results Null-terminated Unicode string in\r | |
1508 | <MultiConfigAltResp> format which has all values\r | |
1509 | filled in for the names in the Request string.\r | |
1510 | String to be allocated by the called function.\r | |
1511 | \r | |
1512 | @retval EFI_SUCCESS The Results string is filled with the values\r | |
1513 | corresponding to all requested names.\r | |
1514 | @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the\r | |
1515 | results that must be stored awaiting possible\r | |
1516 | future protocols.\r | |
1517 | @retval EFI_NOT_FOUND Routing data doesn't match any known driver.\r | |
1518 | Progress set to the "G" in "GUID" of the\r | |
1519 | routing header that doesn't match. Note: There\r | |
1520 | is no requirement that all routing data\r | |
1521 | be validated before any configuration extraction.\r | |
1522 | @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Request\r | |
1523 | parameter would result in this type of error. The\r | |
1524 | Progress parameter is set to NULL.\r | |
1525 | @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set to most recent &\r | |
1526 | before the error or the beginning of the string.\r | |
1527 | @retval EFI_INVALID_PARAMETER Unknown name. Progress points to the & before the\r | |
1528 | name in question.\r | |
1529 | \r | |
1530 | **/\r | |
1531 | EFI_STATUS\r | |
1532 | EFIAPI\r | |
1533 | HiiConfigRoutingExtractConfig (\r | |
1534 | IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,\r | |
1535 | IN CONST EFI_STRING Request,\r | |
1536 | OUT EFI_STRING *Progress,\r | |
1537 | OUT EFI_STRING *Results\r | |
ed66e1bc | 1538 | );\r |
ac644614 | 1539 | \r |
1540 | \r | |
1541 | /**\r | |
1542 | This function allows the caller to request the current configuration for the\r | |
1543 | entirety of the current HII database and returns the data in a null-terminated Unicode string.\r | |
1544 | \r | |
1545 | @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL\r | |
1546 | instance.\r | |
1547 | @param Results Null-terminated Unicode string in\r | |
1548 | <MultiConfigAltResp> format which has all values\r | |
1549 | filled in for the names in the Request string.\r | |
1550 | String to be allocated by the called function.\r | |
1551 | De-allocation is up to the caller.\r | |
1552 | \r | |
1553 | @retval EFI_SUCCESS The Results string is filled with the values\r | |
1554 | corresponding to all requested names.\r | |
1555 | @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the\r | |
1556 | results that must be stored awaiting possible\r | |
1557 | future protocols.\r | |
1558 | @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Results\r | |
1559 | parameter would result in this type of error.\r | |
1560 | \r | |
1561 | **/\r | |
1562 | EFI_STATUS\r | |
1563 | EFIAPI\r | |
1564 | HiiConfigRoutingExportConfig (\r | |
1565 | IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,\r | |
1566 | OUT EFI_STRING *Results\r | |
ed66e1bc | 1567 | );\r |
ac644614 | 1568 | \r |
1569 | \r | |
1570 | /**\r | |
1571 | This function processes the results of processing forms and routes it to the\r | |
1572 | appropriate handlers or storage.\r | |
1573 | \r | |
1574 | @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL\r | |
1575 | instance.\r | |
1576 | @param Configuration A null-terminated Unicode string in\r | |
1577 | <MulltiConfigResp> format.\r | |
1578 | @param Progress A pointer to a string filled in with the offset\r | |
1579 | of the most recent & before the first failing\r | |
1580 | name / value pair (or the beginning of the string\r | |
1581 | if the failure is in the first name / value pair)\r | |
1582 | or the terminating NULL if all was successful.\r | |
1583 | \r | |
1584 | @retval EFI_SUCCESS The results have been distributed or are awaiting\r | |
1585 | distribution.\r | |
1586 | @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the\r | |
1587 | results that must be stored awaiting possible\r | |
1588 | future protocols.\r | |
1589 | @retval EFI_INVALID_PARAMETER Passing in a NULL for the Configuration parameter\r | |
1590 | would result in this type of error.\r | |
1591 | @retval EFI_NOT_FOUND Target for the specified routing data was not\r | |
1592 | found.\r | |
1593 | \r | |
1594 | **/\r | |
1595 | EFI_STATUS\r | |
1596 | EFIAPI\r | |
813acf3a | 1597 | HiiConfigRoutingRouteConfig (\r |
ac644614 | 1598 | IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,\r |
1599 | IN CONST EFI_STRING Configuration,\r | |
1600 | OUT EFI_STRING *Progress\r | |
ed66e1bc | 1601 | );\r |
ac644614 | 1602 | \r |
1603 | \r | |
1604 | \r | |
1605 | /**\r | |
1606 | This helper function is to be called by drivers to map configuration data stored\r | |
1607 | in byte array ("block") formats such as UEFI Variables into current configuration strings.\r | |
1608 | \r | |
1609 | @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL\r | |
1610 | instance.\r | |
1611 | @param ConfigRequest A null-terminated Unicode string in\r | |
1612 | <ConfigRequest> format.\r | |
1613 | @param Block Array of bytes defining the block's\r | |
1614 | configuration.\r | |
1615 | @param BlockSize Length in bytes of Block.\r | |
1616 | @param Config Filled-in configuration string. String allocated\r | |
1617 | by the function. Returned only if call is\r | |
1618 | successful.\r | |
1619 | @param Progress A pointer to a string filled in with the offset\r | |
1620 | of the most recent & before the first failing\r | |
1621 | name/value pair (or the beginning of the string\r | |
1622 | if the failure is in the first name / value pair)\r | |
1623 | or the terminating NULL if all was successful.\r | |
1624 | \r | |
1625 | @retval EFI_SUCCESS The request succeeded. Progress points to the\r | |
1626 | null terminator at the end of the ConfigRequest\r | |
1627 | string.\r | |
1628 | @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.\r | |
1629 | Progress points to the first character of\r | |
1630 | ConfigRequest.\r | |
1631 | @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigRequest or\r | |
1632 | Block parameter would result in this type of\r | |
1633 | error. Progress points to the first character of\r | |
1634 | ConfigRequest.\r | |
1635 | @retval EFI_NOT_FOUND Target for the specified routing data was not\r | |
1636 | found. Progress points to the "G" in "GUID" of\r | |
1637 | the errant routing data.\r | |
1638 | @retval EFI_DEVICE_ERROR Block not large enough. Progress undefined.\r | |
1639 | @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted string.\r | |
1640 | Block is left updated and Progress points at\r | |
1641 | the '&' preceding the first non-<BlockName>.\r | |
1642 | \r | |
1643 | **/\r | |
1644 | EFI_STATUS\r | |
1645 | EFIAPI\r | |
1646 | HiiBlockToConfig (\r | |
1647 | IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,\r | |
1648 | IN CONST EFI_STRING ConfigRequest,\r | |
1649 | IN CONST UINT8 *Block,\r | |
1650 | IN CONST UINTN BlockSize,\r | |
1651 | OUT EFI_STRING *Config,\r | |
1652 | OUT EFI_STRING *Progress\r | |
ed66e1bc | 1653 | );\r |
ac644614 | 1654 | \r |
1655 | \r | |
1656 | /**\r | |
1657 | This helper function is to be called by drivers to map configuration strings\r | |
1658 | to configurations stored in byte array ("block") formats such as UEFI Variables.\r | |
1659 | \r | |
1660 | @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL\r | |
1661 | instance.\r | |
1662 | @param ConfigResp A null-terminated Unicode string in <ConfigResp>\r | |
1663 | format.\r | |
1664 | @param Block A possibly null array of bytes representing the\r | |
1665 | current block. Only bytes referenced in the\r | |
1666 | ConfigResp string in the block are modified. If\r | |
1667 | this parameter is null or if the *BlockSize\r | |
1668 | parameter is (on input) shorter than required by\r | |
1669 | the Configuration string, only the BlockSize\r | |
1670 | parameter is updated and an appropriate status\r | |
1671 | (see below) is returned.\r | |
1672 | @param BlockSize The length of the Block in units of UINT8. On\r | |
1673 | input, this is the size of the Block. On output,\r | |
1674 | if successful, contains the index of the last\r | |
1675 | modified byte in the Block.\r | |
1676 | @param Progress On return, points to an element of the ConfigResp\r | |
1677 | string filled in with the offset of the most\r | |
1678 | recent '&' before the first failing name / value\r | |
1679 | pair (or the beginning of the string if the\r | |
1680 | failure is in the first name / value pair) or\r | |
1681 | the terminating NULL if all was successful.\r | |
1682 | \r | |
1683 | @retval EFI_SUCCESS The request succeeded. Progress points to the\r | |
1684 | null terminator at the end of the ConfigResp\r | |
1685 | string.\r | |
1686 | @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.\r | |
1687 | Progress points to the first character of\r | |
1688 | ConfigResp.\r | |
1689 | @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigResp or\r | |
1690 | Block parameter would result in this type of\r | |
1691 | error. Progress points to the first character of\r | |
1692 | ConfigResp.\r | |
1693 | @retval EFI_NOT_FOUND Target for the specified routing data was not\r | |
1694 | found. Progress points to the "G" in "GUID" of\r | |
1695 | the errant routing data.\r | |
1696 | @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted name /\r | |
1697 | value pair. Block is left updated and\r | |
1698 | Progress points at the '&' preceding the first\r | |
1699 | non-<BlockName>.\r | |
1700 | \r | |
1701 | **/\r | |
1702 | EFI_STATUS\r | |
1703 | EFIAPI\r | |
1704 | HiiConfigToBlock (\r | |
1705 | IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,\r | |
1706 | IN CONST EFI_STRING ConfigResp,\r | |
1707 | IN OUT UINT8 *Block,\r | |
1708 | IN OUT UINTN *BlockSize,\r | |
1709 | OUT EFI_STRING *Progress\r | |
ed66e1bc | 1710 | );\r |
ac644614 | 1711 | \r |
1712 | \r | |
1713 | /**\r | |
1714 | This helper function is to be called by drivers to extract portions of\r | |
1715 | a larger configuration string.\r | |
1716 | \r | |
1717 | @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL\r | |
1718 | instance.\r | |
1719 | @param Configuration A null-terminated Unicode string in\r | |
1720 | <MultiConfigAltResp> format.\r | |
1721 | @param Guid A pointer to the GUID value to search for in the\r | |
1722 | routing portion of the ConfigResp string when\r | |
1723 | retrieving the requested data. If Guid is NULL,\r | |
1724 | then all GUID values will be searched for.\r | |
1725 | @param Name A pointer to the NAME value to search for in the\r | |
1726 | routing portion of the ConfigResp string when\r | |
1727 | retrieving the requested data. If Name is NULL,\r | |
1728 | then all Name values will be searched for.\r | |
1729 | @param DevicePath A pointer to the PATH value to search for in the\r | |
1730 | routing portion of the ConfigResp string when\r | |
1731 | retrieving the requested data. If DevicePath is\r | |
1732 | NULL, then all DevicePath values will be\r | |
1733 | searched for.\r | |
1734 | @param AltCfgId A pointer to the ALTCFG value to search for in\r | |
1735 | the routing portion of the ConfigResp string\r | |
1736 | when retrieving the requested data. If this\r | |
1737 | parameter is NULL, then the current setting will\r | |
1738 | be retrieved.\r | |
1739 | @param AltCfgResp A pointer to a buffer which will be allocated by\r | |
1740 | the function which contains the retrieved string\r | |
1741 | as requested. This buffer is only allocated if\r | |
1742 | the call was successful.\r | |
1743 | \r | |
1744 | @retval EFI_SUCCESS The request succeeded. The requested data was\r | |
1745 | extracted and placed in the newly allocated\r | |
1746 | AltCfgResp buffer.\r | |
1747 | @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate AltCfgResp.\r | |
1748 | @retval EFI_INVALID_PARAMETER Any parameter is invalid.\r | |
1749 | @retval EFI_NOT_FOUND Target for the specified routing data was not\r | |
1750 | found.\r | |
1751 | \r | |
1752 | **/\r | |
1753 | EFI_STATUS\r | |
1754 | EFIAPI\r | |
1755 | HiiGetAltCfg (\r | |
1756 | IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This,\r | |
1757 | IN CONST EFI_STRING Configuration,\r | |
1758 | IN CONST EFI_GUID *Guid,\r | |
1759 | IN CONST EFI_STRING Name,\r | |
1760 | IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r | |
1761 | IN CONST UINT16 *AltCfgId,\r | |
1762 | OUT EFI_STRING *AltCfgResp\r | |
ed66e1bc | 1763 | );\r |
ac644614 | 1764 | \r |
f324bf4d | 1765 | \r |
1766 | /**\r | |
1767 | Compare whether two names of languages are identical.\r | |
1768 | \r | |
b0bdc7ba LG |
1769 | @param Language1 Name of language 1 from StringPackage\r |
1770 | @param Language2 Name of language 2 to be compared with language 1.\r | |
f324bf4d | 1771 | \r |
1772 | @retval TRUE same\r | |
1773 | @retval FALSE not same\r | |
1774 | \r | |
1775 | **/\r | |
1776 | BOOLEAN\r | |
1777 | HiiCompareLanguage (\r | |
1778 | IN CHAR8 *Language1,\r | |
1779 | IN CHAR8 *Language2\r | |
1780 | )\r | |
1781 | ;\r | |
1782 | \r | |
ac644614 | 1783 | //\r |
1784 | // Global variables\r | |
1785 | //\r | |
1786 | extern EFI_EVENT gHiiKeyboardLayoutChanged;\r | |
ac644614 | 1787 | #endif\r |