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 - 2010, Intel Corporation. All rights reserved<BR>
7 This program and the accompanying materials are licensed and made available under
8 the terms and conditions of the BSD License that accompanies this distribution.
9 The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php.
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 @par Revision Reference:
16 This protocol is defined in Framework for EFI Human Interface Infrastructure
17 Specification Version 0.92.
21 #ifndef _FRAMEWORK_HII_H_
22 #define _FRAMEWORK_HII_H_
25 // EFI_GRAPHICS_OUTPUT_BLT_PIXEL is defined in MdePkg/Protocol/GraphicsOutput.h
27 #include <Protocol/GraphicsOutput.h>
29 /// In both EDK and EDK II, there is an incompatbile change in the Framework HII protocol.
30 /// This change should cause a change of GUID in both of code and HII specification. But we
31 /// updated the GUID in code in EDK and EDK II. The 0.92 specification is not updated. This
35 /// Note that EFI_HII_PROTOCOL_GUID is different from that defined in the Framework HII
36 /// 0.92 specification because the specification changed part of HII interfaces but did not update the protocol
39 #define EFI_HII_PROTOCOL_GUID \
41 0xd7ad636e, 0xb997, 0x459b, {0xbf, 0x3f, 0x88, 0x46, 0x89, 0x79, 0x80, 0xe1} \
44 #define EFI_HII_COMPATIBILITY_PROTOCOL_GUID \
46 0x5542cce1, 0xdf5c, 0x4d1b, { 0xab, 0xca, 0x36, 0x4f, 0x77, 0xd3, 0x99, 0xfb } \
49 typedef UINT32 RELOFST
;
51 typedef struct _EFI_HII_PROTOCOL EFI_HII_PROTOCOL
;
54 /// Note: Name difference between code and the Framework HII 0.92 specificaiton.
55 /// Add FRAMEWORK_ prefix to avoid a name confict with EFI_HII_HANDLE, defined in the
56 /// UEFI 2.1d specification.
58 typedef UINT16 FRAMEWORK_EFI_HII_HANDLE
;
61 /// HII package type values
63 #define EFI_HII_FONT 1
64 #define EFI_HII_STRING 2
66 #define EFI_HII_KEYBOARD 4
67 #define EFI_HII_HANDLES 5
68 #define EFI_HII_VARIABLE 6
69 #define EFI_HII_DEVICE_PATH 7
72 // References to string tokens must use this macro to enable scanning for
75 #define STRING_TOKEN(t) t
78 // The following types are currently defined:
79 // EFI_FORM_ID has been defined in UEFI spec.
81 typedef UINT16 EFI_FORM_LABEL
;
86 /// The header found at the start of each package.
89 UINT32 Length
; ///< The size of the package in bytes.
90 UINT16 Type
; ///< The type of the package.
91 } EFI_HII_PACK_HEADER
;
94 /// The IFR package structure.
95 /// Immediately following the EFI_HII_IFR_PACK structure will be a series of IFR opcodes.
98 EFI_HII_PACK_HEADER Header
; ///< Header of the IFR package.
102 /// HII Handle package structure.
106 /// Header of the package.
108 EFI_HII_PACK_HEADER Header
; ///< Must be filled in.
110 /// The image handle of the driver to which the package is referring.
112 EFI_HANDLE ImageHandle
; ///< Must be filled in.
114 /// The handle of the device that is being described by this package.
116 EFI_HANDLE DeviceHandle
; ///< Optional.
118 /// The handle of the parent of the device that is being described by this package.
120 EFI_HANDLE ControllerHandle
; ///< Optional.
122 /// The handle that was registered to receive EFI_FORM_CALLBACK_PROTOCOL calls from other drivers.
124 EFI_HANDLE CallbackHandle
; ///< Optional.
126 /// Note this field is not defined in the Framework HII 0.92 specificaiton.
127 /// Unused. Reserved for source code compatibility.
129 EFI_HANDLE COBExportHandle
; ///< Optional.
130 } EFI_HII_HANDLE_PACK
;
133 /// The variable package structure.
137 /// The header of the package.
139 EFI_HII_PACK_HEADER Header
;
141 /// The GUID of the EFI variable.
143 EFI_GUID VariableGuid
;
145 /// The length in bytes of the EFI variable.
147 UINT32 VariableNameLength
;
149 /// The unique value for this variable.
153 // CHAR16 VariableName[]; //Null-terminated
155 } EFI_HII_VARIABLE_PACK
;
158 /// The device path package structure.
162 /// The header of the package.
164 EFI_HII_PACK_HEADER Header
;
166 // EFI_DEVICE_PATH DevicePath[];
168 } EFI_HII_DEVICE_PATH_PACK
;
172 /// A unique value that correlates to the original HII handle.
174 FRAMEWORK_EFI_HII_HANDLE HiiHandle
;
176 /// If an IFR pack exists in a data table that does not contain strings,
177 /// then the strings for that IFR pack are located in another data table
178 /// that contains a string pack and has a matching HiiDataTable.PackageGuid.
180 EFI_GUID PackageGuid
;
182 /// The size of the EFI_HII_DATA_TABLE in bytes.
184 UINT32 DataTableSize
;
186 /// The byte offset from the start of this structure to the IFR data.
187 /// If the offset value is 0, then no IFR data is enclosed.
189 UINT32 IfrDataOffset
;
191 /// The byte offset from the start of this structure to the string data.
192 /// If the offset value is 0, then no string data is enclosed.
194 UINT32 StringDataOffset
;
196 /// The byte offset from the start of this structure to the variable data.
197 /// If the offset value is 0, then no variable data is enclosed.
199 UINT32 VariableDataOffset
;
201 /// The byte offset from the start of this structure to the device path data.
202 /// If the offset value is 0, then no DevicePath data is enclosed.
204 UINT32 DevicePathOffset
;
206 /// The number of VariableData[] elements in the array.
208 UINT32 NumberOfVariableData
;
210 /// The number of language string packages.
212 UINT32 NumberOfLanguages
;
214 // EFI_HII_DEVICE_PATH_PACK DevicePath[];
215 // EFI_HII_VARIABLE_PACK VariableData[];
216 // EFI_HII_IFR_PACK IfrData;
217 // EFI_HII_STRING_PACK StringData[];
219 } EFI_HII_DATA_TABLE
;
222 /// The structure defining the format for exporting data from the HII Database.
226 /// Number of EFI_HII_DATA_TABLE entries.
228 UINT32 NumberOfHiiDataTables
;
230 /// Defines the revision of the EFI_HII_DATA_TABLE structure.
234 // EFI_HII_DATA_TABLE HiiDataTable[];
236 } EFI_HII_EXPORT_TABLE
;
239 /// The structure used to pass data to update a form or form package
240 /// that has previously been registered with the EFI HII database.
244 /// If TRUE, indicates that the FormCallbackHandle value will
245 /// be used to update the contents of the CallBackHandle entry in the form set.
247 BOOLEAN FormSetUpdate
;
249 /// This parameter is valid only when FormSetUpdate is TRUE.
250 /// The value in this parameter will be used to update the contents
251 /// of the CallbackHandle entry in the form set.
253 EFI_PHYSICAL_ADDRESS FormCallbackHandle
;
255 /// If TRUE, indicates that the FormTitle contents will be
256 /// used to update the FormValue's title.
260 /// Specifies which form is to be updated if the FormUpdate value is TRUE.
264 /// This parameter is valid only when the FormUpdate parameter is TRUE.
265 /// The value in this parameter will be used to update the contents of the form title.
267 STRING_REF FormTitle
;
269 /// The number of Data entries in this structure.
272 /// An array of 1+ opcodes, specified by DataCount.
275 } EFI_HII_UPDATE_DATA
;
280 #define LANG_RIGHT_TO_LEFT 0x00000001
283 /// A string package is used to localize strings to a particular
284 /// language. The package is associated with a particular driver
285 /// or set of drivers. Tools are used to associate tokens with
286 /// string references in forms and in programs. These tokens are
287 /// language agnostic. When paired with a language pack (directly
288 /// or indirectly), the string token resolves into an actual
289 /// UNICODE string. NumStringPointers determines how many
290 /// StringPointers (offset values) there are, as well as the total
291 /// number of Strings that are defined.
295 /// The header of the package.
297 EFI_HII_PACK_HEADER Header
;
299 /// The string containing one or more ISO 639-2 three-character designator(s)
300 /// of the language or languages whose translations are contained in this language pack.
301 /// The first designator indicates the primary language, while the others are secondary languages.
303 RELOFST LanguageNameString
;
305 /// Contains the offset into this structure of a printable name of the language
306 /// for use when prompting the user. The language printed is to be the primary language.
308 RELOFST PrintableLanguageName
;
310 /// The number of Strings and StringPointers contained within the string package.
312 UINT32 NumStringPointers
;
314 /// Indicates the direction the language is to be printed.
318 // RELOFST StringPointers[];
319 // EFI_STRING Strings[];
321 } EFI_HII_STRING_PACK
;
325 /// A font list consists of a font header followed by a series
326 /// of glyph structures. Note that fonts are not language specific.
330 /// The header of the package.
332 EFI_HII_PACK_HEADER Header
;
334 /// The number of NarrowGlyphs that are included in the font package.
336 UINT16 NumberOfNarrowGlyphs
;
338 /// The number of WideGlyphs that are included in the font package.
340 UINT16 NumberOfWideGlyphs
;
341 //EFI_NARROW_GLYPH NarrowGlyphs[];
342 //EFI_WIDE_GLYPH WideGlyphs[];
346 /// The definition of a specific physical key
348 /// Note: The name difference between code and the Framework HII 0.92 specification.
349 /// Add FRAMEWORK_ prefix to avoid name confict with EFI_KEY_DESCRIPTOR defined in the
350 /// UEFI 2.1d specification.
354 /// Used to describe a physical key on a keyboard.
358 /// The Unicode value for the Key.
361 /// The Unicode value for the key with the shift key being held down.
363 CHAR16 ShiftedUnicode
;
365 /// The Unicode value for the key with the Alt-GR being held down.
369 /// The Unicode value for the key with the Alt-GR and shift keys being held down.
371 CHAR16 ShiftedAltGrUnicode
;
373 /// Modifier keys are defined to allow for special functionality that
374 /// is not necessarily accomplished by a printable character.
377 } FRAMEWORK_EFI_KEY_DESCRIPTOR
;
380 /// This structure allows a sparse set of keys to be redefined
381 /// or a complete redefinition of the keyboard layout. Most
382 /// keyboards have a lot of commonality in their layouts, therefore
383 /// only defining those keys that need to change from the default
384 /// minimizes the passed in information.
386 /// Additionally, when an update occurs, the active keyboard layout
387 /// will be switched to the newly updated keyboard layout. This
388 /// allows for situations that when a keyboard layout driver is
389 /// loaded as part of system initialization, the system will default
390 /// the keyboard behavior to the new layout.
394 /// The header of the package.
395 EFI_HII_PACK_HEADER Header
;
397 /// A pointer to a buffer containing an array of EFI_KEY_DESCRIPTOR entries.
398 /// Each entry will reflect the definition of a specific physical key.
400 FRAMEWORK_EFI_KEY_DESCRIPTOR
*Descriptor
;
402 /// The number of Descriptor entries being described.
404 UINT8 DescriptorCount
;
405 } EFI_HII_KEYBOARD_PACK
;
408 /// The packages structure that will be used to pass contents into the HII database.
410 /// The EFI_HII_PACKAGES can contain various number of packages of different types just
411 /// after the structure as inline data.
415 /// The number of packages being defined in this structure.
417 UINTN NumberOfPackages
;
419 /// The GUID to be used to identify this set of packages that are being exported
420 /// to the HII database.
424 // EFI_HII_HANDLE_PACK *HandlePack; // Only one pack.
425 // EFI_HII_IFR_PACK *IfrPack; // Only one pack.
426 // EFI_HII_FONT_PACK *FontPack[]; // Multiple packs ok
427 // EFI_HII_STRING_PACK *StringPack[]; // Multiple packs ok
428 // EFI_HII_KEYBOARD_PACK *KeyboardPack[]; // Multiple packs ok
433 /// The packed link list that contains all the discernable defaults of variables
434 /// for the opcodes that are defined in this Handle's domain of data.
436 typedef struct _EFI_HII_VARIABLE_PACK_LIST
{
438 /// A pointer points to the next data structure of type
439 /// EFI_HII_VARIABLE_PACK_LIST in the packed link list.
441 struct _EFI_HII_VARIABLE_PACK_LIST
*NextVariablePack
;
443 /// A pointer points to the content of the variable entry defined by GUID/name/data.
445 EFI_HII_VARIABLE_PACK
*VariablePack
;
446 //EFI_HII_VARIABLE_PACK Content
447 } EFI_HII_VARIABLE_PACK_LIST
;
453 Registers the various packs that are passed in via the Packages parameter.
455 @param This A pointer to the EFI_HII_PROTOCOL instance.
456 @param Packages A pointer to an EFI_HII_PACKAGES package instance.
457 @param Handle A pointer to the FRAMEWORK_EFI_HII_HANDLE instance.
459 @retval EFI_SUCCESS Data was extracted from Packages, the database
460 was updated with the data, and Handle returned successfully.
461 @retval EFI_INVALID_PARAMETER The content of Packages was invalid.
466 (EFIAPI
*EFI_HII_NEW_PACK
)(
467 IN EFI_HII_PROTOCOL
*This
,
468 IN EFI_HII_PACKAGES
*Packages
,
469 OUT FRAMEWORK_EFI_HII_HANDLE
*Handle
473 Removes a package from the HII database.
475 @param This A pointer to the EFI_HII_PROTOCOL instance.
476 @param Handle The handle that was registered to the data that
477 is requested for removal.
479 @retval EFI_SUCCESS The data associated with the Handle was removed
480 from the HII database.
481 @retval EFI_INVALID_PARAMETER The Handle was not valid.
486 (EFIAPI
*EFI_HII_REMOVE_PACK
)(
487 IN EFI_HII_PROTOCOL
*This
,
488 IN FRAMEWORK_EFI_HII_HANDLE Handle
492 Determines the handles that are currently active in the database.
494 @param This A pointer to the EFI_HII_PROTOCOL instance.
495 @param HandleBufferLength On input, a pointer to the length of the handle
496 buffer. On output, the length of the handle buffer that is required
497 for the handles found.
498 @param Handle An array of FRAMEWORK_EFI_HII_HANDLE instances returned.
500 @retval EFI_SUCCESS Handle was updated successfully.
501 @retval EFI_BUFFER_TOO_SMALL The HandleBufferLength parameter indicates
502 that Handle is too small to support the number of handles.
507 (EFIAPI
*EFI_HII_FIND_HANDLES
)(
508 IN EFI_HII_PROTOCOL
*This
,
509 IN OUT UINT16
*HandleBufferLength
,
510 OUT FRAMEWORK_EFI_HII_HANDLE
*Handle
514 Exports the contents of the database into a buffer.
516 @param This A pointer to the EFI_HII_PROTOCOL instance.
517 @param Handle A FRAMEWORK_EFI_HII_HANDLE that corresponds to the desired
518 handle to export. If the value is 0, the entire database will be exported.
519 The data is exported in a format described by the
520 structure definition of EFI_HII_EXPORT_TABLE.
522 On input, a pointer to the length of the buffer. On output, the length
523 of the buffer that is required for the export data.
524 @param Buffer A pointer to a buffer that will contain the results of the export function.
526 @retval EFI_SUCCESS The buffer was successfully filled with BufferSize amount of data.
527 @retval EFI_BUFFER_TOO_SMALL The value in BufferSize was too small to contain the export data.
532 (EFIAPI
*EFI_HII_EXPORT
)(
533 IN EFI_HII_PROTOCOL
*This
,
534 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
535 IN OUT UINTN
*BufferSize
,
540 Remove any new strings that were added after the initial string export
543 @param This A pointer to the EFI_HII_PROTOCOL instance.
544 @param Handle The handle on which the string resides.
546 @retval EFI_SUCCESS Successfully removed strings from the handle.
547 @retval EFI_INVALID_PARAMETER The Handle was unknown.
552 (EFIAPI
*EFI_HII_RESET_STRINGS
)(
553 IN EFI_HII_PROTOCOL
*This
,
554 IN FRAMEWORK_EFI_HII_HANDLE Handle
558 Tests if all of the characters in a string have corresponding font characters.
560 @param This A pointer to the EFI_HII_PROTOCOL instance.
561 @param StringToTest A pointer to a Unicode string.
562 @param FirstMissing A pointer to an index into the string. On input,
563 the index of the first character in the StringToTest
564 to examine. On exit, the index of the first character
565 encountered for which a glyph is unavailable.
566 If all glyphs in the string are available, the
567 index is the index of the terminator of the string.
568 @param GlyphBufferSize A pointer to a value. On output, if the function
569 returns EFI_SUCCESS, it contains the amount of
570 memory that is required to store the string's
573 @retval EFI_SUCCESS All glyphs are available. Note that an empty string
574 always returns this value.
575 @retval EFI_NOT_FOUND A glyph was not found for a character.
580 (EFIAPI
*EFI_HII_TEST_STRING
)(
581 IN EFI_HII_PROTOCOL
*This
,
582 IN CHAR16
*StringToTest
,
583 IN OUT UINT32
*FirstMissing
,
584 OUT UINT32
*GlyphBufferSize
588 Translates a Unicode character into the corresponding font glyph.
590 Note that this function prototype name is different from that in the Framework HII 0.92 specification
591 to avoid name confict with EFI_HII_GET_GLYPH defined in the UEFI 2.1d specification.
593 @param This A pointer to the EFI_HII_PROTOCOL instance.
594 @param Source A pointer to a Unicode string.
595 @param Index On input, the offset into the string from which to
596 fetch the character. On successful completion, the
597 index is updated to the first character past the
598 character(s) making up the just extracted glyph.
599 @param GlyphBuffer Pointer to an array where the glyphs corresponding
600 to the characters in the source may be stored.
601 GlyphBuffer is assumed to be wide enough to accept
602 a wide glyph character.
603 @param BitWidth If EFI_SUCCESS was returned, the UINT16 pointed to by
604 this value is filled with the length of the glyph in
605 pixels. It is unchanged if the call was unsuccessful.
606 @param InternalStatus The cell pointed to by this parameter must be
607 initialized to zero prior to invoking the call the
608 first time for any string.
610 @retval EFI_SUCCESS Found the corresponding font glyph for a Unicode
612 @retval EFI_NOT_FOUND A glyph for a character was not found.
617 (EFIAPI
*FRAMEWORK_EFI_HII_GET_GLYPH
)(
618 IN EFI_HII_PROTOCOL
*This
,
620 IN OUT UINT16
*Index
,
621 OUT UINT8
**GlyphBuffer
,
622 OUT UINT16
*BitWidth
,
623 IN OUT UINT32
*InternalStatus
627 Translates a glyph into the format required for input to the Universal
628 Graphics Adapter (UGA) Block Transfer (BLT) routines.
630 @param This A pointer to the EFI_HII_PROTOCOL instance.
631 @param GlyphBuffer A pointer to the buffer that contains glyph data.
632 @param Foreground The foreground setting requested to be used for the
633 generated BltBuffer data.
634 @param Background The background setting requested to be used for the
635 generated BltBuffer data.
636 @param Count The entry in the BltBuffer upon which to act.
637 @param Width The width in bits of the glyph being converted.
638 @param Height The height in bits of the glyph being converted
639 @param BltBuffer A pointer to the buffer that contains the data that is
640 ready to be used by the UGA BLT routines.
642 @retval EFI_SUCCESS Successfully translated a glyph into the required
643 format for input to UGA BLT routines.
644 @retval EFI_NOT_FOUND A glyph for a character was not found.
645 @note Inconsistent with specification here:
646 In Framework Spec, HII specification 0.92. The type of 3rd, 4th and 8th parameter is EFI_UGA_PIXEL.
647 Here the definition uses the EFI_GRAPHICS_OUTPUT_BLT_PIXEL, which is defined in UEFI 2.1 specification.
651 (EFIAPI
*EFI_HII_GLYPH_TO_BLT
)(
652 IN EFI_HII_PROTOCOL
*This
,
653 IN UINT8
*GlyphBuffer
,
654 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground
,
655 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background
,
659 IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer
663 Allows a new string to be added to an already existing string package.
665 Note that this function prototype name is different from that in the Framework HII 0.92 specification
666 to avoid name confict with EFI_HII_NEW_STRING defined in the UEFI 2.1d specification.
668 @param This A pointer to the EFI_HII_PROTOCOL instance.
669 @param Pointer to a NULL-terminated string containing a single
670 ISO 639-2 language identifier, indicating the language
671 in which the string is translated.
672 @param Handle The handle of the language pack to which the string
674 @param Reference The identifier of the string to be added. If the
675 reference value is zero, then the string will be
676 assigned a new identifier on that handle for
677 the language specified. Otherwise, the string will
678 be updated with the NewString Value.
679 @param NewString The string to be added.
681 @retval EFI_SUCCESS The string was effectively registered.
682 @retval EFI_INVALID_PARAMETER The Handle was unknown.
687 (EFIAPI
*FRAMEWORK_EFI_HII_NEW_STRING
)(
688 IN EFI_HII_PROTOCOL
*This
,
690 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
691 IN OUT STRING_REF
*Reference
,
696 Allows a program to determine the primary languages that are supported
699 @param This A pointer to the EFI_HII_PROTOCOL instance.
700 @param Handle The handle on which the strings reside.
701 @param LanguageString A string allocated by GetPrimaryLanguages() that
702 contains a list of all primary languages registered
705 @retval EFI_SUCCESS LanguageString was correctly returned.
706 @retval EFI_INVALID_PARAMETER The Handle was unknown.
711 (EFIAPI
*EFI_HII_GET_PRI_LANGUAGES
)(
712 IN EFI_HII_PROTOCOL
*This
,
713 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
714 OUT EFI_STRING
*LanguageString
718 Allows a program to determine which secondary languages are supported
719 on a given handle for a given primary language.
721 @param This A pointer to the EFI_HII_PROTOCOL instance.
722 @param Handle The handle on which the strings reside.
723 @param PrimaryLanguage Pointer to a NULL-terminated string containing a
724 single ISO 639-2 language identifier, indicating
725 the primary language.
726 @param LanguageString A string allocated by GetSecondaryLanguages()
727 containing a list of all secondary languages
728 registered on the handle.
730 @retval EFI_SUCCESS LanguageString was correctly returned.
731 @retval EFI_INVALID_PARAMETER The Handle was unknown.
736 (EFIAPI
*EFI_HII_GET_SEC_LANGUAGES
)(
737 IN EFI_HII_PROTOCOL
*This
,
738 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
739 IN CHAR16
*PrimaryLanguage
,
740 OUT EFI_STRING
*LanguageString
744 Extracts a string from a package already registered with the EFI HII database.
746 Note that this function prototype name is different from that in the Framework HII 0.92 specification
747 to avoid name confict with EFI_HII_GET_STRING defined in the UEFI 2.1d specification.
749 @param This A pointer to the EFI_HII_PROTOCOL instance.
750 @param Handle The handle on which the string resides.
751 @param Token The string token assigned to the string.
752 @param Raw If TRUE, the string is returned unedited in the
753 internal storage format. If false, the string
754 returned is edited by replacing <cr> with <space>
755 and by removing special characters such as the
757 @param LanguageString Pointer to a NULL-terminated string containing a
758 single ISO 639-2 language identifier, indicating
759 the language to print. If the LanguageString is
760 empty (starts with a NULL), the default system
761 language will be used to determine the language.
762 @param BufferLength Length of the StringBuffer.
763 @param StringBuffer The buffer designed to receive the characters in the string.
765 @retval EFI_SUCCESS StringBuffer is filled with a NULL-terminated string.
766 @retval EFI_INVALID_PARAMETER The handle or string token is unknown.
767 @retval EFI_BUFFER_TOO_SMALL The buffer provided was not large enough to
768 allow the entire string to be stored.
773 (EFIAPI
*FRAMEWORK_EFI_HII_GET_STRING
)(
774 IN EFI_HII_PROTOCOL
*This
,
775 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
778 IN CHAR16
*LanguageString
,
779 IN OUT UINTN
*BufferLength
,
780 OUT EFI_STRING StringBuffer
784 Allows a program to extract a part of a string of not more than a given width.
786 @param This A pointer to the EFI_HII_PROTOCOL instance.
787 @param Handle The handle on which the string resides.
788 @param Token The string token assigned to the string.
789 @param Index On input, the offset into the string where the
790 line is to start. On output, the index is updated
791 to point beyond the last character returned in
793 @param LineWidth The maximum width of the line in units of narrow glyphs.
794 @param LanguageString The pointer to a NULL-terminated string containing a
795 single ISO 639-2 language identifier, indicating
796 the language to print.
797 @param BufferLength The pointer to the length of the StringBuffer.
798 @param StringBuffer The buffer designed to receive the characters in
801 @retval EFI_SUCCESS StringBuffer filled with characters that will fit
803 @retval EFI_NOT_FOUND The font glyph for at least one of the characters in
804 the string is not in the font database.
805 @retval EFI_BUFFER_TOO_SMALL The buffer provided was not large enough
806 to allow the entire string to be stored.
811 (EFIAPI
*EFI_HII_GET_LINE
)(
812 IN EFI_HII_PROTOCOL
*This
,
813 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
815 IN OUT UINT16
*Index
,
817 IN CHAR16
*LanguageString
,
818 IN OUT UINT16
*BufferLength
,
819 OUT EFI_STRING StringBuffer
823 Allows a program to extract a form or form package that has previously
824 been registered with the HII database.
826 @param This A pointer to the EFI_HII_PROTOCOL instance.
827 @param Handle Handle on which the form resides.
828 @param FormId The ID of the form to return. If the ID is zero,
829 the entire form package is returned.
830 @param BufferLength On input, the length of the Buffer. On output,
831 the length of the returned buffer,
832 @param Buffer The buffer designed to receive the form(s).
834 @retval EFI_SUCCESS Buffer filled with the requested forms. BufferLength
836 @retval EFI_INVALID_PARAMETER The handle is unknown.
837 @retval EFI_NOT_FOUND A form on the requested handle cannot be found with
838 the requested FormId.
839 @retval EFI_BUFFER_TOO_SMALL The buffer provided was not large enough
840 to allow the form to be stored.
845 (EFIAPI
*EFI_HII_GET_FORMS
)(
846 IN EFI_HII_PROTOCOL
*This
,
847 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
848 IN EFI_FORM_ID FormId
,
849 IN OUT UINTN
*BufferLength
,
854 Extracts the defaults that are associated with a given handle in the HII database.
856 @param This A pointer to the EFI_HII_PROTOCOL instance.
857 @param Handle The HII handle from which will have default data retrieved.
858 @param DefaultMask The mask used to specify some type of default
859 override when extracting the default image data.
860 @param VariablePackList An indirect pointer to the first entry of a link
861 list with type EFI_HII_VARIABLE_PACK_LIST.
863 @retval EFI_SUCCESS The VariablePackList was populated with the appropriate
864 default setting data.
865 @retval EFI_NOT_FOUND The IFR does not have any explicit or default map(s).
866 @retval EFI_INVALID_PARAMETER The HII database entry associated with Handle
867 contains invalid data.
872 (EFIAPI
*EFI_HII_GET_DEFAULT_IMAGE
)(
873 IN EFI_HII_PROTOCOL
*This
,
874 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
875 IN UINTN DefaultMask
,
876 OUT EFI_HII_VARIABLE_PACK_LIST
**VariablePackList
880 Allows the caller to update a form or form package that has previously been
881 registered with the EFI HII database.
883 @param This A pointer to the EFI_HII_PROTOCOL instance.
884 @param Handle Handle of the package where the form to be updated resides.
885 @param Label The label inside the form package where the update is to take place.
886 @param AddData If TRUE, adding data at a given Label; otherwise,
887 if FALSE, removing data at a given Label.
888 @param Data The buffer containing the new tags to insert after the Label
890 @retval EFI_SUCCESS The form was updated with the new tags.
891 @retval EFI_INVALID_PARAMETER The buffer for the buffer length does not
892 contain an integral number of tags.
893 @retval EFI_NOT_FOUND The Handle, Label, or FormId was not found.
898 (EFIAPI
*EFI_HII_UPDATE_FORM
)(
899 IN EFI_HII_PROTOCOL
*This
,
900 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
901 IN EFI_FORM_LABEL Label
,
903 IN EFI_HII_UPDATE_DATA
*Data
907 Retrieves the current keyboard layout.
909 Note that this function prototype name is different from that in the Framework HII 0.92 specification
910 to avoid name confict with EFI_HII_GET_KEYBOARD_LAYOUT defined in the UEFI 2.1d specification.
912 @param This A pointer to the EFI_HII_PROTOCOL instance.
913 @param DescriptorCount A pointer to the number of Descriptor entries being
914 described in the keyboard layout being retrieved.
915 @param Descriptor A pointer to a buffer containing an array of
916 FRAMEWORK_EFI_KEY_DESCRIPTOR entries. Each entry
917 will reflect the definition of a specific physical key.
919 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.
924 (EFIAPI
*FRAMEWORK_EFI_HII_GET_KEYBOARD_LAYOUT
)(
925 IN EFI_HII_PROTOCOL
*This
,
926 OUT UINT16
*DescriptorCount
,
927 OUT FRAMEWORK_EFI_KEY_DESCRIPTOR
*Descriptor
931 /// The HII Protocol manages the HII database, which is a repository for data
932 /// having to do with fonts, strings, forms, keyboards, and other future human
935 struct _EFI_HII_PROTOCOL
{
937 /// Extracts the various packs from a package list.
939 EFI_HII_NEW_PACK NewPack
;
942 /// Removes a package from the HII database.
944 EFI_HII_REMOVE_PACK RemovePack
;
947 /// Determines the handles that are currently active in the database.
949 EFI_HII_FIND_HANDLES FindHandles
;
952 /// Exports the entire contents of the database to a buffer.
954 EFI_HII_EXPORT ExportDatabase
;
957 /// Tests if all of the characters in a string have corresponding font characters.
959 EFI_HII_TEST_STRING TestString
;
962 /// Translates a Unicode character into the corresponding font glyph.
964 FRAMEWORK_EFI_HII_GET_GLYPH GetGlyph
;
967 /// Converts a glyph value into a format that is ready for a UGA BLT command.
969 EFI_HII_GLYPH_TO_BLT GlyphToBlt
;
972 /// Allows a new string to be added to an already existing string package.
974 FRAMEWORK_EFI_HII_NEW_STRING NewString
;
977 /// Allows a program to determine the primary languages that are supported
978 /// on a given handle.
980 EFI_HII_GET_PRI_LANGUAGES GetPrimaryLanguages
;
983 /// Allows a program to determine which secondary languages are supported
984 /// on a given handle for a given primary language.
986 EFI_HII_GET_SEC_LANGUAGES GetSecondaryLanguages
;
989 /// Extracts a string from a package that is already registered with the
990 /// EFI HII database.
992 FRAMEWORK_EFI_HII_GET_STRING GetString
;
995 /// Removes any new strings that were added after the initial string export
998 /// Note this function is not defined in the Framework HII 0.92 specification.
1000 EFI_HII_RESET_STRINGS ResetStrings
;
1003 /// Allows a program to extract a part of a string of not more than a given width.
1005 EFI_HII_GET_LINE GetLine
;
1008 /// Allows a program to extract a form or form package that has been previously registered.
1010 EFI_HII_GET_FORMS GetForms
;
1013 /// Allows a program to extract the nonvolatile image that represents the default storage image.
1015 EFI_HII_GET_DEFAULT_IMAGE GetDefaultImage
;
1018 /// Allows a program to update a previously registered form.
1020 EFI_HII_UPDATE_FORM UpdateForm
;
1023 /// Allows a program to extract the current keyboard layout.
1025 FRAMEWORK_EFI_HII_GET_KEYBOARD_LAYOUT GetKeyboardLayout
;
1028 extern EFI_GUID gEfiHiiProtocolGuid
;
1029 extern EFI_GUID gEfiHiiCompatibilityProtocolGuid
;