2 This file defines the Human Interface Infrastructure protocol, which is
3 used by resources that want to publish IFR/Font/String data and have it
4 collected by the Configuration engine.
6 Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
7 SPDX-License-Identifier: BSD-2-Clause-Patent
9 @par Revision Reference:
10 This protocol is defined in Framework for EFI Human Interface Infrastructure
11 Specification Version 0.92.
15 #ifndef _FRAMEWORK_HII_H_
16 #define _FRAMEWORK_HII_H_
19 // EFI_GRAPHICS_OUTPUT_BLT_PIXEL is defined in MdePkg/Protocol/GraphicsOutput.h
21 #include <Protocol/GraphicsOutput.h>
23 /// In both EDK and EDK II, there is an incompatbile change in the Framework HII protocol.
24 /// This change should cause a change of GUID in both of code and HII specification. But we
25 /// updated the GUID in code in EDK and EDK II. The 0.92 specification is not updated. This
29 /// Note that EFI_HII_PROTOCOL_GUID is different from that defined in the Framework HII
30 /// 0.92 specification because the specification changed part of HII interfaces but did not update the protocol
33 #define EFI_HII_PROTOCOL_GUID \
35 0xd7ad636e, 0xb997, 0x459b, {0xbf, 0x3f, 0x88, 0x46, 0x89, 0x79, 0x80, 0xe1} \
38 #define EFI_HII_COMPATIBILITY_PROTOCOL_GUID \
40 0x5542cce1, 0xdf5c, 0x4d1b, { 0xab, 0xca, 0x36, 0x4f, 0x77, 0xd3, 0x99, 0xfb } \
43 typedef UINT32 RELOFST
;
45 typedef struct _EFI_HII_PROTOCOL EFI_HII_PROTOCOL
;
48 /// Note: Name difference between code and the Framework HII 0.92 specificaiton.
49 /// Add FRAMEWORK_ prefix to avoid a name confict with EFI_HII_HANDLE, defined in the
50 /// UEFI 2.1d specification.
52 typedef UINT16 FRAMEWORK_EFI_HII_HANDLE
;
55 /// HII package type values
57 #define EFI_HII_FONT 1
58 #define EFI_HII_STRING 2
60 #define EFI_HII_KEYBOARD 4
61 #define EFI_HII_HANDLES 5
62 #define EFI_HII_VARIABLE 6
63 #define EFI_HII_DEVICE_PATH 7
66 // References to string tokens must use this macro to enable scanning for
69 #define STRING_TOKEN(t) t
72 // The following types are currently defined:
73 // EFI_FORM_ID has been defined in UEFI spec.
75 typedef UINT16 EFI_FORM_LABEL
;
80 /// The header found at the start of each package.
83 UINT32 Length
; ///< The size of the package in bytes.
84 UINT16 Type
; ///< The type of the package.
85 } EFI_HII_PACK_HEADER
;
88 /// The IFR package structure.
89 /// Immediately following the EFI_HII_IFR_PACK structure will be a series of IFR opcodes.
92 EFI_HII_PACK_HEADER Header
; ///< Header of the IFR package.
96 /// HII Handle package structure.
100 /// Header of the package.
102 EFI_HII_PACK_HEADER Header
; ///< Must be filled in.
104 /// The image handle of the driver to which the package is referring.
106 EFI_HANDLE ImageHandle
; ///< Must be filled in.
108 /// The handle of the device that is being described by this package.
110 EFI_HANDLE DeviceHandle
; ///< Optional.
112 /// The handle of the parent of the device that is being described by this package.
114 EFI_HANDLE ControllerHandle
; ///< Optional.
116 /// The handle that was registered to receive EFI_FORM_CALLBACK_PROTOCOL calls from other drivers.
118 EFI_HANDLE CallbackHandle
; ///< Optional.
120 /// Note this field is not defined in the Framework HII 0.92 specificaiton.
121 /// Unused. Reserved for source code compatibility.
123 EFI_HANDLE COBExportHandle
; ///< Optional.
124 } EFI_HII_HANDLE_PACK
;
127 /// The variable package structure.
131 /// The header of the package.
133 EFI_HII_PACK_HEADER Header
;
135 /// The GUID of the EFI variable.
137 EFI_GUID VariableGuid
;
139 /// The length in bytes of the EFI variable.
141 UINT32 VariableNameLength
;
143 /// The unique value for this variable.
147 // CHAR16 VariableName[]; //Null-terminated
149 } EFI_HII_VARIABLE_PACK
;
152 /// The device path package structure.
156 /// The header of the package.
158 EFI_HII_PACK_HEADER Header
;
160 // EFI_DEVICE_PATH DevicePath[];
162 } EFI_HII_DEVICE_PATH_PACK
;
166 /// A unique value that correlates to the original HII handle.
168 FRAMEWORK_EFI_HII_HANDLE HiiHandle
;
170 /// If an IFR pack exists in a data table that does not contain strings,
171 /// then the strings for that IFR pack are located in another data table
172 /// that contains a string pack and has a matching HiiDataTable.PackageGuid.
174 EFI_GUID PackageGuid
;
176 /// The size of the EFI_HII_DATA_TABLE in bytes.
178 UINT32 DataTableSize
;
180 /// The byte offset from the start of this structure to the IFR data.
181 /// If the offset value is 0, then no IFR data is enclosed.
183 UINT32 IfrDataOffset
;
185 /// The byte offset from the start of this structure to the string data.
186 /// If the offset value is 0, then no string data is enclosed.
188 UINT32 StringDataOffset
;
190 /// The byte offset from the start of this structure to the variable data.
191 /// If the offset value is 0, then no variable data is enclosed.
193 UINT32 VariableDataOffset
;
195 /// The byte offset from the start of this structure to the device path data.
196 /// If the offset value is 0, then no DevicePath data is enclosed.
198 UINT32 DevicePathOffset
;
200 /// The number of VariableData[] elements in the array.
202 UINT32 NumberOfVariableData
;
204 /// The number of language string packages.
206 UINT32 NumberOfLanguages
;
208 // EFI_HII_DEVICE_PATH_PACK DevicePath[];
209 // EFI_HII_VARIABLE_PACK VariableData[];
210 // EFI_HII_IFR_PACK IfrData;
211 // EFI_HII_STRING_PACK StringData[];
213 } EFI_HII_DATA_TABLE
;
216 /// The structure defining the format for exporting data from the HII Database.
220 /// Number of EFI_HII_DATA_TABLE entries.
222 UINT32 NumberOfHiiDataTables
;
224 /// Defines the revision of the EFI_HII_DATA_TABLE structure.
228 // EFI_HII_DATA_TABLE HiiDataTable[];
230 } EFI_HII_EXPORT_TABLE
;
233 /// The structure used to pass data to update a form or form package
234 /// that has previously been registered with the EFI HII database.
238 /// If TRUE, indicates that the FormCallbackHandle value will
239 /// be used to update the contents of the CallBackHandle entry in the form set.
241 BOOLEAN FormSetUpdate
;
243 /// This parameter is valid only when FormSetUpdate is TRUE.
244 /// The value in this parameter will be used to update the contents
245 /// of the CallbackHandle entry in the form set.
247 EFI_PHYSICAL_ADDRESS FormCallbackHandle
;
249 /// If TRUE, indicates that the FormTitle contents will be
250 /// used to update the FormValue's title.
254 /// Specifies which form is to be updated if the FormUpdate value is TRUE.
258 /// This parameter is valid only when the FormUpdate parameter is TRUE.
259 /// The value in this parameter will be used to update the contents of the form title.
261 STRING_REF FormTitle
;
263 /// The number of Data entries in this structure.
266 /// An array of 1+ opcodes, specified by DataCount.
269 } EFI_HII_UPDATE_DATA
;
274 #define LANG_RIGHT_TO_LEFT 0x00000001
277 /// A string package is used to localize strings to a particular
278 /// language. The package is associated with a particular driver
279 /// or set of drivers. Tools are used to associate tokens with
280 /// string references in forms and in programs. These tokens are
281 /// language agnostic. When paired with a language pack (directly
282 /// or indirectly), the string token resolves into an actual
283 /// UNICODE string. NumStringPointers determines how many
284 /// StringPointers (offset values) there are, as well as the total
285 /// number of Strings that are defined.
289 /// The header of the package.
291 EFI_HII_PACK_HEADER Header
;
293 /// The string containing one or more ISO 639-2 three-character designator(s)
294 /// of the language or languages whose translations are contained in this language pack.
295 /// The first designator indicates the primary language, while the others are secondary languages.
297 RELOFST LanguageNameString
;
299 /// Contains the offset into this structure of a printable name of the language
300 /// for use when prompting the user. The language printed is to be the primary language.
302 RELOFST PrintableLanguageName
;
304 /// The number of Strings and StringPointers contained within the string package.
306 UINT32 NumStringPointers
;
308 /// Indicates the direction the language is to be printed.
312 // RELOFST StringPointers[];
313 // EFI_STRING Strings[];
315 } EFI_HII_STRING_PACK
;
319 /// A font list consists of a font header followed by a series
320 /// of glyph structures. Note that fonts are not language specific.
324 /// The header of the package.
326 EFI_HII_PACK_HEADER Header
;
328 /// The number of NarrowGlyphs that are included in the font package.
330 UINT16 NumberOfNarrowGlyphs
;
332 /// The number of WideGlyphs that are included in the font package.
334 UINT16 NumberOfWideGlyphs
;
335 //EFI_NARROW_GLYPH NarrowGlyphs[];
336 //EFI_WIDE_GLYPH WideGlyphs[];
340 /// The definition of a specific physical key
342 /// Note: The name difference between code and the Framework HII 0.92 specification.
343 /// Add FRAMEWORK_ prefix to avoid name confict with EFI_KEY_DESCRIPTOR defined in the
344 /// UEFI 2.1d specification.
348 /// Used to describe a physical key on a keyboard.
352 /// The Unicode value for the Key.
355 /// The Unicode value for the key with the shift key being held down.
357 CHAR16 ShiftedUnicode
;
359 /// The Unicode value for the key with the Alt-GR being held down.
363 /// The Unicode value for the key with the Alt-GR and shift keys being held down.
365 CHAR16 ShiftedAltGrUnicode
;
367 /// Modifier keys are defined to allow for special functionality that
368 /// is not necessarily accomplished by a printable character.
371 } FRAMEWORK_EFI_KEY_DESCRIPTOR
;
374 /// This structure allows a sparse set of keys to be redefined
375 /// or a complete redefinition of the keyboard layout. Most
376 /// keyboards have a lot of commonality in their layouts, therefore
377 /// only defining those keys that need to change from the default
378 /// minimizes the passed in information.
380 /// Additionally, when an update occurs, the active keyboard layout
381 /// will be switched to the newly updated keyboard layout. This
382 /// allows for situations that when a keyboard layout driver is
383 /// loaded as part of system initialization, the system will default
384 /// the keyboard behavior to the new layout.
388 /// The header of the package.
389 EFI_HII_PACK_HEADER Header
;
391 /// A pointer to a buffer containing an array of EFI_KEY_DESCRIPTOR entries.
392 /// Each entry will reflect the definition of a specific physical key.
394 FRAMEWORK_EFI_KEY_DESCRIPTOR
*Descriptor
;
396 /// The number of Descriptor entries being described.
398 UINT8 DescriptorCount
;
399 } EFI_HII_KEYBOARD_PACK
;
402 /// The packages structure that will be used to pass contents into the HII database.
404 /// The EFI_HII_PACKAGES can contain various number of packages of different types just
405 /// after the structure as inline data.
409 /// The number of packages being defined in this structure.
411 UINTN NumberOfPackages
;
413 /// The GUID to be used to identify this set of packages that are being exported
414 /// to the HII database.
418 // EFI_HII_HANDLE_PACK *HandlePack; // Only one pack.
419 // EFI_HII_IFR_PACK *IfrPack; // Only one pack.
420 // EFI_HII_FONT_PACK *FontPack[]; // Multiple packs ok
421 // EFI_HII_STRING_PACK *StringPack[]; // Multiple packs ok
422 // EFI_HII_KEYBOARD_PACK *KeyboardPack[]; // Multiple packs ok
427 /// The packed link list that contains all the discernable defaults of variables
428 /// for the opcodes that are defined in this Handle's domain of data.
430 typedef struct _EFI_HII_VARIABLE_PACK_LIST
{
432 /// A pointer points to the next data structure of type
433 /// EFI_HII_VARIABLE_PACK_LIST in the packed link list.
435 struct _EFI_HII_VARIABLE_PACK_LIST
*NextVariablePack
;
437 /// A pointer points to the content of the variable entry defined by GUID/name/data.
439 EFI_HII_VARIABLE_PACK
*VariablePack
;
440 //EFI_HII_VARIABLE_PACK Content
441 } EFI_HII_VARIABLE_PACK_LIST
;
447 Registers the various packs that are passed in via the Packages parameter.
449 @param This A pointer to the EFI_HII_PROTOCOL instance.
450 @param Packages A pointer to an EFI_HII_PACKAGES package instance.
451 @param Handle A pointer to the FRAMEWORK_EFI_HII_HANDLE instance.
453 @retval EFI_SUCCESS Data was extracted from Packages, the database
454 was updated with the data, and Handle returned successfully.
455 @retval EFI_INVALID_PARAMETER The content of Packages was invalid.
460 (EFIAPI
*EFI_HII_NEW_PACK
)(
461 IN EFI_HII_PROTOCOL
*This
,
462 IN EFI_HII_PACKAGES
*Packages
,
463 OUT FRAMEWORK_EFI_HII_HANDLE
*Handle
467 Removes a package from the HII database.
469 @param This A pointer to the EFI_HII_PROTOCOL instance.
470 @param Handle The handle that was registered to the data that
471 is requested for removal.
473 @retval EFI_SUCCESS The data associated with the Handle was removed
474 from the HII database.
475 @retval EFI_INVALID_PARAMETER The Handle was not valid.
480 (EFIAPI
*EFI_HII_REMOVE_PACK
)(
481 IN EFI_HII_PROTOCOL
*This
,
482 IN FRAMEWORK_EFI_HII_HANDLE Handle
486 Determines the handles that are currently active in the database.
488 @param This A pointer to the EFI_HII_PROTOCOL instance.
489 @param HandleBufferLength On input, a pointer to the length of the handle
490 buffer. On output, the length of the handle buffer that is required
491 for the handles found.
492 @param Handle An array of FRAMEWORK_EFI_HII_HANDLE instances returned.
494 @retval EFI_SUCCESS Handle was updated successfully.
495 @retval EFI_BUFFER_TOO_SMALL The HandleBufferLength parameter indicates
496 that Handle is too small to support the number of handles.
501 (EFIAPI
*EFI_HII_FIND_HANDLES
)(
502 IN EFI_HII_PROTOCOL
*This
,
503 IN OUT UINT16
*HandleBufferLength
,
504 OUT FRAMEWORK_EFI_HII_HANDLE
*Handle
508 Exports the contents of the database into a buffer.
510 @param This A pointer to the EFI_HII_PROTOCOL instance.
511 @param Handle A FRAMEWORK_EFI_HII_HANDLE that corresponds to the desired
512 handle to export. If the value is 0, the entire database will be exported.
513 The data is exported in a format described by the
514 structure definition of EFI_HII_EXPORT_TABLE.
516 On input, a pointer to the length of the buffer. On output, the length
517 of the buffer that is required for the export data.
518 @param Buffer A pointer to a buffer that will contain the results of the export function.
520 @retval EFI_SUCCESS The buffer was successfully filled with BufferSize amount of data.
521 @retval EFI_BUFFER_TOO_SMALL The value in BufferSize was too small to contain the export data.
526 (EFIAPI
*EFI_HII_EXPORT
)(
527 IN EFI_HII_PROTOCOL
*This
,
528 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
529 IN OUT UINTN
*BufferSize
,
534 Remove any new strings that were added after the initial string export
537 @param This A pointer to the EFI_HII_PROTOCOL instance.
538 @param Handle The handle on which the string resides.
540 @retval EFI_SUCCESS Successfully removed strings from the handle.
541 @retval EFI_INVALID_PARAMETER The Handle was unknown.
546 (EFIAPI
*EFI_HII_RESET_STRINGS
)(
547 IN EFI_HII_PROTOCOL
*This
,
548 IN FRAMEWORK_EFI_HII_HANDLE Handle
552 Tests if all of the characters in a string have corresponding font characters.
554 @param This A pointer to the EFI_HII_PROTOCOL instance.
555 @param StringToTest A pointer to a Unicode string.
556 @param FirstMissing A pointer to an index into the string. On input,
557 the index of the first character in the StringToTest
558 to examine. On exit, the index of the first character
559 encountered for which a glyph is unavailable.
560 If all glyphs in the string are available, the
561 index is the index of the terminator of the string.
562 @param GlyphBufferSize A pointer to a value. On output, if the function
563 returns EFI_SUCCESS, it contains the amount of
564 memory that is required to store the string's
567 @retval EFI_SUCCESS All glyphs are available. Note that an empty string
568 always returns this value.
569 @retval EFI_NOT_FOUND A glyph was not found for a character.
574 (EFIAPI
*EFI_HII_TEST_STRING
)(
575 IN EFI_HII_PROTOCOL
*This
,
576 IN CHAR16
*StringToTest
,
577 IN OUT UINT32
*FirstMissing
,
578 OUT UINT32
*GlyphBufferSize
582 Translates a Unicode character into the corresponding font glyph.
584 Note that this function prototype name is different from that in the Framework HII 0.92 specification
585 to avoid name confict with EFI_HII_GET_GLYPH defined in the UEFI 2.1d specification.
587 @param This A pointer to the EFI_HII_PROTOCOL instance.
588 @param Source A pointer to a Unicode string.
589 @param Index On input, the offset into the string from which to
590 fetch the character. On successful completion, the
591 index is updated to the first character past the
592 character(s) making up the just extracted glyph.
593 @param GlyphBuffer Pointer to an array where the glyphs corresponding
594 to the characters in the source may be stored.
595 GlyphBuffer is assumed to be wide enough to accept
596 a wide glyph character.
597 @param BitWidth If EFI_SUCCESS was returned, the UINT16 pointed to by
598 this value is filled with the length of the glyph in
599 pixels. It is unchanged if the call was unsuccessful.
600 @param InternalStatus The cell pointed to by this parameter must be
601 initialized to zero prior to invoking the call the
602 first time for any string.
604 @retval EFI_SUCCESS Found the corresponding font glyph for a Unicode
606 @retval EFI_NOT_FOUND A glyph for a character was not found.
611 (EFIAPI
*FRAMEWORK_EFI_HII_GET_GLYPH
)(
612 IN EFI_HII_PROTOCOL
*This
,
614 IN OUT UINT16
*Index
,
615 OUT UINT8
**GlyphBuffer
,
616 OUT UINT16
*BitWidth
,
617 IN OUT UINT32
*InternalStatus
621 Translates a glyph into the format required for input to the Universal
622 Graphics Adapter (UGA) Block Transfer (BLT) routines.
624 @param This A pointer to the EFI_HII_PROTOCOL instance.
625 @param GlyphBuffer A pointer to the buffer that contains glyph data.
626 @param Foreground The foreground setting requested to be used for the
627 generated BltBuffer data.
628 @param Background The background setting requested to be used for the
629 generated BltBuffer data.
630 @param Count The entry in the BltBuffer upon which to act.
631 @param Width The width in bits of the glyph being converted.
632 @param Height The height in bits of the glyph being converted
633 @param BltBuffer A pointer to the buffer that contains the data that is
634 ready to be used by the UGA BLT routines.
636 @retval EFI_SUCCESS Successfully translated a glyph into the required
637 format for input to UGA BLT routines.
638 @retval EFI_NOT_FOUND A glyph for a character was not found.
639 @note Inconsistent with specification here:
640 In Framework Spec, HII specification 0.92. The type of 3rd, 4th and 8th parameter is EFI_UGA_PIXEL.
641 Here the definition uses the EFI_GRAPHICS_OUTPUT_BLT_PIXEL, which is defined in UEFI 2.1 specification.
645 (EFIAPI
*EFI_HII_GLYPH_TO_BLT
)(
646 IN EFI_HII_PROTOCOL
*This
,
647 IN UINT8
*GlyphBuffer
,
648 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground
,
649 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background
,
653 IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer
657 Allows a new string to be added to an already existing string package.
659 Note that this function prototype name is different from that in the Framework HII 0.92 specification
660 to avoid name confict with EFI_HII_NEW_STRING defined in the UEFI 2.1d specification.
662 @param This A pointer to the EFI_HII_PROTOCOL instance.
663 @param Pointer to a NULL-terminated string containing a single
664 ISO 639-2 language identifier, indicating the language
665 in which the string is translated.
666 @param Handle The handle of the language pack to which the string
668 @param Reference The identifier of the string to be added. If the
669 reference value is zero, then the string will be
670 assigned a new identifier on that handle for
671 the language specified. Otherwise, the string will
672 be updated with the NewString Value.
673 @param NewString The string to be added.
675 @retval EFI_SUCCESS The string was effectively registered.
676 @retval EFI_INVALID_PARAMETER The Handle was unknown.
681 (EFIAPI
*FRAMEWORK_EFI_HII_NEW_STRING
)(
682 IN EFI_HII_PROTOCOL
*This
,
684 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
685 IN OUT STRING_REF
*Reference
,
690 Allows a program to determine the primary languages that are supported
693 @param This A pointer to the EFI_HII_PROTOCOL instance.
694 @param Handle The handle on which the strings reside.
695 @param LanguageString A string allocated by GetPrimaryLanguages() that
696 contains a list of all primary languages registered
699 @retval EFI_SUCCESS LanguageString was correctly returned.
700 @retval EFI_INVALID_PARAMETER The Handle was unknown.
705 (EFIAPI
*EFI_HII_GET_PRI_LANGUAGES
)(
706 IN EFI_HII_PROTOCOL
*This
,
707 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
708 OUT EFI_STRING
*LanguageString
712 Allows a program to determine which secondary languages are supported
713 on a given handle for a given primary language.
715 @param This A pointer to the EFI_HII_PROTOCOL instance.
716 @param Handle The handle on which the strings reside.
717 @param PrimaryLanguage Pointer to a NULL-terminated string containing a
718 single ISO 639-2 language identifier, indicating
719 the primary language.
720 @param LanguageString A string allocated by GetSecondaryLanguages()
721 containing a list of all secondary languages
722 registered on the handle.
724 @retval EFI_SUCCESS LanguageString was correctly returned.
725 @retval EFI_INVALID_PARAMETER The Handle was unknown.
730 (EFIAPI
*EFI_HII_GET_SEC_LANGUAGES
)(
731 IN EFI_HII_PROTOCOL
*This
,
732 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
733 IN CHAR16
*PrimaryLanguage
,
734 OUT EFI_STRING
*LanguageString
738 Extracts a string from a package already registered with the EFI HII database.
740 Note that this function prototype name is different from that in the Framework HII 0.92 specification
741 to avoid name confict with EFI_HII_GET_STRING defined in the UEFI 2.1d specification.
743 @param This A pointer to the EFI_HII_PROTOCOL instance.
744 @param Handle The handle on which the string resides.
745 @param Token The string token assigned to the string.
746 @param Raw If TRUE, the string is returned unedited in the
747 internal storage format. If false, the string
748 returned is edited by replacing <cr> with <space>
749 and by removing special characters such as the
751 @param LanguageString Pointer to a NULL-terminated string containing a
752 single ISO 639-2 language identifier, indicating
753 the language to print. If the LanguageString is
754 empty (starts with a NULL), the default system
755 language will be used to determine the language.
756 @param BufferLength Length of the StringBuffer.
757 @param StringBuffer The buffer designed to receive the characters in the string.
759 @retval EFI_SUCCESS StringBuffer is filled with a NULL-terminated string.
760 @retval EFI_INVALID_PARAMETER The handle or string token is unknown.
761 @retval EFI_BUFFER_TOO_SMALL The buffer provided was not large enough to
762 allow the entire string to be stored.
767 (EFIAPI
*FRAMEWORK_EFI_HII_GET_STRING
)(
768 IN EFI_HII_PROTOCOL
*This
,
769 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
772 IN CHAR16
*LanguageString
,
773 IN OUT UINTN
*BufferLength
,
774 OUT EFI_STRING StringBuffer
778 Allows a program to extract a part of a string of not more than a given width.
780 @param This A pointer to the EFI_HII_PROTOCOL instance.
781 @param Handle The handle on which the string resides.
782 @param Token The string token assigned to the string.
783 @param Index On input, the offset into the string where the
784 line is to start. On output, the index is updated
785 to point beyond the last character returned in
787 @param LineWidth The maximum width of the line in units of narrow glyphs.
788 @param LanguageString The pointer to a NULL-terminated string containing a
789 single ISO 639-2 language identifier, indicating
790 the language to print.
791 @param BufferLength The pointer to the length of the StringBuffer.
792 @param StringBuffer The buffer designed to receive the characters in
795 @retval EFI_SUCCESS StringBuffer filled with characters that will fit
797 @retval EFI_NOT_FOUND The font glyph for at least one of the characters in
798 the string is not in the font database.
799 @retval EFI_BUFFER_TOO_SMALL The buffer provided was not large enough
800 to allow the entire string to be stored.
805 (EFIAPI
*EFI_HII_GET_LINE
)(
806 IN EFI_HII_PROTOCOL
*This
,
807 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
809 IN OUT UINT16
*Index
,
811 IN CHAR16
*LanguageString
,
812 IN OUT UINT16
*BufferLength
,
813 OUT EFI_STRING StringBuffer
817 Allows a program to extract a form or form package that has previously
818 been registered with the HII database.
820 @param This A pointer to the EFI_HII_PROTOCOL instance.
821 @param Handle Handle on which the form resides.
822 @param FormId The ID of the form to return. If the ID is zero,
823 the entire form package is returned.
824 @param BufferLength On input, the length of the Buffer. On output,
825 the length of the returned buffer,
826 @param Buffer The buffer designed to receive the form(s).
828 @retval EFI_SUCCESS Buffer filled with the requested forms. BufferLength
830 @retval EFI_INVALID_PARAMETER The handle is unknown.
831 @retval EFI_NOT_FOUND A form on the requested handle cannot be found with
832 the requested FormId.
833 @retval EFI_BUFFER_TOO_SMALL The buffer provided was not large enough
834 to allow the form to be stored.
839 (EFIAPI
*EFI_HII_GET_FORMS
)(
840 IN EFI_HII_PROTOCOL
*This
,
841 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
842 IN EFI_FORM_ID FormId
,
843 IN OUT UINTN
*BufferLength
,
848 Extracts the defaults that are associated with a given handle in the HII database.
850 @param This A pointer to the EFI_HII_PROTOCOL instance.
851 @param Handle The HII handle from which will have default data retrieved.
852 @param DefaultMask The mask used to specify some type of default
853 override when extracting the default image data.
854 @param VariablePackList An indirect pointer to the first entry of a link
855 list with type EFI_HII_VARIABLE_PACK_LIST.
857 @retval EFI_SUCCESS The VariablePackList was populated with the appropriate
858 default setting data.
859 @retval EFI_NOT_FOUND The IFR does not have any explicit or default map(s).
860 @retval EFI_INVALID_PARAMETER The HII database entry associated with Handle
861 contains invalid data.
866 (EFIAPI
*EFI_HII_GET_DEFAULT_IMAGE
)(
867 IN EFI_HII_PROTOCOL
*This
,
868 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
869 IN UINTN DefaultMask
,
870 OUT EFI_HII_VARIABLE_PACK_LIST
**VariablePackList
874 Allows the caller to update a form or form package that has previously been
875 registered with the EFI HII database.
877 @param This A pointer to the EFI_HII_PROTOCOL instance.
878 @param Handle Handle of the package where the form to be updated resides.
879 @param Label The label inside the form package where the update is to take place.
880 @param AddData If TRUE, adding data at a given Label; otherwise,
881 if FALSE, removing data at a given Label.
882 @param Data The buffer containing the new tags to insert after the Label
884 @retval EFI_SUCCESS The form was updated with the new tags.
885 @retval EFI_INVALID_PARAMETER The buffer for the buffer length does not
886 contain an integral number of tags.
887 @retval EFI_NOT_FOUND The Handle, Label, or FormId was not found.
892 (EFIAPI
*EFI_HII_UPDATE_FORM
)(
893 IN EFI_HII_PROTOCOL
*This
,
894 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
895 IN EFI_FORM_LABEL Label
,
897 IN EFI_HII_UPDATE_DATA
*Data
901 Retrieves the current keyboard layout.
903 Note that this function prototype name is different from that in the Framework HII 0.92 specification
904 to avoid name confict with EFI_HII_GET_KEYBOARD_LAYOUT defined in the UEFI 2.1d specification.
906 @param This A pointer to the EFI_HII_PROTOCOL instance.
907 @param DescriptorCount A pointer to the number of Descriptor entries being
908 described in the keyboard layout being retrieved.
909 @param Descriptor A pointer to a buffer containing an array of
910 FRAMEWORK_EFI_KEY_DESCRIPTOR entries. Each entry
911 will reflect the definition of a specific physical key.
913 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.
918 (EFIAPI
*FRAMEWORK_EFI_HII_GET_KEYBOARD_LAYOUT
)(
919 IN EFI_HII_PROTOCOL
*This
,
920 OUT UINT16
*DescriptorCount
,
921 OUT FRAMEWORK_EFI_KEY_DESCRIPTOR
*Descriptor
925 /// The HII Protocol manages the HII database, which is a repository for data
926 /// having to do with fonts, strings, forms, keyboards, and other future human
929 struct _EFI_HII_PROTOCOL
{
931 /// Extracts the various packs from a package list.
933 EFI_HII_NEW_PACK NewPack
;
936 /// Removes a package from the HII database.
938 EFI_HII_REMOVE_PACK RemovePack
;
941 /// Determines the handles that are currently active in the database.
943 EFI_HII_FIND_HANDLES FindHandles
;
946 /// Exports the entire contents of the database to a buffer.
948 EFI_HII_EXPORT ExportDatabase
;
951 /// Tests if all of the characters in a string have corresponding font characters.
953 EFI_HII_TEST_STRING TestString
;
956 /// Translates a Unicode character into the corresponding font glyph.
958 FRAMEWORK_EFI_HII_GET_GLYPH GetGlyph
;
961 /// Converts a glyph value into a format that is ready for a UGA BLT command.
963 EFI_HII_GLYPH_TO_BLT GlyphToBlt
;
966 /// Allows a new string to be added to an already existing string package.
968 FRAMEWORK_EFI_HII_NEW_STRING NewString
;
971 /// Allows a program to determine the primary languages that are supported
972 /// on a given handle.
974 EFI_HII_GET_PRI_LANGUAGES GetPrimaryLanguages
;
977 /// Allows a program to determine which secondary languages are supported
978 /// on a given handle for a given primary language.
980 EFI_HII_GET_SEC_LANGUAGES GetSecondaryLanguages
;
983 /// Extracts a string from a package that is already registered with the
984 /// EFI HII database.
986 FRAMEWORK_EFI_HII_GET_STRING GetString
;
989 /// Removes any new strings that were added after the initial string export
992 /// Note this function is not defined in the Framework HII 0.92 specification.
994 EFI_HII_RESET_STRINGS ResetStrings
;
997 /// Allows a program to extract a part of a string of not more than a given width.
999 EFI_HII_GET_LINE GetLine
;
1002 /// Allows a program to extract a form or form package that has been previously registered.
1004 EFI_HII_GET_FORMS GetForms
;
1007 /// Allows a program to extract the nonvolatile image that represents the default storage image.
1009 EFI_HII_GET_DEFAULT_IMAGE GetDefaultImage
;
1012 /// Allows a program to update a previously registered form.
1014 EFI_HII_UPDATE_FORM UpdateForm
;
1017 /// Allows a program to extract the current keyboard layout.
1019 FRAMEWORK_EFI_HII_GET_KEYBOARD_LAYOUT GetKeyboardLayout
;
1022 extern EFI_GUID gEfiHiiProtocolGuid
;
1023 extern EFI_GUID gEfiHiiCompatibilityProtocolGuid
;