]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Protocol/FrameworkHii.h
Remove blank for function typedef, it will break generating doxygen document.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / FrameworkHii.h
CommitLineData
79964ac8 1/** @file\r
2 This file defines the Human Interface Infrastructure protocol which will\r
3 be used by resources which want to publish IFR/Font/String data and have it\r
4 collected by the Configuration engine.\r
5\r
6 Copyright (c) 2007, Intel Corporation\r
7 All rights reserved. This program and the accompanying materials\r
8 are licensed and made available under the terms and conditions of the BSD License\r
9 which accompanies this distribution. The full text of the license may be found at\r
10 http://opensource.org/licenses/bsd-license.php\r
11\r
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14\r
8e5b17b2 15 Module Name: FrameworkHii.h\r
79964ac8 16\r
17 @par Revision Reference:\r
18 This protocol is defined in HII spec 0.92.\r
19\r
20**/\r
21\r
7c6d55db 22#ifndef _FRAMEWORK_HII_H_\r
23#define _FRAMEWORK_HII_H_\r
24\r
b80fbe85 25#include <PiDxe.h>\r
26\r
7c6d55db 27//\r
28// To get EFI_GRAPHICS_OUTPUT_BLT_PIXEL,\r
29// is defined in MdePkg/Protocol/GraphicsOutput.h\r
30//\r
31#include <Protocol/GraphicsOutput.h>\r
79964ac8 32\r
33#define EFI_HII_PROTOCOL_GUID \\r
34 { \\r
35 0xd7ad636e, 0xb997, 0x459b, {0xbf, 0x3f, 0x88, 0x46, 0x89, 0x79, 0x80, 0xe1} \\r
36 }\r
37\r
38// BugBug:\r
39//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r
40// If UGA goes away we need to put this some place. I'm not sure where?\r
41//\r
42//typedef struct {\r
43// UINT8 Blue;\r
44// UINT8 Green;\r
45// UINT8 Red;\r
46// UINT8 Reserved;\r
47//} EFI_UGA_PIXEL;\r
48\r
49//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r
50//\r
51\r
52typedef struct _EFI_HII_PROTOCOL EFI_HII_PROTOCOL;\r
53\r
dc7b4a5c 54typedef UINT16 FRAMEWORK_EFI_HII_HANDLE;\r
55\r
79964ac8 56//\r
57// Global definition\r
58//\r
59#define NARROW_CHAR 0xFFF0\r
60#define WIDE_CHAR 0xFFF1\r
61#define NON_BREAKING_CHAR 0xFFF2\r
62#define GLYPH_WIDTH 8\r
63#define GLYPH_HEIGHT 19\r
64\r
65#define EFI_HII_FONT 1\r
66#define EFI_HII_STRING 2\r
67#define EFI_HII_IFR 3\r
68#define EFI_HII_KEYBOARD 4\r
69#define EFI_HII_HANDLES 5\r
70#define EFI_HII_VARIABLE 6\r
71#define EFI_HII_DEVICE_PATH 7\r
72\r
73\r
74// References to string tokens must use this macro to enable scanning for\r
75// token usages.\r
76//\r
77#define STRING_TOKEN(t) t\r
78\r
79//\r
80// The following types are currently defined:\r
80c76d51 81// EFI_FROM_ID has been defined in UEFI spec.\r
79964ac8 82//\r
79964ac8 83typedef UINT16 EFI_FORM_LABEL;\r
84\r
85#pragma pack(1)\r
86\r
87typedef struct {\r
88 UINT32 Length;\r
89 UINT16 Type;\r
90} EFI_HII_PACK_HEADER;\r
91\r
92//\r
93// A form list consists of a large variety of structure\r
94// possibilities so to represent the binary blob of data\r
95// associated with a package of forms, we will assume a\r
96// pointer to a self-describing data buffer.\r
97//\r
98typedef struct {\r
99 EFI_HII_PACK_HEADER Header;\r
100} EFI_HII_IFR_PACK;\r
101\r
102typedef struct {\r
103 EFI_HII_PACK_HEADER Header; // Must be filled in\r
104 EFI_HANDLE ImageHandle; // Must be filled in\r
105 EFI_HANDLE DeviceHandle; // Optional\r
106 EFI_HANDLE ControllerHandle; // Optional\r
107 EFI_HANDLE CallbackHandle; // Optional\r
108 EFI_HANDLE COBExportHandle; // Optional\r
109} EFI_HII_HANDLE_PACK;\r
110\r
111//\r
112// ********************************************************\r
113// EFI_VARIABLE_CONTENTS\r
114// ********************************************************\r
115//\r
116typedef struct {\r
117 EFI_HII_PACK_HEADER Header;\r
118 EFI_GUID VariableGuid;\r
119 UINT32 VariableNameLength;\r
120 UINT16 VariableId;\r
121 //\r
122 // CHAR16 VariableName[]; //Null-terminated\r
123 //\r
124} EFI_HII_VARIABLE_PACK;\r
125\r
126//\r
127// ********************************************************\r
128// EFI_DEVICE_PATH_PACK\r
129// ********************************************************\r
130//\r
131typedef struct {\r
132 EFI_HII_PACK_HEADER Header;\r
133 //\r
134 // EFI_DEVICE_PATH DevicePath[];\r
135 //\r
136} EFI_HII_DEVICE_PATH_PACK;\r
137\r
138//\r
139// ********************************************************\r
140// EFI_HII_DATA_TABLE\r
141// ********************************************************\r
142//\r
143typedef struct {\r
dc7b4a5c 144 FRAMEWORK_EFI_HII_HANDLE HiiHandle;\r
79964ac8 145 EFI_GUID PackageGuid;\r
146 UINT32 DataTableSize;\r
147 UINT32 IfrDataOffset;\r
148 UINT32 StringDataOffset;\r
149 UINT32 VariableDataOffset;\r
150 UINT32 DevicePathOffset;\r
151 UINT32 NumberOfVariableData;\r
152 UINT32 NumberOfLanguages;\r
153 //\r
154 // EFI_HII_DEVICE_PATH_PACK DevicePath[];\r
155 // EFI_HII_VARIABLE_PACK VariableData[];\r
156 // EFI_HII_IFR_PACK IfrData;\r
157 // EFI_HII_STRING_PACK StringData[];\r
158 //\r
159} EFI_HII_DATA_TABLE;\r
160\r
161//\r
162// ********************************************************\r
163// EFI_HII_EXPORT_TABLE\r
164// ********************************************************\r
165//\r
166typedef struct {\r
167 UINT32 NumberOfHiiDataTables;\r
168 EFI_GUID Revision;\r
169 //\r
170 // EFI_HII_DATA_TABLE HiiDataTable[];\r
171 //\r
172} EFI_HII_EXPORT_TABLE;\r
173\r
174typedef struct {\r
175 BOOLEAN FormSetUpdate; // If TRUE, next variable is significant\r
176 EFI_PHYSICAL_ADDRESS FormCallbackHandle; // If not 0, will update Formset with this info\r
177 BOOLEAN FormUpdate; // If TRUE, next variable is significant\r
178 UINT16 FormValue; // specify which form is to be updated if FormUpdate value is TRUE.\r
179 STRING_REF FormTitle; // If not 0, will update Form with this info\r
180 UINT16 DataCount; // The number of Data entries in this structure\r
181 UINT8 *Data; // An array of 1+ op-codes, specified by DataCount\r
102e7272 182} FRAMEWORK_EFI_HII_UPDATE_DATA;\r
79964ac8 183\r
184//\r
185// String attributes\r
186//\r
187#define LANG_RIGHT_TO_LEFT 0x00000001\r
188\r
189//\r
190// A string package is used to localize strings to a particular\r
191// language. The package is associated with a particular driver\r
192// or set of drivers. Tools are used to associate tokens with\r
193// string references in forms and in programs. These tokens are\r
194// language agnostic. When paired with a language pack (directly\r
195// or indirectly), the string token resolves into an actual\r
196// UNICODE string. The NumStringPointers determines how many\r
197// StringPointers (offset values) there are as well as the total\r
198// number of Strings that are defined.\r
199//\r
200typedef struct {\r
201 EFI_HII_PACK_HEADER Header;\r
202 RELOFST LanguageNameString;\r
203 RELOFST PrintableLanguageName;\r
204 UINT32 NumStringPointers;\r
205 UINT32 Attributes;\r
206 //\r
207 // RELOFST StringPointers[];\r
208 // EFI_STRING Strings[];\r
209 //\r
210} EFI_HII_STRING_PACK;\r
211\r
79964ac8 212\r
213//\r
214// A font list consists of a font header followed by a series\r
215// of glyph structures. Note that fonts are not language specific.\r
216//\r
217typedef struct {\r
218 EFI_HII_PACK_HEADER Header;\r
219 UINT16 NumberOfNarrowGlyphs;\r
220 UINT16 NumberOfWideGlyphs;\r
221} EFI_HII_FONT_PACK;\r
222\r
223//\r
224// The IfrData in the EFI_HII_IFR_PACK structure definition\r
225// is variable length, and not really part of the header. To\r
226// simplify from code the size of the header, define an\r
227// identical structure that does not include the IfrData field.\r
228// Then use sizeof() this new structure to determine the\r
229// actual size of the header.\r
230//\r
231typedef struct {\r
232 EFI_HII_PACK_HEADER Header;\r
233} EFI_HII_IFR_PACK_HEADER;\r
234\r
79964ac8 235typedef struct {\r
236 EFI_KEY Key;\r
237 CHAR16 Unicode;\r
238 CHAR16 ShiftedUnicode;\r
239 CHAR16 AltGrUnicode;\r
240 CHAR16 ShiftedAltGrUnicode;\r
241 UINT16 Modifier;\r
dc7b4a5c 242} FRAMEWORK_EFI_KEY_DESCRIPTOR;\r
79964ac8 243\r
244//\r
245// This structure allows a sparse set of keys to be redefined\r
246// or a complete redefinition of the keyboard layout. Most\r
247// keyboards have a lot of commonality in their layouts, therefore\r
248// only defining those keys that need to change from the default\r
249// minimizes the passed in information.\r
250//\r
251// Additionally, when an update occurs, the active keyboard layout\r
252// will be switched to the newly updated keyboard layout. This\r
253// allows for situations that when a keyboard layout driver is\r
254// loaded as part of system initialization, the system will default\r
255// the keyboard behavior to the new layout.\r
256//\r
257// Each call to update the keyboard mapping should contain the\r
258// complete set of key descriptors to be updated, since every\r
259// call to the HII which contains an EFI_HII_KEYBOARD_PACK will\r
260// wipe the previous set of overrides. A call to\r
261//\r
262typedef struct {\r
263 EFI_HII_PACK_HEADER Header;\r
dc7b4a5c 264 FRAMEWORK_EFI_KEY_DESCRIPTOR *Descriptor;\r
79964ac8 265 UINT8 DescriptorCount;\r
266} EFI_HII_KEYBOARD_PACK;\r
267\r
268//\r
269// The EFI_HII_PACKAGES can contain different types of packages just\r
270// after the structure as inline data.\r
271//\r
272typedef struct {\r
273 UINTN NumberOfPackages;\r
274 EFI_GUID *GuidId;\r
275 //\r
276 // EFI_HII_HANDLE_PACK *HandlePack; // Only one pack.\r
277 // EFI_HII_IFR_PACK *IfrPack; // Only one pack.\r
278 // EFI_HII_FONT_PACK *FontPack[]; // Multiple packs ok\r
279 // EFI_HII_STRING_PACK *StringPack[]; // Multiple packs ok\r
280 // EFI_HII_KEYBOARD_PACK *KeyboardPack[]; // Multiple packs ok\r
281 //\r
282} EFI_HII_PACKAGES;\r
283\r
284typedef struct _EFI_HII_VARIABLE_PACK_LIST {\r
285 struct _EFI_HII_VARIABLE_PACK_LIST *NextVariablePack;\r
286 EFI_HII_VARIABLE_PACK *VariablePack;\r
287} EFI_HII_VARIABLE_PACK_LIST;\r
288\r
61a30832 289\r
79964ac8 290#pragma pack()\r
291\r
292/**\r
293 Registers the various packs that are passed in via the Packages parameter.\r
294\r
295 @param This A pointer to the EFI_HII_PROTOCOL instance.\r
296 @param Packages A pointer to an EFI_HII_PACKAGES package instance.\r
dc7b4a5c 297 @param Handle A pointer to the FRAMEWORK_EFI_HII_HANDLE instance.\r
79964ac8 298\r
299 @retval EFI_SUCCESS Data was extracted from Packages, the database\r
300 was updated with the data, and Handle returned successfully.\r
301 @retval EFI_INVALID_PARAMETER The content of Packages was invalid.\r
302\r
303**/\r
304typedef\r
305EFI_STATUS\r
69686d56 306(EFIAPI *FRAMEWORK_EFI_HII_NEW_PACK)(\r
79964ac8 307 IN EFI_HII_PROTOCOL *This,\r
308 IN EFI_HII_PACKAGES *Packages,\r
dc7b4a5c 309 OUT FRAMEWORK_EFI_HII_HANDLE *Handle\r
79964ac8 310 );\r
311\r
312/**\r
313 Removes a package from the HII database.\r
314\r
315 @param This A pointer to the EFI_HII_PROTOCOL instance.\r
316 @param Handle The handle that was registered to the data that is requested\r
317 for removal.\r
318\r
319 @retval EFI_SUCCESS The data associated with the Handle was removed\r
320 from the HII database.\r
321 @retval EFI_INVALID_PARAMETER The Handle was not valid.\r
322\r
323**/\r
324typedef\r
325EFI_STATUS\r
69686d56 326(EFIAPI *FRAMEWORK_EFI_HII_REMOVE_PACK)(\r
79964ac8 327 IN EFI_HII_PROTOCOL *This,\r
dc7b4a5c 328 IN FRAMEWORK_EFI_HII_HANDLE Handle\r
79964ac8 329 );\r
330\r
331/**\r
332 Determines the handles that are currently active in the database.\r
333\r
334 @param This A pointer to the EFI_HII_PROTOCOL instance.\r
335 @param HandleBufferLength On input, a pointer to the length of the handle\r
336 buffer. On output, the length of the handle buffer that is required\r
337 for the handles found.\r
dc7b4a5c 338 @param Handle An array of FRAMEWORK_EFI_HII_HANDLE instances returned.\r
79964ac8 339\r
340 @retval EFI_SUCCESS Handle was updated successfully.\r
341 @retval EFI_BUFFER_TOO_SMALL The HandleBufferLength parameter indicates\r
342 that Handle is too small to support the number of handles.\r
343\r
344**/\r
345typedef\r
346EFI_STATUS\r
69686d56 347(EFIAPI *FRAMEWORK_EFI_HII_FIND_HANDLES)(\r
79964ac8 348 IN EFI_HII_PROTOCOL *This,\r
349 IN OUT UINT16 *HandleBufferLength,\r
dc7b4a5c 350 OUT FRAMEWORK_EFI_HII_HANDLE *Handle\r
79964ac8 351 );\r
352\r
353/**\r
354 Exports the contents of the database into a buffer.\r
355\r
356 @param This A pointer to the EFI_HII_PROTOCOL instance.\r
dc7b4a5c 357 @param Handle An FRAMEWORK_EFI_HII_HANDLE that corresponds to the desired\r
79964ac8 358 handle to export. If the value is 0, the entire database will be exported.\r
359 In either case, the data will be exported in a format described by the\r
360 structure definition of EFI_HII_EXPORT_TABLE.\r
361 @param BufferSize\r
362 On input, a pointer to the length of the buffer. On output, the length\r
363 of the buffer that is required for the export data.\r
364 @param Buffer A pointer to a buffer that will contain the results of the export function.\r
365\r
366 @retval EFI_SUCCESS The buffer was successfully filled with BufferSize amount of data.\r
367 @retval EFI_BUFFER_TOO_SMALL The value in BufferSize was too small to contain the export data.\r
368\r
369**/\r
370typedef\r
371EFI_STATUS\r
69686d56 372(EFIAPI *FRAMEWORK_EFI_HII_EXPORT)(\r
79964ac8 373 IN EFI_HII_PROTOCOL *This,\r
dc7b4a5c 374 IN FRAMEWORK_EFI_HII_HANDLE Handle,\r
79964ac8 375 IN OUT UINTN *BufferSize,\r
376 OUT VOID *Buffer\r
377 );\r
378\r
379/**\r
380 Remove any new strings that were added after the initial string export\r
381 for this handle.\r
382\r
383 @param This A pointer to the EFI_HII_PROTOCOL instance.\r
384 @param Handle The handle on which the string resides.\r
385\r
386 @retval EFI_SUCCESS Remove strings from the handle successfully.\r
387 @retval EFI_INVALID_PARAMETER The Handle was unknown.\r
388\r
389**/\r
390typedef\r
391EFI_STATUS\r
69686d56 392(EFIAPI *FRAMEWORK_EFI_HII_RESET_STRINGS)(\r
79964ac8 393 IN EFI_HII_PROTOCOL *This,\r
dc7b4a5c 394 IN FRAMEWORK_EFI_HII_HANDLE Handle\r
79964ac8 395 );\r
396\r
397/**\r
398 Tests if all of the characters in a string have corresponding font characters.\r
399\r
400 @param This A pointer to the EFI_HII_PROTOCOL instance.\r
401 @param StringToTest A pointer to a Unicode string.\r
402 @param FirstMissing A pointer to an index into the string. On input,\r
403 the index of the first character in the StringToTest to examine. On exit,\r
404 the index of the first character encountered for which a glyph is unavailable.\r
405 If all glyphs in the string are available, the index is the index of the\r
406 terminator of the string.\r
407 @param GlyphBufferSize A pointer to a value. On output, if the function\r
408 returns EFI_SUCCESS, it contains the amount of memory that is required to\r
409 store the string's glyph equivalent.\r
410\r
411 @retval EFI_SUCCESS All glyphs are available. Note that an empty string\r
412 always returns this value.\r
413 @retval EFI_NOT_FOUND A glyph was not found for a character.\r
414\r
415**/\r
416typedef\r
417EFI_STATUS\r
c1adc63d 418(EFIAPI *FRAMEWORK_EFI_HII_TEST_STRING) (\r
79964ac8 419 IN EFI_HII_PROTOCOL *This,\r
420 IN CHAR16 *StringToTest,\r
421 IN OUT UINT32 *FirstMissing,\r
422 OUT UINT32 *GlyphBufferSize\r
423 );\r
424\r
425/**\r
426 Translates a Unicode character into the corresponding font glyph.\r
427\r
428 @param This A pointer to the EFI_HII_PROTOCOL instance.\r
429 @param Source A pointer to a Unicode string.\r
430 @param Index On input, the offset into the string from which to fetch\r
431 the character.On successful completion, the index is updated to the first\r
432 character past the character(s) making up the just extracted glyph.\r
433 @param GlyphBuffer Pointer to an array where the glyphs corresponding\r
434 to the characters in the source may be stored. GlyphBuffer is assumed\r
435 to be wide enough to accept a wide glyph character.\r
436 @param BitWidth If EFI_SUCCESS was returned, the UINT16 pointed to by\r
437 this value is filled with the length of the glyph in pixels. It is unchanged\r
438 if the call was unsuccessful.\r
439 @param InternalStatus The cell pointed to by this parameter must be\r
440 initialized to zero prior to invoking the call the first time for any string.\r
441\r
442 @retval EFI_SUCCESS It worked.\r
443 @retval EFI_NOT_FOUND A glyph for a character was not found.\r
444\r
445**/\r
446typedef\r
447EFI_STATUS\r
69686d56 448(EFIAPI *FRAMEWORK_EFI_HII_GET_GLYPH)(\r
79964ac8 449 IN EFI_HII_PROTOCOL *This,\r
450 IN CHAR16 *Source,\r
451 IN OUT UINT16 *Index,\r
452 OUT UINT8 **GlyphBuffer,\r
453 OUT UINT16 *BitWidth,\r
454 IN OUT UINT32 *InternalStatus\r
455 );\r
456\r
457/**\r
458 Translates a glyph into the format required for input to the Universal\r
459 Graphics Adapter (UGA) Block Transfer (BLT) routines.\r
460\r
461 @param This A pointer to the EFI_HII_PROTOCOL instance.\r
462 @param GlyphBuffer A pointer to the buffer that contains glyph data.\r
463 @param Foreground The foreground setting requested to be used for the\r
464 generated BltBuffer data.\r
465 @param Background The background setting requested to be used for the\r
466 generated BltBuffer data.\r
467 @param Count The entry in the BltBuffer upon which to act.\r
468 @param Width The width in bits of the glyph being converted.\r
469 @param Height The height in bits of the glyph being converted\r
470 @param BltBuffer A pointer to the buffer that contains the data that is\r
471 ready to be used by the UGA BLT routines.\r
472\r
473 @retval EFI_SUCCESS It worked.\r
474 @retval EFI_NOT_FOUND A glyph for a character was not found.\r
475\r
476**/\r
477typedef\r
478EFI_STATUS\r
69686d56 479(EFIAPI *FRAMEWORK_EFI_HII_GLYPH_TO_BLT)(\r
79964ac8 480 IN EFI_HII_PROTOCOL *This,\r
481 IN UINT8 *GlyphBuffer,\r
482 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground,\r
483 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background,\r
484 IN UINTN Count,\r
485 IN UINTN Width,\r
486 IN UINTN Height,\r
487 IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer\r
488 );\r
489\r
490/**\r
491 Allows a new string to be added to an already existing string package.\r
492\r
493 @param This A pointer to the EFI_HII_PROTOCOL instance.\r
494 @param Pointer to a NULL-terminated string containing a single ISO 639-2\r
495 language identifier, indicating the language in which the string is translated.\r
496 @param Handle The handle of the language pack to which the string is to be added.\r
497 @param Reference The identifier of the string to be added. If the reference\r
498 value is zero, then the string will be assigned a new identifier on that\r
499 handle for the language specified. Otherwise, the string will be updated\r
500 with the NewString Value.\r
501 @param NewString The string to be added.\r
502\r
503 @retval EFI_SUCCESS The string was effectively registered.\r
504 @retval EFI_INVALID_PARAMETER The Handle was unknown.\r
505\r
506**/\r
507typedef\r
508EFI_STATUS\r
69686d56 509(EFIAPI *FRAMEWORK_EFI_HII_NEW_STRING)(\r
79964ac8 510 IN EFI_HII_PROTOCOL *This,\r
511 IN CHAR16 *Language,\r
dc7b4a5c 512 IN FRAMEWORK_EFI_HII_HANDLE Handle,\r
79964ac8 513 IN OUT STRING_REF *Reference,\r
514 IN CHAR16 *NewString\r
515 );\r
516\r
517/**\r
518 Allows a program to determine the primary languages that are supported\r
519 on a given handle.\r
520\r
521 @param This A pointer to the EFI_HII_PROTOCOL instance.\r
522 @param Handle The handle on which the strings reside.\r
523 @param LanguageString A string allocated by GetPrimaryLanguages() that\r
524 contains a list of all primary languages registered on the handle.\r
525\r
526 @retval EFI_SUCCESS LanguageString was correctly returned.\r
527 @retval EFI_INVALID_PARAMETER The Handle was unknown.\r
528\r
529**/\r
530typedef\r
531EFI_STATUS\r
69686d56 532(EFIAPI *FRAMEWORK_EFI_HII_GET_PRI_LANGUAGES)(\r
79964ac8 533 IN EFI_HII_PROTOCOL *This,\r
dc7b4a5c 534 IN FRAMEWORK_EFI_HII_HANDLE Handle,\r
79964ac8 535 OUT EFI_STRING *LanguageString\r
536 );\r
537\r
538/**\r
539 Allows a program to determine which secondary languages are supported\r
540 on a given handle for a given primary language.\r
541\r
542 @param This A pointer to the EFI_HII_PROTOCOL instance.\r
543 @param Handle The handle on which the strings reside.\r
544 @param PrimaryLanguage Pointer to a NULL-terminated string containing a single\r
545 ISO 639-2 language identifier, indicating the primary language.\r
546 @param LanguageString A string allocated by GetSecondaryLanguages()\r
547 containing a list of all secondary languages registered on the handle.\r
548\r
549 @retval EFI_SUCCESS LanguageString was correctly returned.\r
550 @retval EFI_INVALID_PARAMETER The Handle was unknown.\r
551\r
552**/\r
553typedef\r
554EFI_STATUS\r
69686d56 555(EFIAPI *FRAMEWORK_EFI_HII_GET_SEC_LANGUAGES)(\r
79964ac8 556 IN EFI_HII_PROTOCOL *This,\r
dc7b4a5c 557 IN FRAMEWORK_EFI_HII_HANDLE Handle,\r
79964ac8 558 IN CHAR16 *PrimaryLanguage,\r
559 OUT EFI_STRING *LanguageString\r
560 );\r
561\r
562/**\r
563 Extracts a string from a package already registered with the EFI HII database.\r
564\r
565 @param This A pointer to the EFI_HII_PROTOCOL instance.\r
566 @param Handle The handle on which the string resides.\r
567 @param Token The string token assigned to the string.\r
568 @param Raw If TRUE, the string is returned unedited in the internal\r
569 storage format described above. If false, the string returned is edited\r
570 by replacing <cr> with <space> and by removing special characters such\r
571 as the <wide> prefix.\r
572 @param LanguageString Pointer to a NULL-terminated string containing a\r
573 single ISO 639-2 language identifier, indicating the language to print.\r
574 If the LanguageString is empty (starts with a NULL), the default system\r
575 language will be used to determine the language.\r
576 @param BufferLength Length of the StringBuffer.\r
577 @param StringBuffer The buffer designed to receive the characters in the string.\r
578\r
579 @retval EFI_SUCCESS StringBuffer is filled with a NULL-terminated string.\r
580 @retval EFI_INVALID_PARAMETER The handle or string token is unknown.\r
581 @retval EFI_BUFFER_TOO_SMALL The buffer provided was not large enough to\r
582 allow the entire string to be stored.\r
583\r
584**/\r
585typedef\r
586EFI_STATUS\r
69686d56 587(EFIAPI *FRAMEWORK_EFI_HII_GET_STRING)(\r
79964ac8 588 IN EFI_HII_PROTOCOL *This,\r
dc7b4a5c 589 IN FRAMEWORK_EFI_HII_HANDLE Handle,\r
79964ac8 590 IN STRING_REF Token,\r
591 IN BOOLEAN Raw,\r
592 IN CHAR16 *LanguageString,\r
593 IN OUT UINTN *BufferLength,\r
594 OUT EFI_STRING StringBuffer\r
595 );\r
596\r
597/**\r
598 Allows a program to extract a part of a string of not more than a given width.\r
599\r
600 @param This A pointer to the EFI_HII_PROTOCOL instance.\r
601 @param Handle The handle on which the string resides.\r
602 @param Token The string token assigned to the string.\r
603 @param Index On input, the offset into the string where the line is to start.\r
604 On output, the index is updated to point to beyond the last character returned\r
605 in the call.\r
606 @param LineWidth The maximum width of the line in units of narrow glyphs.\r
607 @param LanguageString Pointer to a NULL-terminated string containing a\r
608 single ISO 639-2 language identifier, indicating the language to print.\r
609 @param BufferLength Pointer to the length of the StringBuffer.\r
610 @param StringBuffer The buffer designed to receive the characters in the string.\r
611\r
612 @retval EFI_SUCCESS StringBuffer filled with characters that will fit on the line.\r
613 @retval EFI_NOT_FOUND The font glyph for at least one of the characters in\r
614 the string is not in the font database.\r
615 @retval EFI_BUFFER_TOO_SMALL The buffer provided was not large enough\r
616 to allow the entire string to be stored.\r
617\r
618**/\r
619typedef\r
620EFI_STATUS\r
69686d56 621(EFIAPI *FRAMEWORK_EFI_HII_GET_LINE)(\r
79964ac8 622 IN EFI_HII_PROTOCOL *This,\r
dc7b4a5c 623 IN FRAMEWORK_EFI_HII_HANDLE Handle,\r
79964ac8 624 IN STRING_REF Token,\r
625 IN OUT UINT16 *Index,\r
626 IN UINT16 LineWidth,\r
627 IN CHAR16 *LanguageString,\r
628 IN OUT UINT16 *BufferLength,\r
629 OUT EFI_STRING StringBuffer\r
630 );\r
631\r
632/**\r
633 Allows a program to extract a form or form package that has previously\r
634 been registered with the HII database.\r
635\r
636 @param This A pointer to the EFI_HII_PROTOCOL instance.\r
637 @param Handle Handle on which the form resides.\r
638 @param FormId The ID of the form to return. If the ID is zero,\r
639 the entire form package is returned.\r
640 @param BufferLength On input, the length of the Buffer. On output,\r
641 the length of the returned buffer,\r
642 @param Buffer The buffer designed to receive the form(s).\r
643\r
644 @retval EFI_SUCCESS Buffer filled with the requested forms. BufferLength\r
645 was updated.\r
646 @retval EFI_INVALID_PARAMETER The handle is unknown.\r
647 @retval EFI_NOT_FOUND A form on the requested handle cannot be found with\r
648 the requested FormId.\r
649 @retval EFI_BUFFER_TOO_SMALL The buffer provided was not large enough\r
650 to allow the form to be stored.\r
651\r
652**/\r
653typedef\r
654EFI_STATUS\r
69686d56 655(EFIAPI *FRAMEWORK_EFI_HII_GET_FORMS)(\r
79964ac8 656 IN EFI_HII_PROTOCOL *This,\r
dc7b4a5c 657 IN FRAMEWORK_EFI_HII_HANDLE Handle,\r
79964ac8 658 IN EFI_FORM_ID FormId,\r
659 IN OUT UINTN *BufferLength,\r
660 OUT UINT8 *Buffer\r
661 );\r
662\r
663/**\r
664 Extracts the defaults that are associated with a given handle in the HII database.\r
665\r
666 @param This A pointer to the EFI_HII_PROTOCOL instance.\r
667 @param Handle The HII handle from which will have default data retrieved.\r
668 @param DefaultMask The mask used to specify some type of default override when extracting\r
669 the default image data.\r
670 @param VariablePackList A indirect pointer to the first entry of a link list with\r
671 type EFI_HII_VARIABLE_PACK_LIST.\r
672\r
673 @retval EFI_SUCCESS The VariablePackList was populated with the appropriate\r
674 default setting data.\r
675 @retval EFI_NOT_FOUND The IFR does not have any explicit or default map(s).\r
676 @retval EFI_INVALID_PARAMETER The HII database entry associated with Handle\r
677 contain invalid data.\r
678\r
679**/\r
680typedef\r
681EFI_STATUS\r
69686d56 682(EFIAPI *FRAMEWORK_EFI_HII_GET_DEFAULT_IMAGE)(\r
79964ac8 683 IN EFI_HII_PROTOCOL *This,\r
dc7b4a5c 684 IN FRAMEWORK_EFI_HII_HANDLE Handle,\r
79964ac8 685 IN UINTN DefaultMask,\r
686 OUT EFI_HII_VARIABLE_PACK_LIST **VariablePackList\r
687 );\r
688\r
689/**\r
690 Allows the caller to update a form or form package that has previously been\r
691 registered with the EFI HII database.\r
692\r
693 @param This A pointer to the EFI_HII_PROTOCOL instance.\r
694 @param Handle Handle of the package where the form to be updated resides.\r
695 @param Label The label inside the form package where the update is to take place.\r
696 @param AddData If TRUE, adding data at a given Label; otherwise,\r
697 if FALSE, removing data at a given Label.\r
698 @param Data The buffer containing the new tags to insert after the Label\r
699\r
700 @retval EFI_SUCCESS The form was updated with the new tags.\r
701 @retval EFI_INVALID_PARAMETER The buffer for the buffer length does not\r
702 contain an integral number of tags.\r
703 @retval EFI_NOT_FOUND The Handle, Label, or FormId was not found.\r
704\r
705**/\r
706typedef\r
707EFI_STATUS\r
69686d56 708(EFIAPI *FRAMEWORK_EFI_HII_UPDATE_FORM)(\r
79964ac8 709 IN EFI_HII_PROTOCOL *This,\r
dc7b4a5c 710 IN FRAMEWORK_EFI_HII_HANDLE Handle,\r
79964ac8 711 IN EFI_FORM_LABEL Label,\r
712 IN BOOLEAN AddData,\r
102e7272 713 IN FRAMEWORK_EFI_HII_UPDATE_DATA *Data\r
79964ac8 714 );\r
715\r
716/**\r
717 Retrieves the current keyboard layout.\r
718\r
719 @param This A pointer to the EFI_HII_PROTOCOL instance.\r
720 @param DescriptorCount A pointer to the number of Descriptor entries being\r
721 described in the keyboard layout being retrieved.\r
dc7b4a5c 722 @param Descriptor A pointer to a buffer containing an array of FRAMEWORK_EFI_KEY_DESCRIPTOR\r
79964ac8 723 entries. Each entry will reflect the definition of a specific physical key.\r
724\r
725 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.\r
726\r
727**/\r
728typedef\r
729EFI_STATUS\r
69686d56 730(EFIAPI *FRAMEWORK_EFI_HII_GET_KEYBOARD_LAYOUT)(\r
79964ac8 731 IN EFI_HII_PROTOCOL *This,\r
732 OUT UINT16 *DescriptorCount,\r
dc7b4a5c 733 OUT FRAMEWORK_EFI_KEY_DESCRIPTOR *Descriptor\r
79964ac8 734 );\r
735\r
736/**\r
737 @par Protocol Description:\r
738 The HII Protocol manages the HII database, which is a repository for data\r
739 having to do with fonts, strings, forms, keyboards, and other future human\r
740 interface items.\r
741\r
742 @param NewPack\r
743 Extracts the various packs from a package list.\r
744\r
745 @param RemovePack\r
746 Removes a package from the HII database.\r
747\r
748 @param FindHandles\r
749 Determines the handles that are currently active in the database.\r
750\r
751 @param ExportDatabase\r
752 Export the entire contents of the database to a buffer.\r
753\r
754 @param TestString\r
755 Tests if all of the characters in a string have corresponding font characters.\r
756\r
757 @param GetGlyph\r
758 Translates a Unicode character into the corresponding font glyph.\r
759\r
760 @param GlyphToBlt\r
761 Converts a glyph value into a format that is ready for a UGA BLT command.\r
762\r
763 @param NewString\r
764 Allows a new string to be added to an already existing string package.\r
765\r
766 @param GetPrimaryLanguages\r
767 Allows a program to determine the primary languages that are supported\r
768 on a given handle.\r
769\r
770 @param GetSecondaryLanguages\r
771 Allows a program to determine which secondary languages are supported\r
772 on a given handle for a given primary language.\r
773\r
774 @param GetString\r
775 Extracts a string from a package that is already registered with the\r
776 EFI HII database.\r
777\r
778 @param ResetString\r
779 Remove any new strings that were added after the initial string export\r
780 for this handle.\r
781\r
782 @param GetLine\r
783 Allows a program to extract a part of a string of not more than a given width.\r
784\r
785 @param GetForms\r
786 Allows a program to extract a form or form package that has been previously registered.\r
787\r
788 @param GetDefaultImage\r
789 Allows a program to extract the nonvolatile image that represents the default storage image.\r
790\r
791 @param UpdateForm\r
792 Allows a program to update a previously registered form.\r
793\r
794 @param GetKeyboardLayout\r
795 Allows a program to extract the current keyboard layout.\r
796\r
797**/\r
798struct _EFI_HII_PROTOCOL {\r
c1adc63d 799 FRAMEWORK_EFI_HII_NEW_PACK NewPack;\r
800 FRAMEWORK_EFI_HII_REMOVE_PACK RemovePack;\r
801 FRAMEWORK_EFI_HII_FIND_HANDLES FindHandles;\r
802 FRAMEWORK_EFI_HII_EXPORT ExportDatabase;\r
803\r
804 FRAMEWORK_EFI_HII_TEST_STRING TestString;\r
805 FRAMEWORK_EFI_HII_GET_GLYPH GetGlyph;\r
806 FRAMEWORK_EFI_HII_GLYPH_TO_BLT GlyphToBlt;\r
807\r
808 FRAMEWORK_EFI_HII_NEW_STRING NewString;\r
809 FRAMEWORK_EFI_HII_GET_PRI_LANGUAGES GetPrimaryLanguages;\r
810 FRAMEWORK_EFI_HII_GET_SEC_LANGUAGES GetSecondaryLanguages;\r
811 FRAMEWORK_EFI_HII_GET_STRING GetString;\r
812 FRAMEWORK_EFI_HII_RESET_STRINGS ResetStrings;\r
813 FRAMEWORK_EFI_HII_GET_LINE GetLine;\r
814 FRAMEWORK_EFI_HII_GET_FORMS GetForms;\r
815 FRAMEWORK_EFI_HII_GET_DEFAULT_IMAGE GetDefaultImage;\r
816 FRAMEWORK_EFI_HII_UPDATE_FORM UpdateForm;\r
817\r
818 FRAMEWORK_EFI_HII_GET_KEYBOARD_LAYOUT GetKeyboardLayout;\r
79964ac8 819};\r
820\r
821extern EFI_GUID gEfiHiiProtocolGuid;\r
822\r
823#endif\r