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. This protocol is defined in the.
5 Intel Platform Innovation Framework for EFI Human Interface Infrastructure
6 Specification Version 0.92.
8 Copyright (c) 2007 - 2009, Intel Corporation
9 All rights reserved. This program and the accompanying materials
10 are licensed and made available under the terms and conditions of the BSD License
11 which accompanies this distribution. The full text of the license may be found at
12 http://opensource.org/licenses/bsd-license.php
14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
15 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 #ifndef _FRAMEWORK_HII_H_
20 #define _FRAMEWORK_HII_H_
23 // EFI_GRAPHICS_OUTPUT_BLT_PIXEL is defined in MdePkg/Protocol/GraphicsOutput.h
25 #include <Protocol/GraphicsOutput.h>
27 /// In both EDK and EDK II, incompatbile change is done to Framework HII protocol.
28 /// This change should cause a change of GUID in both of code and HII spec. But we
29 /// update the GUID in code in EDK and EDK II. The 0.92 spec is not updated. This
33 /// Note that EFI_HII_PROTOCOL_GUID is different from that defined in the Framework HII
34 /// 0.92 spec because the spec changed part of HII interfaces but did not update the protocol
37 #define EFI_HII_PROTOCOL_GUID \
39 0xd7ad636e, 0xb997, 0x459b, {0xbf, 0x3f, 0x88, 0x46, 0x89, 0x79, 0x80, 0xe1} \
42 #define EFI_HII_COMPATIBILITY_PROTOCOL_GUID \
44 0x5542cce1, 0xdf5c, 0x4d1b, { 0xab, 0xca, 0x36, 0x4f, 0x77, 0xd3, 0x99, 0xfb } \
47 typedef UINT32 RELOFST
;
49 typedef struct _EFI_HII_PROTOCOL EFI_HII_PROTOCOL
;
52 /// Note: Name difference between code and the Framework HII 0.92 spec.
53 /// Add FRAMEWORK_ prefix to avoid name confict with EFI_HII_HANDLE defined in the
56 typedef UINT16 FRAMEWORK_EFI_HII_HANDLE
;
59 /// HII package type values
61 #define EFI_HII_FONT 1
62 #define EFI_HII_STRING 2
64 #define EFI_HII_KEYBOARD 4
65 #define EFI_HII_HANDLES 5
66 #define EFI_HII_VARIABLE 6
67 #define EFI_HII_DEVICE_PATH 7
70 // References to string tokens must use this macro to enable scanning for
73 #define STRING_TOKEN(t) t
76 // The following types are currently defined:
77 // EFI_FORM_ID has been defined in UEFI spec.
79 typedef UINT16 EFI_FORM_LABEL
;
84 /// The header found at the start of each package.
87 UINT32 Length
; ///< The size of the package in bytes.
88 UINT16 Type
; ///< The type of the package.
89 } EFI_HII_PACK_HEADER
;
92 /// IFR package structure.
93 /// Immediately following the EFI_HII_IFR_PACK structure will be a series of IFR opcodes.
96 EFI_HII_PACK_HEADER Header
; ///< Header of the IFR package.
100 /// HII Handle package structure.
104 /// Header of the package.
106 EFI_HII_PACK_HEADER Header
; ///< Must be filled in
108 /// The image handle of the driver to which the package is referring.
110 EFI_HANDLE ImageHandle
; ///< Must be filled in
112 /// The handle of the device that is being described by this package.
114 EFI_HANDLE DeviceHandle
; ///< Optional
116 /// The handle of the parent of the device that is being described by this package.
118 EFI_HANDLE ControllerHandle
; ///< Optional
120 /// The handle that was registered to receive EFI_FORM_CALLBACK_PROTOCOL calls from other drivers.
122 EFI_HANDLE CallbackHandle
; ///< Optional
124 /// Note this field is not defined in the Framework HII 0.92 spec.
125 /// Unused. Reserved for source code compatibility.
127 EFI_HANDLE COBExportHandle
; ///< Optional
128 } EFI_HII_HANDLE_PACK
;
131 /// Variable package structure.
135 /// Header of the package.
137 EFI_HII_PACK_HEADER Header
;
139 /// GUID of the EFI variable
141 EFI_GUID VariableGuid
;
143 /// Length in bytes of the EFI variable
145 UINT32 VariableNameLength
;
147 /// The unique value for this variable
151 // CHAR16 VariableName[]; //Null-terminated
153 } EFI_HII_VARIABLE_PACK
;
156 /// Device path package structure.
160 /// Header of the package.
162 EFI_HII_PACK_HEADER Header
;
164 // EFI_DEVICE_PATH DevicePath[];
166 } EFI_HII_DEVICE_PATH_PACK
;
170 /// Unique value that correlates to the original HII handle.
172 FRAMEWORK_EFI_HII_HANDLE HiiHandle
;
174 /// If an IFR pack exists in a data table that does not contain strings,
175 /// then the strings for that IFR pack are located in another data table
176 /// that contains a string pack and has a matching HiiDataTable.PackageGuid.
178 EFI_GUID PackageGuid
;
180 /// Size of the EFI_HII_DATA_TABLE in bytes.
182 UINT32 DataTableSize
;
184 /// Byte offset from the start of this structure to the IFR data.
185 /// If the offset value is 0, then no IFR data is enclosed.
187 UINT32 IfrDataOffset
;
189 /// Byte offset from the start of this structure to the string data.
190 /// If the offset value is 0, then no string data is enclosed.
192 UINT32 StringDataOffset
;
194 /// Byte offset from the start of this structure to the variable data.
195 /// If the offset value is 0, then no variable data is enclosed.
197 UINT32 VariableDataOffset
;
199 /// Byte offset from the start of this structure to the device path data.
200 /// If the offset value is 0, then no DevicePath data is enclosed.
202 UINT32 DevicePathOffset
;
204 /// Number of VariableData[] elements in the array.
206 UINT32 NumberOfVariableData
;
208 /// The number of language string packages.
210 UINT32 NumberOfLanguages
;
212 // EFI_HII_DEVICE_PATH_PACK DevicePath[];
213 // EFI_HII_VARIABLE_PACK VariableData[];
214 // EFI_HII_IFR_PACK IfrData;
215 // EFI_HII_STRING_PACK StringData[];
217 } EFI_HII_DATA_TABLE
;
220 /// Structure defining format for exporting data from the HII Database.
224 /// Number of EFI_HII_DATA_TABLE entries.
226 UINT32 NumberOfHiiDataTables
;
228 /// Defines the revision of the EFI_HII_DATA_TABLE structure.
232 // EFI_HII_DATA_TABLE HiiDataTable[];
234 } EFI_HII_EXPORT_TABLE
;
237 /// Structure used to pass data to update a form or form package
238 /// that has previously been registered with the EFI HII database.
242 /// If TRUE, indicates that the FormCallbackHandle value will
243 /// be used to update the contents of the CallBackHandle entry in the form set.
245 BOOLEAN FormSetUpdate
;
247 /// This parameter is valid only when FormSetUpdate is TRUE.
248 /// The value in this parameter will be used to update the contents
249 /// of the CallbackHandle entry in the form set.
251 EFI_PHYSICAL_ADDRESS FormCallbackHandle
;
253 /// If TRUE, indicates that the FormTitle contents will be
254 /// used to update the FormValue's title.
258 /// Specifies which form is to be updated if the FormUpdate value is TRUE.
262 /// This parameter is valid only when the FormUpdate parameter is TRUE.
263 /// The value in this parameter will be used to update the contents of the form title.
265 STRING_REF FormTitle
;
267 /// The number of Data entries in this structure.
270 /// An array of 1+ opcodes, specified by DataCount.
273 } EFI_HII_UPDATE_DATA
;
278 #define LANG_RIGHT_TO_LEFT 0x00000001
281 /// A string package is used to localize strings to a particular
282 /// language. The package is associated with a particular driver
283 /// or set of drivers. Tools are used to associate tokens with
284 /// string references in forms and in programs. These tokens are
285 /// language agnostic. When paired with a language pack (directly
286 /// or indirectly), the string token resolves into an actual
287 /// UNICODE string. The NumStringPointers determines how many
288 /// StringPointers (offset values) there are as well as the total
289 /// number of Strings that are defined.
293 /// Header of the package.
295 EFI_HII_PACK_HEADER Header
;
297 /// The string containing one or more ISO 639-2 three-character designator(s)
298 /// of the language or languages whose translations are contained in this language pack.
299 /// The first designator indicates the primary language while the others are secondary languages.
301 RELOFST LanguageNameString
;
303 /// Contains the offset into this structure of a printable name of the language
304 /// for use when prompting the user. The language printed is to be the primary language.
306 RELOFST PrintableLanguageName
;
308 /// The number of Strings and StringPointers contained within the string package.
310 UINT32 NumStringPointers
;
312 /// Indicates the direction the language is to be printed.
316 // RELOFST StringPointers[];
317 // EFI_STRING Strings[];
319 } EFI_HII_STRING_PACK
;
323 /// A font list consists of a font header followed by a series
324 /// of glyph structures. Note that fonts are not language specific.
328 /// Header of the package.
330 EFI_HII_PACK_HEADER Header
;
332 /// The number of NarrowGlyphs that are included in the font package.
334 UINT16 NumberOfNarrowGlyphs
;
336 /// The number of WideGlyphs that are included in the font package.
338 UINT16 NumberOfWideGlyphs
;
339 //EFI_NARROW_GLYPH NarrowGlyphs[];
340 //EFI_WIDE_GLYPH WideGlyphs[];
344 /// The definition of a specific physical key
346 /// Note: Name difference between code and the Framework HII 0.92 spec.
347 /// Add FRAMEWORK_ prefix to avoid name confict with EFI_KEY_DESCRIPTOR defined in the
352 /// Used to describe a physical key on a keyboard.
356 /// Unicode value for the Key.
359 /// Unicode value for the key with the shift key being held down.
361 CHAR16 ShiftedUnicode
;
363 /// Unicode value for the key with the Alt-GR being held down.
367 /// Unicode value for the key with the Alt-GR and shift keys being held down.
369 CHAR16 ShiftedAltGrUnicode
;
371 /// Modifier keys are defined to allow for special functionality that
372 /// is not necessarily accomplished by a printable character.
375 } FRAMEWORK_EFI_KEY_DESCRIPTOR
;
378 /// This structure allows a sparse set of keys to be redefined
379 /// or a complete redefinition of the keyboard layout. Most
380 /// keyboards have a lot of commonality in their layouts, therefore
381 /// only defining those keys that need to change from the default
382 /// minimizes the passed in information.
384 /// Additionally, when an update occurs, the active keyboard layout
385 /// will be switched to the newly updated keyboard layout. This
386 /// allows for situations that when a keyboard layout driver is
387 /// loaded as part of system initialization, the system will default
388 /// the keyboard behavior to the new layout.
392 /// Header of the package.
393 EFI_HII_PACK_HEADER Header
;
395 /// A pointer to a buffer containing an array of EFI_KEY_DESCRIPTOR entries.
396 /// Each entry will reflect the definition of a specific physical key.
398 FRAMEWORK_EFI_KEY_DESCRIPTOR
*Descriptor
;
400 /// The number of Descriptor entries being described.
402 UINT8 DescriptorCount
;
403 } EFI_HII_KEYBOARD_PACK
;
406 /// The packages structure that will be used to pass contents into the HII database.
408 /// The EFI_HII_PACKAGES can contain various number of packages of different types just
409 /// after the structure as inline data.
413 /// The number of packages being defined in this structure.
415 UINTN NumberOfPackages
;
417 /// The GUID to be used to identify this set of packages that are being exported
418 /// to the HII database.
422 // EFI_HII_HANDLE_PACK *HandlePack; // Only one pack.
423 // EFI_HII_IFR_PACK *IfrPack; // Only one pack.
424 // EFI_HII_FONT_PACK *FontPack[]; // Multiple packs ok
425 // EFI_HII_STRING_PACK *StringPack[]; // Multiple packs ok
426 // EFI_HII_KEYBOARD_PACK *KeyboardPack[]; // Multiple packs ok
431 /// Packed link list that contains all the discernable defaults of variables
432 /// for the opcodes that are defined in this Handle's domain of data.
434 typedef struct _EFI_HII_VARIABLE_PACK_LIST
{
436 /// A pointer points to the next data structure of type
437 /// EFI_HII_VARIABLE_PACK_LIST in the packed link list.
439 struct _EFI_HII_VARIABLE_PACK_LIST
*NextVariablePack
;
441 /// A pointer points to the content of the variable entry defined by GUID/name/data.
443 EFI_HII_VARIABLE_PACK
*VariablePack
;
444 //EFI_HII_VARIABLE_PACK Content
445 } EFI_HII_VARIABLE_PACK_LIST
;
451 Registers the various packs that are passed in via the Packages parameter.
453 @param This A pointer to the EFI_HII_PROTOCOL instance.
454 @param Packages A pointer to an EFI_HII_PACKAGES package instance.
455 @param Handle A pointer to the FRAMEWORK_EFI_HII_HANDLE instance.
457 @retval EFI_SUCCESS Data was extracted from Packages, the database
458 was updated with the data, and Handle returned successfully.
459 @retval EFI_INVALID_PARAMETER The content of Packages was invalid.
464 (EFIAPI
*EFI_HII_NEW_PACK
)(
465 IN EFI_HII_PROTOCOL
*This
,
466 IN EFI_HII_PACKAGES
*Packages
,
467 OUT FRAMEWORK_EFI_HII_HANDLE
*Handle
471 Removes a package from the HII database.
473 @param This A pointer to the EFI_HII_PROTOCOL instance.
474 @param Handle The handle that was registered to the data that is requested
477 @retval EFI_SUCCESS The data associated with the Handle was removed
478 from the HII database.
479 @retval EFI_INVALID_PARAMETER The Handle was not valid.
484 (EFIAPI
*EFI_HII_REMOVE_PACK
)(
485 IN EFI_HII_PROTOCOL
*This
,
486 IN FRAMEWORK_EFI_HII_HANDLE Handle
490 Determines the handles that are currently active in the database.
492 @param This A pointer to the EFI_HII_PROTOCOL instance.
493 @param HandleBufferLength On input, a pointer to the length of the handle
494 buffer. On output, the length of the handle buffer that is required
495 for the handles found.
496 @param Handle An array of FRAMEWORK_EFI_HII_HANDLE instances returned.
498 @retval EFI_SUCCESS Handle was updated successfully.
499 @retval EFI_BUFFER_TOO_SMALL The HandleBufferLength parameter indicates
500 that Handle is too small to support the number of handles.
505 (EFIAPI
*EFI_HII_FIND_HANDLES
)(
506 IN EFI_HII_PROTOCOL
*This
,
507 IN OUT UINT16
*HandleBufferLength
,
508 OUT FRAMEWORK_EFI_HII_HANDLE
*Handle
512 Exports the contents of the database into a buffer.
514 @param This A pointer to the EFI_HII_PROTOCOL instance.
515 @param Handle A FRAMEWORK_EFI_HII_HANDLE that corresponds to the desired
516 handle to export. If the value is 0, the entire database will be exported.
517 The data is exported in a format described by the
518 structure definition of EFI_HII_EXPORT_TABLE.
520 On input, a pointer to the length of the buffer. On output, the length
521 of the buffer that is required for the export data.
522 @param Buffer A pointer to a buffer that will contain the results of the export function.
524 @retval EFI_SUCCESS The buffer was successfully filled with BufferSize amount of data.
525 @retval EFI_BUFFER_TOO_SMALL The value in BufferSize was too small to contain the export data.
530 (EFIAPI
*EFI_HII_EXPORT
)(
531 IN EFI_HII_PROTOCOL
*This
,
532 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
533 IN OUT UINTN
*BufferSize
,
538 Remove any new strings that were added after the initial string export
541 @param This A pointer to the EFI_HII_PROTOCOL instance.
542 @param Handle The handle on which the string resides.
544 @retval EFI_SUCCESS Successfully removed strings from the handle.
545 @retval EFI_INVALID_PARAMETER The Handle was unknown.
550 (EFIAPI
*EFI_HII_RESET_STRINGS
)(
551 IN EFI_HII_PROTOCOL
*This
,
552 IN FRAMEWORK_EFI_HII_HANDLE Handle
556 Tests if all of the characters in a string have corresponding font characters.
558 @param This A pointer to the EFI_HII_PROTOCOL instance.
559 @param StringToTest A pointer to a Unicode string.
560 @param FirstMissing A pointer to an index into the string. On input,
561 the index of the first character in the StringToTest to examine. On exit,
562 the index of the first character encountered for which a glyph is unavailable.
563 If all glyphs in the string are available, the index is the index of the
564 terminator of the string.
565 @param GlyphBufferSize A pointer to a value. On output, if the function
566 returns EFI_SUCCESS, it contains the amount of memory that is required to
567 store the string's glyph equivalent.
569 @retval EFI_SUCCESS All glyphs are available. Note that an empty string
570 always returns this value.
571 @retval EFI_NOT_FOUND A glyph was not found for a character.
576 (EFIAPI
*EFI_HII_TEST_STRING
)(
577 IN EFI_HII_PROTOCOL
*This
,
578 IN CHAR16
*StringToTest
,
579 IN OUT UINT32
*FirstMissing
,
580 OUT UINT32
*GlyphBufferSize
584 Translates a Unicode character into the corresponding font glyph.
586 Note that this function prototype name is different from that in the Framework HII 0.92 spec
587 to avoid name confict with EFI_HII_GET_GLYPH defined in the UEFI 2.1d spec.
589 @param This A pointer to the EFI_HII_PROTOCOL instance.
590 @param Source A pointer to a Unicode string.
591 @param Index On input, the offset into the string from which to fetch
592 the character. On successful completion, the index is updated to the first
593 character past the character(s) making up the just extracted glyph.
594 @param GlyphBuffer Pointer to an array where the glyphs corresponding
595 to the characters in the source may be stored. GlyphBuffer is assumed
596 to be wide enough to accept 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 pixels. It is unchanged
599 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 first time for any string.
603 @retval EFI_SUCCESS It worked.
604 @retval EFI_NOT_FOUND A glyph for a character was not found.
609 (EFIAPI
*FRAMEWORK_EFI_HII_GET_GLYPH
)(
610 IN EFI_HII_PROTOCOL
*This
,
612 IN OUT UINT16
*Index
,
613 OUT UINT8
**GlyphBuffer
,
614 OUT UINT16
*BitWidth
,
615 IN OUT UINT32
*InternalStatus
619 Translates a glyph into the format required for input to the Universal
620 Graphics Adapter (UGA) Block Transfer (BLT) routines.
622 @param This A pointer to the EFI_HII_PROTOCOL instance.
623 @param GlyphBuffer A pointer to the buffer that contains glyph data.
624 @param Foreground The foreground setting requested to be used for the
625 generated BltBuffer data.
626 @param Background The background setting requested to be used for the
627 generated BltBuffer data.
628 @param Count The entry in the BltBuffer upon which to act.
629 @param Width The width in bits of the glyph being converted.
630 @param Height The height in bits of the glyph being converted
631 @param BltBuffer A pointer to the buffer that contains the data that is
632 ready to be used by the UGA BLT routines.
634 @retval EFI_SUCCESS It worked.
635 @retval EFI_NOT_FOUND A glyph for a character was not found.
636 @note: Inconsistent with specification here:
637 In Framework Spec, HII spec 0.92. The type of 3rd, 4th and 8th parameter is EFI_UGA_PIXEL.
638 Here the definition uses the EFI_GRAPHICS_OUTPUT_BLT_PIXEL, which is defined in UEFI 2.1 spec
642 (EFIAPI
*EFI_HII_GLYPH_TO_BLT
)(
643 IN EFI_HII_PROTOCOL
*This
,
644 IN UINT8
*GlyphBuffer
,
645 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground
,
646 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background
,
650 IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer
654 Allows a new string to be added to an already existing string package.
656 Note that this function prototype name is different from that in the Framework HII 0.92 spec
657 to avoid name confict with EFI_HII_NEW_STRING defined in the UEFI 2.1d spec.
659 @param This A pointer to the EFI_HII_PROTOCOL instance.
660 @param Pointer to a NULL-terminated string containing a single ISO 639-2
661 language identifier, indicating the language in which the string is translated.
662 @param Handle The handle of the language pack to which the string is to be added.
663 @param Reference The identifier of the string to be added. If the reference
664 value is zero, then the string will be assigned a new identifier on that
665 handle for the language specified. Otherwise, the string will be updated
666 with the NewString Value.
667 @param NewString The string to be added.
669 @retval EFI_SUCCESS The string was effectively registered.
670 @retval EFI_INVALID_PARAMETER The Handle was unknown.
675 (EFIAPI
*FRAMEWORK_EFI_HII_NEW_STRING
)(
676 IN EFI_HII_PROTOCOL
*This
,
678 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
679 IN OUT STRING_REF
*Reference
,
684 Allows a program to determine the primary languages that are supported
687 @param This A pointer to the EFI_HII_PROTOCOL instance.
688 @param Handle The handle on which the strings reside.
689 @param LanguageString A string allocated by GetPrimaryLanguages() that
690 contains a list of all primary languages registered on the handle.
692 @retval EFI_SUCCESS LanguageString was correctly returned.
693 @retval EFI_INVALID_PARAMETER The Handle was unknown.
698 (EFIAPI
*EFI_HII_GET_PRI_LANGUAGES
)(
699 IN EFI_HII_PROTOCOL
*This
,
700 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
701 OUT EFI_STRING
*LanguageString
705 Allows a program to determine which secondary languages are supported
706 on a given handle for a given primary language.
708 @param This A pointer to the EFI_HII_PROTOCOL instance.
709 @param Handle The handle on which the strings reside.
710 @param PrimaryLanguage Pointer to a NULL-terminated string containing a single
711 ISO 639-2 language identifier, indicating the primary language.
712 @param LanguageString A string allocated by GetSecondaryLanguages()
713 containing a list of all secondary languages registered on the handle.
715 @retval EFI_SUCCESS LanguageString was correctly returned.
716 @retval EFI_INVALID_PARAMETER The Handle was unknown.
721 (EFIAPI
*EFI_HII_GET_SEC_LANGUAGES
)(
722 IN EFI_HII_PROTOCOL
*This
,
723 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
724 IN CHAR16
*PrimaryLanguage
,
725 OUT EFI_STRING
*LanguageString
729 Extracts a string from a package already registered with the EFI HII database.
731 Note that this function prototype name is different from that in the Framework HII 0.92 spec
732 to avoid name confict with EFI_HII_GET_STRING defined in the UEFI 2.1d spec.
734 @param This A pointer to the EFI_HII_PROTOCOL instance.
735 @param Handle The handle on which the string resides.
736 @param Token The string token assigned to the string.
737 @param Raw If TRUE, the string is returned unedited in the internal
738 storage format. If false, the string returned is edited
739 by replacing <cr> with <space> and by removing special characters such
740 as the <wide> prefix.
741 @param LanguageString Pointer to a NULL-terminated string containing a
742 single ISO 639-2 language identifier, indicating the language to print.
743 If the LanguageString is empty (starts with a NULL), the default system
744 language will be used to determine the language.
745 @param BufferLength Length of the StringBuffer.
746 @param StringBuffer The buffer designed to receive the characters in the string.
748 @retval EFI_SUCCESS StringBuffer is filled with a NULL-terminated string.
749 @retval EFI_INVALID_PARAMETER The handle or string token is unknown.
750 @retval EFI_BUFFER_TOO_SMALL The buffer provided was not large enough to
751 allow the entire string to be stored.
756 (EFIAPI
*FRAMEWORK_EFI_HII_GET_STRING
)(
757 IN EFI_HII_PROTOCOL
*This
,
758 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
761 IN CHAR16
*LanguageString
,
762 IN OUT UINTN
*BufferLength
,
763 OUT EFI_STRING StringBuffer
767 Allows a program to extract a part of a string of not more than a given width.
769 @param This A pointer to the EFI_HII_PROTOCOL instance.
770 @param Handle The handle on which the string resides.
771 @param Token The string token assigned to the string.
772 @param Index On input, the offset into the string where the line is to start.
773 On output, the index is updated to point to beyond the last character returned
775 @param LineWidth The maximum width of the line in units of narrow glyphs.
776 @param LanguageString Pointer to a NULL-terminated string containing a
777 single ISO 639-2 language identifier, indicating the language to print.
778 @param BufferLength Pointer to the length of the StringBuffer.
779 @param StringBuffer The buffer designed to receive the characters in the string.
781 @retval EFI_SUCCESS StringBuffer filled with characters that will fit on the line.
782 @retval EFI_NOT_FOUND The font glyph for at least one of the characters in
783 the string is not in the font database.
784 @retval EFI_BUFFER_TOO_SMALL The buffer provided was not large enough
785 to allow the entire string to be stored.
790 (EFIAPI
*EFI_HII_GET_LINE
)(
791 IN EFI_HII_PROTOCOL
*This
,
792 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
794 IN OUT UINT16
*Index
,
796 IN CHAR16
*LanguageString
,
797 IN OUT UINT16
*BufferLength
,
798 OUT EFI_STRING StringBuffer
802 Allows a program to extract a form or form package that has previously
803 been registered with the HII database.
805 @param This A pointer to the EFI_HII_PROTOCOL instance.
806 @param Handle Handle on which the form resides.
807 @param FormId The ID of the form to return. If the ID is zero,
808 the entire form package is returned.
809 @param BufferLength On input, the length of the Buffer. On output,
810 the length of the returned buffer,
811 @param Buffer The buffer designed to receive the form(s).
813 @retval EFI_SUCCESS Buffer filled with the requested forms. BufferLength
815 @retval EFI_INVALID_PARAMETER The handle is unknown.
816 @retval EFI_NOT_FOUND A form on the requested handle cannot be found with
817 the requested FormId.
818 @retval EFI_BUFFER_TOO_SMALL The buffer provided was not large enough
819 to allow the form to be stored.
824 (EFIAPI
*EFI_HII_GET_FORMS
)(
825 IN EFI_HII_PROTOCOL
*This
,
826 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
827 IN EFI_FORM_ID FormId
,
828 IN OUT UINTN
*BufferLength
,
833 Extracts the defaults that are associated with a given handle in the HII database.
835 @param This A pointer to the EFI_HII_PROTOCOL instance.
836 @param Handle The HII handle from which will have default data retrieved.
837 @param DefaultMask The mask used to specify some type of default override when extracting
838 the default image data.
839 @param VariablePackList An indirect pointer to the first entry of a link list with
840 type EFI_HII_VARIABLE_PACK_LIST.
842 @retval EFI_SUCCESS The VariablePackList was populated with the appropriate
843 default setting data.
844 @retval EFI_NOT_FOUND The IFR does not have any explicit or default map(s).
845 @retval EFI_INVALID_PARAMETER The HII database entry associated with Handle
846 contain invalid data.
851 (EFIAPI
*EFI_HII_GET_DEFAULT_IMAGE
)(
852 IN EFI_HII_PROTOCOL
*This
,
853 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
854 IN UINTN DefaultMask
,
855 OUT EFI_HII_VARIABLE_PACK_LIST
**VariablePackList
859 Allows the caller to update a form or form package that has previously been
860 registered with the EFI HII database.
862 @param This A pointer to the EFI_HII_PROTOCOL instance.
863 @param Handle Handle of the package where the form to be updated resides.
864 @param Label The label inside the form package where the update is to take place.
865 @param AddData If TRUE, adding data at a given Label; otherwise,
866 if FALSE, removing data at a given Label.
867 @param Data The buffer containing the new tags to insert after the Label
869 @retval EFI_SUCCESS The form was updated with the new tags.
870 @retval EFI_INVALID_PARAMETER The buffer for the buffer length does not
871 contain an integral number of tags.
872 @retval EFI_NOT_FOUND The Handle, Label, or FormId was not found.
877 (EFIAPI
*EFI_HII_UPDATE_FORM
)(
878 IN EFI_HII_PROTOCOL
*This
,
879 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
880 IN EFI_FORM_LABEL Label
,
882 IN EFI_HII_UPDATE_DATA
*Data
886 Retrieves the current keyboard layout.
888 Note that this function prototype name is different from that in the Framework HII 0.92 spec
889 to avoid name confict with EFI_HII_GET_KEYBOARD_LAYOUT defined in the UEFI 2.1d spec.
891 @param This A pointer to the EFI_HII_PROTOCOL instance.
892 @param DescriptorCount A pointer to the number of Descriptor entries being
893 described in the keyboard layout being retrieved.
894 @param Descriptor A pointer to a buffer containing an array of FRAMEWORK_EFI_KEY_DESCRIPTOR
895 entries. Each entry will reflect the definition of a specific physical key.
897 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.
902 (EFIAPI
*FRAMEWORK_EFI_HII_GET_KEYBOARD_LAYOUT
)(
903 IN EFI_HII_PROTOCOL
*This
,
904 OUT UINT16
*DescriptorCount
,
905 OUT FRAMEWORK_EFI_KEY_DESCRIPTOR
*Descriptor
909 /// The HII Protocol manages the HII database, which is a repository for data
910 /// having to do with fonts, strings, forms, keyboards, and other future human
913 struct _EFI_HII_PROTOCOL
{
915 /// Extracts the various packs from a package list.
917 EFI_HII_NEW_PACK NewPack
;
920 /// Removes a package from the HII database.
922 EFI_HII_REMOVE_PACK RemovePack
;
925 /// Determines the handles that are currently active in the database.
927 EFI_HII_FIND_HANDLES FindHandles
;
930 /// Export the entire contents of the database to a buffer.
932 EFI_HII_EXPORT ExportDatabase
;
935 /// Tests if all of the characters in a string have corresponding font characters.
937 EFI_HII_TEST_STRING TestString
;
940 /// Translates a Unicode character into the corresponding font glyph.
942 FRAMEWORK_EFI_HII_GET_GLYPH GetGlyph
;
945 /// Converts a glyph value into a format that is ready for a UGA BLT command.
947 EFI_HII_GLYPH_TO_BLT GlyphToBlt
;
950 /// Allows a new string to be added to an already existing string package.
952 FRAMEWORK_EFI_HII_NEW_STRING NewString
;
955 /// Allows a program to determine the primary languages that are supported
956 /// on a given handle.
958 EFI_HII_GET_PRI_LANGUAGES GetPrimaryLanguages
;
961 /// Allows a program to determine which secondary languages are supported
962 /// on a given handle for a given primary language.
964 EFI_HII_GET_SEC_LANGUAGES GetSecondaryLanguages
;
967 /// Extracts a string from a package that is already registered with the
968 /// EFI HII database.
970 FRAMEWORK_EFI_HII_GET_STRING GetString
;
973 /// Remove any new strings that were added after the initial string export
976 /// Note this function is not defined in the Framework HII 0.92 spec.
978 EFI_HII_RESET_STRINGS ResetStrings
;
981 /// Allows a program to extract a part of a string of not more than a given width.
983 EFI_HII_GET_LINE GetLine
;
986 /// Allows a program to extract a form or form package that has been previously registered.
988 EFI_HII_GET_FORMS GetForms
;
991 /// Allows a program to extract the nonvolatile image that represents the default storage image.
993 EFI_HII_GET_DEFAULT_IMAGE GetDefaultImage
;
996 /// Allows a program to update a previously registered form.
998 EFI_HII_UPDATE_FORM UpdateForm
;
1001 /// Allows a program to extract the current keyboard layout.
1003 FRAMEWORK_EFI_HII_GET_KEYBOARD_LAYOUT GetKeyboardLayout
;
1006 extern EFI_GUID gEfiHiiProtocolGuid
;
1007 extern EFI_GUID gEfiHiiCompatibilityProtocolGuid
;