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>
26 ////// In both EDK and EDK II, incompatbile change is done to Framework HII protocol. /// This change should cause a change of GUID in both of code and HII spec. But we /// update the GUID in code in EDK and EDK II. The 0.92 spec is not updated. This/// is a known issue.///////// Note that EFI_HII_PROTOCOL_GUID is different from that defined in the Framework HII/// 0.92 spec because the spec changed part of HII interfaces but did not update the protocol/// GUID.///#define EFI_HII_PROTOCOL_GUID \
28 0xd7ad636e, 0xb997, 0x459b, {0xbf, 0x3f, 0x88, 0x46, 0x89, 0x79, 0x80, 0xe1} \
31 #define EFI_HII_COMPATIBILITY_PROTOCOL_GUID \
33 0x5542cce1, 0xdf5c, 0x4d1b, { 0xab, 0xca, 0x36, 0x4f, 0x77, 0xd3, 0x99, 0xfb } \
36 typedef UINT32 RELOFST
;
38 typedef struct _EFI_HII_PROTOCOL EFI_HII_PROTOCOL
;
41 /// Note: Name difference between code and the Framework HII 0.92 spec.
42 /// Add FRAMEWORK_ prefix to avoid name confict with EFI_HII_HANDLE defined in the
45 typedef UINT16 FRAMEWORK_EFI_HII_HANDLE
;
48 /// HII package type values
50 #define EFI_HII_FONT 1
51 #define EFI_HII_STRING 2
53 #define EFI_HII_KEYBOARD 4
54 #define EFI_HII_HANDLES 5
55 #define EFI_HII_VARIABLE 6
56 #define EFI_HII_DEVICE_PATH 7
59 // References to string tokens must use this macro to enable scanning for
62 #define STRING_TOKEN(t) t
65 // The following types are currently defined:
66 // EFI_FORM_ID has been defined in UEFI spec.
68 typedef UINT16 EFI_FORM_LABEL
;
73 /// The header found at the start of each package.
76 UINT32 Length
; ///< The size of the package in bytes.
77 UINT16 Type
; ///< The type of the package.
78 } EFI_HII_PACK_HEADER
;
80 ////// IFR package structure./// Immediately following the EFI_HII_IFR_PACK structure will be a series of IFR opcodes. ///typedef struct {
81 EFI_HII_PACK_HEADER Header
; ///< Header of the IFR package.
85 /// HII Handle package structure.
88 /// /// Header of the package. /// EFI_HII_PACK_HEADER Header; // Must be filled in /// /// The image handle of the driver to which the package is referring. /// EFI_HANDLE ImageHandle; // Must be filled in ///
89 /// The handle of the device that is being described by this package.
91 EFI_HANDLE DeviceHandle
; // Optional
93 /// The handle of the parent of the device that is being described by this package.
95 EFI_HANDLE ControllerHandle
; // Optional
97 /// The handle that was registered to receive EFI_FORM_CALLBACK_PROTOCOL calls from other drivers.
99 EFI_HANDLE CallbackHandle
; // Optional
101 /// Note this field is not defined in the Framework HII 0.92 spec.
102 /// Unused. Reserved for source code compatibility.
104 EFI_HANDLE COBExportHandle
; // Optional
105 } EFI_HII_HANDLE_PACK
;
108 /// Variable package structure.
112 /// Header of the package.
114 EFI_HII_PACK_HEADER Header
;
116 /// GUID of the EFI variable
118 EFI_GUID VariableGuid
;
120 /// Length in bytes of the EFI variable
122 UINT32 VariableNameLength
;
124 /// The unique value for this variable
128 // CHAR16 VariableName[]; //Null-terminated
130 } EFI_HII_VARIABLE_PACK
;
133 /// Device path package structure.
137 /// Header of the package.
139 EFI_HII_PACK_HEADER Header
;
141 // EFI_DEVICE_PATH DevicePath[];
143 } EFI_HII_DEVICE_PATH_PACK
;
147 /// Unique value that correlates to the original HII handle.
149 FRAMEWORK_EFI_HII_HANDLE HiiHandle
;
151 /// If an IFR pack exists in a data table that does not contain strings,
152 /// then the strings for that IFR pack are located in another data table
153 /// that contains a string pack and has a matching HiiDataTable.PackageGuid.
155 EFI_GUID PackageGuid
;
157 /// Size of the EFI_HII_DATA_TABLE in bytes.
159 UINT32 DataTableSize
;
161 /// Byte offset from the start of this structure to the IFR data.
162 /// If the offset value is 0, then no IFR data is enclosed.
164 UINT32 IfrDataOffset
;
166 /// Byte offset from the start of this structure to the string data.
167 /// If the offset value is 0, then no string data is enclosed.
169 UINT32 StringDataOffset
;
171 /// Byte offset from the start of this structure to the variable data.
172 /// If the offset value is 0, then no variable data is enclosed.
174 UINT32 VariableDataOffset
;
176 /// Byte offset from the start of this structure to the device path data.
177 /// If the offset value is 0, then no DevicePath data is enclosed.
179 UINT32 DevicePathOffset
;
181 /// Number of VariableData[] elements in the array.
183 UINT32 NumberOfVariableData
;
185 /// The number of language string packages.
187 UINT32 NumberOfLanguages
;
189 // EFI_HII_DEVICE_PATH_PACK DevicePath[];
190 // EFI_HII_VARIABLE_PACK VariableData[];
191 // EFI_HII_IFR_PACK IfrData;
192 // EFI_HII_STRING_PACK StringData[];
194 } EFI_HII_DATA_TABLE
;
197 /// Structure defining format for exporting data from the HII Database.
201 /// Number of EFI_HII_DATA_TABLE entries.
203 UINT32 NumberOfHiiDataTables
;
205 /// Defines the revision of the EFI_HII_DATA_TABLE structure.
209 // EFI_HII_DATA_TABLE HiiDataTable[];
211 } EFI_HII_EXPORT_TABLE
;
214 /// Structure used to pass data to update a form or form package
215 /// that has previously been registered with the EFI HII database.
219 /// If TRUE, indicates that the FormCallbackHandle value will
220 /// be used to update the contents of the CallBackHandle entry in the form set.
222 BOOLEAN FormSetUpdate
;
224 /// This parameter is valid only when FormSetUpdate is TRUE.
225 /// The value in this parameter will be used to update the contents
226 /// of the CallbackHandle entry in the form set.
228 EFI_PHYSICAL_ADDRESS FormCallbackHandle
;
230 /// If TRUE, indicates that the FormTitle contents will be
231 /// used to update the FormValue's title.
235 /// Specifies which form is to be updated if the FormUpdate value is TRUE.
239 /// This parameter is valid only when the FormUpdate parameter is TRUE.
240 /// The value in this parameter will be used to update the contents of the form title.
242 STRING_REF FormTitle
;
244 /// The number of Data entries in this structure.
247 /// An array of 1+ opcodes, specified by DataCount.
250 } EFI_HII_UPDATE_DATA
;
255 #define LANG_RIGHT_TO_LEFT 0x00000001
257 ////// A string package is used to localize strings to a particular/// language. The package is associated with a particular driver/// or set of drivers. Tools are used to associate tokens with/// string references in forms and in programs. These tokens are/// language agnostic. When paired with a language pack (directly/// or indirectly), the string token resolves into an actual/// UNICODE string. The NumStringPointers determines how many/// StringPointers (offset values) there are as well as the total/// number of Strings that are defined.///typedef struct {
259 /// Header of the package.
261 EFI_HII_PACK_HEADER Header
;
263 /// The string containing one or more ISO 639-2 three-character designator(s)
264 /// of the language or languages whose translations are contained in this language pack.
265 /// The first designator indicates the primary language while the others are secondary languages.
267 RELOFST LanguageNameString
;
269 /// Contains the offset into this structure of a printable name of the language
270 /// for use when prompting the user. The language printed is to be the primary language.
272 RELOFST PrintableLanguageName
;
274 /// The number of Strings and StringPointers contained within the string package.
276 UINT32 NumStringPointers
;
278 /// Indicates the direction the language is to be printed.
282 // RELOFST StringPointers[];
283 // EFI_STRING Strings[];
285 } EFI_HII_STRING_PACK
;
289 /// A font list consists of a font header followed by a series
290 /// of glyph structures. Note that fonts are not language specific.
294 /// Header of the package.
296 EFI_HII_PACK_HEADER Header
;
298 /// The number of NarrowGlyphs that are included in the font package.
300 UINT16 NumberOfNarrowGlyphs
;
302 /// The number of WideGlyphs that are included in the font package.
304 UINT16 NumberOfWideGlyphs
;
305 //EFI_NARROW_GLYPH NarrowGlyphs[];
306 //EFI_WIDE_GLYPH WideGlyphs[];
309 ////// The definition of a specific physical key////// Note: Name difference between code and the Framework HII 0.92 spec./// Add FRAMEWORK_ prefix to avoid name confict with EFI_KEY_DESCRIPTOR defined in the/// UEFI 2.1d spec.///typedef struct {
311 /// Used to describe a physical key on a keyboard.
315 /// Unicode value for the Key.
318 /// Unicode value for the key with the shift key being held down.
320 CHAR16 ShiftedUnicode
;
322 /// Unicode value for the key with the Alt-GR being held down.
326 /// Unicode value for the key with the Alt-GR and shift keys being held down.
328 CHAR16 ShiftedAltGrUnicode
;
330 /// Modifier keys are defined to allow for special functionality that
331 /// is not necessarily accomplished by a printable character.
334 } FRAMEWORK_EFI_KEY_DESCRIPTOR
;
336 ////// This structure allows a sparse set of keys to be redefined/// or a complete redefinition of the keyboard layout. Most/// keyboards have a lot of commonality in their layouts, therefore/// only defining those keys that need to change from the default/// minimizes the passed in information.////// Additionally, when an update occurs, the active keyboard layout/// will be switched to the newly updated keyboard layout. This/// allows for situations that when a keyboard layout driver is/// loaded as part of system initialization, the system will default/// the keyboard behavior to the new layout.///typedef struct {
338 /// Header of the package.
339 EFI_HII_PACK_HEADER Header
;
341 /// A pointer to a buffer containing an array of EFI_KEY_DESCRIPTOR entries.
342 /// Each entry will reflect the definition of a specific physical key.
344 FRAMEWORK_EFI_KEY_DESCRIPTOR
*Descriptor
;
346 /// The number of Descriptor entries being described.
348 UINT8 DescriptorCount
;
349 } EFI_HII_KEYBOARD_PACK
;
352 /// The packages structure that will be used to pass contents into the HII database.
354 /// The EFI_HII_PACKAGES can contain various number of packages of different types just
355 /// after the structure as inline data.
359 /// The number of packages being defined in this structure.
361 UINTN NumberOfPackages
;
363 /// The GUID to be used to identify this set of packages that are being exported
364 /// to the HII database.
368 // EFI_HII_HANDLE_PACK *HandlePack; // Only one pack.
369 // EFI_HII_IFR_PACK *IfrPack; // Only one pack.
370 // EFI_HII_FONT_PACK *FontPack[]; // Multiple packs ok
371 // EFI_HII_STRING_PACK *StringPack[]; // Multiple packs ok
372 // EFI_HII_KEYBOARD_PACK *KeyboardPack[]; // Multiple packs ok
377 /// Packed link list that contains all the discernable defaults of variables
378 /// for the opcodes that are defined in this Handle's domain of data.
380 typedef struct _EFI_HII_VARIABLE_PACK_LIST
{
382 /// A pointer points to the next data structure of type
383 /// EFI_HII_VARIABLE_PACK_LIST in the packed link list.
385 struct _EFI_HII_VARIABLE_PACK_LIST
*NextVariablePack
;
387 /// A pointer points to the content of the variable entry defined by GUID/name/data.
389 EFI_HII_VARIABLE_PACK
*VariablePack
;
390 //EFI_HII_VARIABLE_PACK Content
391 } EFI_HII_VARIABLE_PACK_LIST
;
397 Registers the various packs that are passed in via the Packages parameter.
399 @param This A pointer to the EFI_HII_PROTOCOL instance.
400 @param Packages A pointer to an EFI_HII_PACKAGES package instance.
401 @param Handle A pointer to the FRAMEWORK_EFI_HII_HANDLE instance.
403 @retval EFI_SUCCESS Data was extracted from Packages, the database
404 was updated with the data, and Handle returned successfully.
405 @retval EFI_INVALID_PARAMETER The content of Packages was invalid.
410 (EFIAPI
*EFI_HII_NEW_PACK
)(
411 IN EFI_HII_PROTOCOL
*This
,
412 IN EFI_HII_PACKAGES
*Packages
,
413 OUT FRAMEWORK_EFI_HII_HANDLE
*Handle
417 Removes a package from the HII database.
419 @param This A pointer to the EFI_HII_PROTOCOL instance.
420 @param Handle The handle that was registered to the data that is requested
423 @retval EFI_SUCCESS The data associated with the Handle was removed
424 from the HII database.
425 @retval EFI_INVALID_PARAMETER The Handle was not valid.
430 (EFIAPI
*EFI_HII_REMOVE_PACK
)(
431 IN EFI_HII_PROTOCOL
*This
,
432 IN FRAMEWORK_EFI_HII_HANDLE Handle
436 Determines the handles that are currently active in the database.
438 @param This A pointer to the EFI_HII_PROTOCOL instance.
439 @param HandleBufferLength On input, a pointer to the length of the handle
440 buffer. On output, the length of the handle buffer that is required
441 for the handles found.
442 @param Handle An array of FRAMEWORK_EFI_HII_HANDLE instances returned.
444 @retval EFI_SUCCESS Handle was updated successfully.
445 @retval EFI_BUFFER_TOO_SMALL The HandleBufferLength parameter indicates
446 that Handle is too small to support the number of handles.
451 (EFIAPI
*EFI_HII_FIND_HANDLES
)(
452 IN EFI_HII_PROTOCOL
*This
,
453 IN OUT UINT16
*HandleBufferLength
,
454 OUT FRAMEWORK_EFI_HII_HANDLE
*Handle
458 Exports the contents of the database into a buffer.
460 @param This A pointer to the EFI_HII_PROTOCOL instance.
461 @param Handle A FRAMEWORK_EFI_HII_HANDLE that corresponds to the desired
462 handle to export. If the value is 0, the entire database will be exported.
463 The data is exported in a format described by the
464 structure definition of EFI_HII_EXPORT_TABLE.
466 On input, a pointer to the length of the buffer. On output, the length
467 of the buffer that is required for the export data.
468 @param Buffer A pointer to a buffer that will contain the results of the export function.
470 @retval EFI_SUCCESS The buffer was successfully filled with BufferSize amount of data.
471 @retval EFI_BUFFER_TOO_SMALL The value in BufferSize was too small to contain the export data.
476 (EFIAPI
*EFI_HII_EXPORT
)(
477 IN EFI_HII_PROTOCOL
*This
,
478 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
479 IN OUT UINTN
*BufferSize
,
484 Remove any new strings that were added after the initial string export
487 @param This A pointer to the EFI_HII_PROTOCOL instance.
488 @param Handle The handle on which the string resides.
490 @retval EFI_SUCCESS Successfully removed strings from the handle.
491 @retval EFI_INVALID_PARAMETER The Handle was unknown.
496 (EFIAPI
*EFI_HII_RESET_STRINGS
)(
497 IN EFI_HII_PROTOCOL
*This
,
498 IN FRAMEWORK_EFI_HII_HANDLE Handle
502 Tests if all of the characters in a string have corresponding font characters.
504 @param This A pointer to the EFI_HII_PROTOCOL instance.
505 @param StringToTest A pointer to a Unicode string.
506 @param FirstMissing A pointer to an index into the string. On input,
507 the index of the first character in the StringToTest to examine. On exit,
508 the index of the first character encountered for which a glyph is unavailable.
509 If all glyphs in the string are available, the index is the index of the
510 terminator of the string.
511 @param GlyphBufferSize A pointer to a value. On output, if the function
512 returns EFI_SUCCESS, it contains the amount of memory that is required to
513 store the string's glyph equivalent.
515 @retval EFI_SUCCESS All glyphs are available. Note that an empty string
516 always returns this value.
517 @retval EFI_NOT_FOUND A glyph was not found for a character.
522 (EFIAPI
*EFI_HII_TEST_STRING
)(
523 IN EFI_HII_PROTOCOL
*This
,
524 IN CHAR16
*StringToTest
,
525 IN OUT UINT32
*FirstMissing
,
526 OUT UINT32
*GlyphBufferSize
530 Translates a Unicode character into the corresponding font glyph.
532 Note that this function prototype name is different from that in the Framework HII 0.92 spec
533 to avoid name confict with EFI_HII_GET_GLYPH defined in the UEFI 2.1d spec.
535 @param This A pointer to the EFI_HII_PROTOCOL instance.
536 @param Source A pointer to a Unicode string.
537 @param Index On input, the offset into the string from which to fetch
538 the character. On successful completion, the index is updated to the first
539 character past the character(s) making up the just extracted glyph.
540 @param GlyphBuffer Pointer to an array where the glyphs corresponding
541 to the characters in the source may be stored. GlyphBuffer is assumed
542 to be wide enough to accept a wide glyph character.
543 @param BitWidth If EFI_SUCCESS was returned, the UINT16 pointed to by
544 this value is filled with the length of the glyph in pixels. It is unchanged
545 if the call was unsuccessful.
546 @param InternalStatus The cell pointed to by this parameter must be
547 initialized to zero prior to invoking the call the first time for any string.
549 @retval EFI_SUCCESS It worked.
550 @retval EFI_NOT_FOUND A glyph for a character was not found.
555 (EFIAPI
*FRAMEWORK_EFI_HII_GET_GLYPH
)(
556 IN EFI_HII_PROTOCOL
*This
,
558 IN OUT UINT16
*Index
,
559 OUT UINT8
**GlyphBuffer
,
560 OUT UINT16
*BitWidth
,
561 IN OUT UINT32
*InternalStatus
565 Translates a glyph into the format required for input to the Universal
566 Graphics Adapter (UGA) Block Transfer (BLT) routines.
568 @param This A pointer to the EFI_HII_PROTOCOL instance.
569 @param GlyphBuffer A pointer to the buffer that contains glyph data.
570 @param Foreground The foreground setting requested to be used for the
571 generated BltBuffer data.
572 @param Background The background setting requested to be used for the
573 generated BltBuffer data.
574 @param Count The entry in the BltBuffer upon which to act.
575 @param Width The width in bits of the glyph being converted.
576 @param Height The height in bits of the glyph being converted
577 @param BltBuffer A pointer to the buffer that contains the data that is
578 ready to be used by the UGA BLT routines.
580 @retval EFI_SUCCESS It worked.
581 @retval EFI_NOT_FOUND A glyph for a character was not found.
582 @note: Inconsistent with specification here:
583 In Framework Spec, HII spec 0.92. The type of 3rd, 4th and 8th parameter is EFI_UGA_PIXEL.
584 Here the definition uses the EFI_GRAPHICS_OUTPUT_BLT_PIXEL, which is defined in UEFI 2.1 spec
588 (EFIAPI
*EFI_HII_GLYPH_TO_BLT
)(
589 IN EFI_HII_PROTOCOL
*This
,
590 IN UINT8
*GlyphBuffer
,
591 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground
,
592 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background
,
596 IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer
600 Allows a new string to be added to an already existing string package.
602 Note that this function prototype name is different from that in the Framework HII 0.92 spec
603 to avoid name confict with EFI_HII_NEW_STRING defined in the UEFI 2.1d spec.
605 @param This A pointer to the EFI_HII_PROTOCOL instance.
606 @param Pointer to a NULL-terminated string containing a single ISO 639-2
607 language identifier, indicating the language in which the string is translated.
608 @param Handle The handle of the language pack to which the string is to be added.
609 @param Reference The identifier of the string to be added. If the reference
610 value is zero, then the string will be assigned a new identifier on that
611 handle for the language specified. Otherwise, the string will be updated
612 with the NewString Value.
613 @param NewString The string to be added.
615 @retval EFI_SUCCESS The string was effectively registered.
616 @retval EFI_INVALID_PARAMETER The Handle was unknown.
621 (EFIAPI
*FRAMEWORK_EFI_HII_NEW_STRING
)(
622 IN EFI_HII_PROTOCOL
*This
,
624 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
625 IN OUT STRING_REF
*Reference
,
630 Allows a program to determine the primary languages that are supported
633 @param This A pointer to the EFI_HII_PROTOCOL instance.
634 @param Handle The handle on which the strings reside.
635 @param LanguageString A string allocated by GetPrimaryLanguages() that
636 contains a list of all primary languages registered on the handle.
638 @retval EFI_SUCCESS LanguageString was correctly returned.
639 @retval EFI_INVALID_PARAMETER The Handle was unknown.
644 (EFIAPI
*EFI_HII_GET_PRI_LANGUAGES
)(
645 IN EFI_HII_PROTOCOL
*This
,
646 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
647 OUT EFI_STRING
*LanguageString
651 Allows a program to determine which secondary languages are supported
652 on a given handle for a given primary language.
654 @param This A pointer to the EFI_HII_PROTOCOL instance.
655 @param Handle The handle on which the strings reside.
656 @param PrimaryLanguage Pointer to a NULL-terminated string containing a single
657 ISO 639-2 language identifier, indicating the primary language.
658 @param LanguageString A string allocated by GetSecondaryLanguages()
659 containing a list of all secondary languages registered on the handle.
661 @retval EFI_SUCCESS LanguageString was correctly returned.
662 @retval EFI_INVALID_PARAMETER The Handle was unknown.
667 (EFIAPI
*EFI_HII_GET_SEC_LANGUAGES
)(
668 IN EFI_HII_PROTOCOL
*This
,
669 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
670 IN CHAR16
*PrimaryLanguage
,
671 OUT EFI_STRING
*LanguageString
675 Extracts a string from a package already registered with the EFI HII database.
677 Note that this function prototype name is different from that in the Framework HII 0.92 spec
678 to avoid name confict with EFI_HII_GET_STRING defined in the UEFI 2.1d spec.
680 @param This A pointer to the EFI_HII_PROTOCOL instance.
681 @param Handle The handle on which the string resides.
682 @param Token The string token assigned to the string.
683 @param Raw If TRUE, the string is returned unedited in the internal
684 storage format. If false, the string returned is edited
685 by replacing <cr> with <space> and by removing special characters such
686 as the <wide> prefix.
687 @param LanguageString Pointer to a NULL-terminated string containing a
688 single ISO 639-2 language identifier, indicating the language to print.
689 If the LanguageString is empty (starts with a NULL), the default system
690 language will be used to determine the language.
691 @param BufferLength Length of the StringBuffer.
692 @param StringBuffer The buffer designed to receive the characters in the string.
694 @retval EFI_SUCCESS StringBuffer is filled with a NULL-terminated string.
695 @retval EFI_INVALID_PARAMETER The handle or string token is unknown.
696 @retval EFI_BUFFER_TOO_SMALL The buffer provided was not large enough to
697 allow the entire string to be stored.
702 (EFIAPI
*FRAMEWORK_EFI_HII_GET_STRING
)(
703 IN EFI_HII_PROTOCOL
*This
,
704 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
707 IN CHAR16
*LanguageString
,
708 IN OUT UINTN
*BufferLength
,
709 OUT EFI_STRING StringBuffer
713 Allows a program to extract a part of a string of not more than a given width.
715 @param This A pointer to the EFI_HII_PROTOCOL instance.
716 @param Handle The handle on which the string resides.
717 @param Token The string token assigned to the string.
718 @param Index On input, the offset into the string where the line is to start.
719 On output, the index is updated to point to beyond the last character returned
721 @param LineWidth The maximum width of the line in units of narrow glyphs.
722 @param LanguageString Pointer to a NULL-terminated string containing a
723 single ISO 639-2 language identifier, indicating the language to print.
724 @param BufferLength Pointer to the length of the StringBuffer.
725 @param StringBuffer The buffer designed to receive the characters in the string.
727 @retval EFI_SUCCESS StringBuffer filled with characters that will fit on the line.
728 @retval EFI_NOT_FOUND The font glyph for at least one of the characters in
729 the string is not in the font database.
730 @retval EFI_BUFFER_TOO_SMALL The buffer provided was not large enough
731 to allow the entire string to be stored.
736 (EFIAPI
*EFI_HII_GET_LINE
)(
737 IN EFI_HII_PROTOCOL
*This
,
738 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
740 IN OUT UINT16
*Index
,
742 IN CHAR16
*LanguageString
,
743 IN OUT UINT16
*BufferLength
,
744 OUT EFI_STRING StringBuffer
748 Allows a program to extract a form or form package that has previously
749 been registered with the HII database.
751 @param This A pointer to the EFI_HII_PROTOCOL instance.
752 @param Handle Handle on which the form resides.
753 @param FormId The ID of the form to return. If the ID is zero,
754 the entire form package is returned.
755 @param BufferLength On input, the length of the Buffer. On output,
756 the length of the returned buffer,
757 @param Buffer The buffer designed to receive the form(s).
759 @retval EFI_SUCCESS Buffer filled with the requested forms. BufferLength
761 @retval EFI_INVALID_PARAMETER The handle is unknown.
762 @retval EFI_NOT_FOUND A form on the requested handle cannot be found with
763 the requested FormId.
764 @retval EFI_BUFFER_TOO_SMALL The buffer provided was not large enough
765 to allow the form to be stored.
770 (EFIAPI
*EFI_HII_GET_FORMS
)(
771 IN EFI_HII_PROTOCOL
*This
,
772 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
773 IN EFI_FORM_ID FormId
,
774 IN OUT UINTN
*BufferLength
,
779 Extracts the defaults that are associated with a given handle in the HII database.
781 @param This A pointer to the EFI_HII_PROTOCOL instance.
782 @param Handle The HII handle from which will have default data retrieved.
783 @param DefaultMask The mask used to specify some type of default override when extracting
784 the default image data.
785 @param VariablePackList An indirect pointer to the first entry of a link list with
786 type EFI_HII_VARIABLE_PACK_LIST.
788 @retval EFI_SUCCESS The VariablePackList was populated with the appropriate
789 default setting data.
790 @retval EFI_NOT_FOUND The IFR does not have any explicit or default map(s).
791 @retval EFI_INVALID_PARAMETER The HII database entry associated with Handle
792 contain invalid data.
797 (EFIAPI
*EFI_HII_GET_DEFAULT_IMAGE
)(
798 IN EFI_HII_PROTOCOL
*This
,
799 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
800 IN UINTN DefaultMask
,
801 OUT EFI_HII_VARIABLE_PACK_LIST
**VariablePackList
805 Allows the caller to update a form or form package that has previously been
806 registered with the EFI HII database.
808 @param This A pointer to the EFI_HII_PROTOCOL instance.
809 @param Handle Handle of the package where the form to be updated resides.
810 @param Label The label inside the form package where the update is to take place.
811 @param AddData If TRUE, adding data at a given Label; otherwise,
812 if FALSE, removing data at a given Label.
813 @param Data The buffer containing the new tags to insert after the Label
815 @retval EFI_SUCCESS The form was updated with the new tags.
816 @retval EFI_INVALID_PARAMETER The buffer for the buffer length does not
817 contain an integral number of tags.
818 @retval EFI_NOT_FOUND The Handle, Label, or FormId was not found.
823 (EFIAPI
*EFI_HII_UPDATE_FORM
)(
824 IN EFI_HII_PROTOCOL
*This
,
825 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
826 IN EFI_FORM_LABEL Label
,
828 IN EFI_HII_UPDATE_DATA
*Data
832 Retrieves the current keyboard layout.
834 Note that this function prototype name is different from that in the Framework HII 0.92 spec
835 to avoid name confict with EFI_HII_GET_KEYBOARD_LAYOUT defined in the UEFI 2.1d spec.
837 @param This A pointer to the EFI_HII_PROTOCOL instance.
838 @param DescriptorCount A pointer to the number of Descriptor entries being
839 described in the keyboard layout being retrieved.
840 @param Descriptor A pointer to a buffer containing an array of FRAMEWORK_EFI_KEY_DESCRIPTOR
841 entries. Each entry will reflect the definition of a specific physical key.
843 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.
848 (EFIAPI
*FRAMEWORK_EFI_HII_GET_KEYBOARD_LAYOUT
)(
849 IN EFI_HII_PROTOCOL
*This
,
850 OUT UINT16
*DescriptorCount
,
851 OUT FRAMEWORK_EFI_KEY_DESCRIPTOR
*Descriptor
855 /// The HII Protocol manages the HII database, which is a repository for data
856 /// having to do with fonts, strings, forms, keyboards, and other future human
859 struct _EFI_HII_PROTOCOL
{
861 /// Extracts the various packs from a package list.
863 EFI_HII_NEW_PACK NewPack
;
866 /// Removes a package from the HII database.
868 EFI_HII_REMOVE_PACK RemovePack
;
871 /// Determines the handles that are currently active in the database.
873 EFI_HII_FIND_HANDLES FindHandles
;
876 /// Export the entire contents of the database to a buffer.
878 EFI_HII_EXPORT ExportDatabase
;
881 /// Tests if all of the characters in a string have corresponding font characters.
883 EFI_HII_TEST_STRING TestString
;
886 /// Translates a Unicode character into the corresponding font glyph.
888 FRAMEWORK_EFI_HII_GET_GLYPH GetGlyph
;
891 /// Converts a glyph value into a format that is ready for a UGA BLT command.
893 EFI_HII_GLYPH_TO_BLT GlyphToBlt
;
896 /// Allows a new string to be added to an already existing string package.
898 FRAMEWORK_EFI_HII_NEW_STRING NewString
;
901 /// Allows a program to determine the primary languages that are supported
902 /// on a given handle.
904 EFI_HII_GET_PRI_LANGUAGES GetPrimaryLanguages
;
907 /// Allows a program to determine which secondary languages are supported
908 /// on a given handle for a given primary language.
910 EFI_HII_GET_SEC_LANGUAGES GetSecondaryLanguages
;
913 /// Extracts a string from a package that is already registered with the
914 /// EFI HII database.
916 FRAMEWORK_EFI_HII_GET_STRING GetString
;
919 /// Remove any new strings that were added after the initial string export
922 /// Note this function is not defined in the Framework HII 0.92 spec.
924 EFI_HII_RESET_STRINGS ResetStrings
;
927 /// Allows a program to extract a part of a string of not more than a given width.
929 EFI_HII_GET_LINE GetLine
;
932 /// Allows a program to extract a form or form package that has been previously registered.
934 EFI_HII_GET_FORMS GetForms
;
937 /// Allows a program to extract the nonvolatile image that represents the default storage image.
939 EFI_HII_GET_DEFAULT_IMAGE GetDefaultImage
;
942 /// Allows a program to update a previously registered form.
944 EFI_HII_UPDATE_FORM UpdateForm
;
947 /// Allows a program to extract the current keyboard layout.
949 FRAMEWORK_EFI_HII_GET_KEYBOARD_LAYOUT GetKeyboardLayout
;
952 extern EFI_GUID gEfiHiiProtocolGuid
;
953 extern EFI_GUID gEfiHiiCompatibilityProtocolGuid
;