American Megatrends, Inc.

HII (Human Interface Infrastructure) module for UEFI v.2.1 or later

Copyright

Release Notes

© American Megatrends, Inc.


eModule Release Notes

AMIBIOS Component Release Notes

Component Information:
Component Name: Hii
Component Type: ModulePart
Release Date: February 27, 2009
Source Control Label: N/A
Source Control Location: $/Private/R&D/Source/Hii
Component Description:
This module provides implementation of set of HII protocols, as described in UEFI specification v.2.1.
Fixes
None
New Features in Latest Release

Current implementation of EFI_HII_FONT_PROTOCOL supports drawing of mixed narrow-wide system font characters.

Errata & Known Issues
EFI_IMAGE_PROTOCOL is not supported in current implementation. Also different fonts support is not available.
Revision History
02/27/2009 Initial release

© American Megatrends Inc.


Function by File Name

AMIBIOS Function Reference

By File Name

The following is a list of the .asm files.
For a list in alphabetical order, see In Alphabetical Order.

  • HiiConfig.c
  • HiiConfig.h
  • HiiConfigAccess.h
  • hiidatabase.c
  • HiiDatabase.h
  • HiiFont.c
  • HiiFont.h
  • HiiPrivate.h
  • HiiString.c
  • HiiString.h
Built on 16:23:59 02/27/09


HiiConfig.c

Description:
Hii Config Routing protocol implementation


HiiConfig.h

Description:
Hii Configuration Routing protocol header file


HiiConfigAccess.h

Description:
Hii Config access protocol header file


hiidatabase.c

Description:
Hii database protocol functions implementation

The following functions are used in the file: hiidatabase.c.

Function | Description
AddPackage | This function adds package to package list with given handle
AddPackages | This function adds packages from PackageList to package list with given handle
CheckIfPresent | This function checks if package list with given guid already in database
CreateNewLink | This function creates new link structure for linked list and returns pointer to it
DeleteList | This function deletes linked list and frees allocated memory
DeleteSimpleFonts | This function removes simple fonts from private area and frees allocated memory
DeleteStringsFromDatabase | This function removes HII strings from private storage and frees allocated memory
FindAndRemovePackages | This function finds or removes packages from package list with given handle
FindLayoutByGuid | This function finds keyboard layout in private area by given guid
HiiDatabaseEntryPoint | This function is HII driver entry point
HiiExportPacks | This function is HII Database protocol function ExportPackageLists implementation
HiiFindKeyboardLayouts | This function is HII Database protocol function FindKeyboardLayouts implementation
HiiGetKeyboardLayout | This function is HII Database protocol function GetKeyboardLayout implementation
HiiGetPackHandle | This function is HII Database protocol function GetPackageHandle implementation
HiiListPacks | This function is HII Database protocol function ListPackageLists implementation
HiiNewPack | This function is HII Database protocol function NewPackageList implementation
HiiRegisterNotify | This function is HII Database protocol function RegisterPackageNotify implementation
HiiRemovePack | This function is HII Database protocol function RemovePackageList implementation
HiiSetKeyboardLayout | This function is HII Database protocol function SetKeyboardLayout implementation
HiiUnregisterNotify | This function is HII Database protocol function UnregisterPackageNotify implementation
HiiUpdatePack | This function is HII Database protocol function UpdatePackageList implementation
InvokeRegisteredNotify | This function invokes registered notify function if package types match
MatchPackage | This function checks if given package matches given type and guid
NewNotifyRecord | This function creates new NOTIFY_RECORD structure and returns pointer to it
NewPackageListRecord | This function creates new PACKAGE_LIST_RECORD structure and returns pointer to it
ParseKeyLayoutPackage | This function extracts keyboard layout from package and saves it in private area
ParseSimpleFontsPackage | This function extracts simple fonts from package and saves in private area
RemovePackage | This function removes package from package list with given handle


AddPackage in the hiidatabase.c

Function : AddPackage

File: hiidatabase.c
Description:
This function adds package to package list with given handle
Input:
IN EFI_HII_HANDLE Handle - Handle of package list where to add package
IN EFI_HII_PACKAGE_HEADER *Package - Pointer to package to add
IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType - Notify type to be signalled
Output:
EFI_SUCCESS - Function executed successfully
EFI_ERROR - Some error occured during execution
Built on 16:23:58 02/27/09


AddPackages in the hiidatabase.c

Function : AddPackages

File: hiidatabase.c
Description:
This function adds packages from PackageList to package list with given handle
Input:
IN EFI_HII_HANDLE Handle - Handle of package list where to add packages
IN EFI_HII_PACKAGE_LIST_HEADER *PackageList - Pointer to package list which packages to add
IN BOOLEAN Update - Flag which defines packages should be added or updated
Output:
EFI_SUCCESS - Function executed successfully
EFI_ERROR - Some error occured during execution
Notes:
If Update is TRUE control flow goes as described in UpdatePackageList function definition (see UEFI
specification v2.1) Otherwise control flow goes as described in NewPackageList function definition
Built on 16:23:58 02/27/09


CheckIfPresent in the hiidatabase.c

Function : CheckIfPresent

File: hiidatabase.c
Description:
This function checks if package list with given guid already in database
Input:
IN EFI_GUID *Guid - Pointer to package list guid to check
Output:
TRUE - package list already present in database
FALSE - package list with given guid not found in database
Built on 16:23:58 02/27/09


CreateNewLink in the hiidatabase.c

Function : CreateNewLink

File: hiidatabase.c
Description:
This function creates new link structure for linked list and returns pointer to it
Input:
IN UINT32 Size - size of the link stucture in bytes
Output:
VOID* - pointer to newly created structure
NULL - Not enough memory to perform operation
Built on 16:23:58 02/27/09


DeleteList in the hiidatabase.c

Function : DeleteList

File: hiidatabase.c
Description:
This function deletes linked list and frees allocated memory
Input:
IN DLIST *List - Pointer to linked list to be deleted
Output:
None
Built on 16:23:58 02/27/09


DeleteSimpleFonts in the hiidatabase.c

Function : DeleteSimpleFonts

File: hiidatabase.c
Description:
This function removes simple fonts from private area and frees allocated memory
Input:
IN EFI_HII_SIMPLE_FONT_PACKAGE_HDR *Package - Pointer to simple font package which fonts
                                 should be removed
Output:
None
Built on 16:23:58 02/27/09


DeleteStringsFromDatabase in the hiidatabase.c

Function : DeleteStringsFromDatabase

File: hiidatabase.c
Description:
This function removes HII strings from private storage and frees allocated memory
Input:
IN DBE_DATABASE *Database - Pointer to private strings storage
Output:
None
Built on 16:23:58 02/27/09


FindAndRemovePackages in the hiidatabase.c

Function : FindAndRemovePackages

File: hiidatabase.c
Description:
This function finds or removes packages from package list with given handle
Input:
IN EFI_HII_HANDLE Handle - Handle of package list where to find package
IN UINT8 PackageType - Package type to find
IN EFI_GUID *PackageGuid - Pointer to package guid to find
IN BOOLEAN FindOnly - Flag, which determines should package be found or removed
Output:
TRUE - Package of given type found
Notes:
If FindOnly is TRUE, function returns TRUE when first package of given type is found. Otherwise
function removes all packages of given type from package list and returns FALSE
Built on 16:23:58 02/27/09


FindLayoutByGuid in the hiidatabase.c

Function : FindLayoutByGuid

File: hiidatabase.c
Description:
This function finds keyboard layout in private area by given guid
Input:
IN EFI_GUID *Guid - Pointer to guid of keyboard layout
Output:
EFI_HII_KEYBOARD_LAYOUT* - Pointer to found layout
NULL - layout not found
Built on 16:23:58 02/27/09


HiiDatabaseEntryPoint in the hiidatabase.c

Function : HiiDatabaseEntryPoint

File: hiidatabase.c
Description:
This function is HII driver entry point
Input:
IN EFI_HANDLE ImageHandle - Image handle
IN EFI_SYSTEM_TABLE *SystemTable - pointer to system table
Output:
EFI_SUCCESS - Function executed successfully, HII protocols installed
EFI_ERROR - Some error occured during execution
Built on 16:23:58 02/27/09


HiiExportPacks in the hiidatabase.c

Function : HiiExportPacks

File: hiidatabase.c
Description:
This function is HII Database protocol function ExportPackageLists implementation
Input:
IN EFI_HII_DATABASE_PROTOCOL *This - Pointer to EFI_HII_DATABASE_PROTOCOL structure
IN EFI_HII_HANDLE Handle - Handle of package list to be exported
IN OUT UINTN *BufferSize - Pointer to export buffer size value
OUT EFI_HII_PACKAGE_LIST_HEADER *Buffer - Pointer to buffer where to export package lists
Output:
EFI_SUCCESS - Function executed successfully
EFI_INVALID_PARAMETER - Handle is invalid
EFI_BUFFER_TOO_SMALL - Export buffer too small
Built on 16:23:58 02/27/09


HiiFindKeyboardLayouts in the hiidatabase.c

Function : HiiFindKeyboardLayouts

File: hiidatabase.c
Description:
This function is HII Database protocol function FindKeyboardLayouts implementation
Input:
IN EFI_HII_DATABASE_PROTOCOL *This - Pointer to EFI_HII_DATABASE_PROTOCOL structure
IN OUT UINT16 *KeyGuidBufferLength - Pointer to allocated buffer size value
OUT EFI_GUID *KeyGuidBuffer - Pointer to EFI_GUID buffer where to store found layouts
Output:
EFI_SUCCESS - Function executed successfully
EFI_INVALID_PARAMETER - KeyGuidBufferLength or KeyGuidBuffer is NULL
EFI_BUFFER_TOO_SMALL - Allocated buffer too small
EFI_NOT_FOUND - No layouts found


HiiGetKeyboardLayout in the hiidatabase.c

Function : HiiGetKeyboardLayout

File: hiidatabase.c
Description:
This function is HII Database protocol function GetKeyboardLayout implementation
Input:
IN EFI_HII_DATABASE_PROTOCOL *This - Pointer to EFI_HII_DATABASE_PROTOCOL structure
IN EFI_GUID *KeyGuid - Pointer to EFI_GUID of layout to set
IN OUT UINT16 *KeyGuidBufferLength - Pointer to allocated buffer size value
OUT EFI_HII_KEYBOARD_LAYOUT *KeyboardLayout - Pointer to EFI_HII_KEYBOARD_LAYOUT where to store layout
Output:
EFI_SUCCESS - Function executed successfully
EFI_INVALID_PARAMETER - KeyboardLayout or KeyGuidBufferLength is NULL
EFI_NOT_FOUND - Given layout not found
EFI_BUFFER_TOO_SMALL - Allocated buffer too small


HiiGetPackHandle in the hiidatabase.c

Function : HiiGetPackHandle

File: hiidatabase.c
Description:
This function is HII Database protocol function GetPackageHandle implementation
Input:
IN EFI_HII_DATABASE_PROTOCOL *This - Pointer to EFI_HII_DATABASE_PROTOCOL structure
IN EFI_HII_HANDLE PackageListHandle - PackageList handle
OUT EFI_HANDLE *DriverHandle - Pointer, where to store found Driver handle
Output:
EFI_SUCCESS - Function executed successfully
EFI_INVALID_PARAMETER - PackageListHandle is invalid


HiiListPacks in the hiidatabase.c

Function : HiiListPacks

File: hiidatabase.c
Description:
This function is HII Database protocol function ListPackageLists implementation
Input:
IN EFI_HII_DATABASE_PROTOCOL *This - Pointer to EFI_HII_DATABASE_PROTOCOL structure
IN UINT8 PackageType - Package type
IN EFI_GUID *PackageGuid - Pointer to package guid
IN OUT UINTN *HandleBufferLength - Pointer to allocated buffer size value
OUT EFI_HII_HANDLE *Handle - Pointer to EFI_HII_HANDLE buffer where to store found handles
Output:
EFI_SUCCESS - Function executed successfully
EFI_INVALID_PARAMETER - HandleBufferLength is NULL
EFI_BUFFER_TOO_SMALL - Allocated buffer too small
EFI_NOT_FOUND - No handles found


HiiNewPack in the hiidatabase.c

Function : HiiNewPack

File: hiidatabase.c
Description:
This function is HII Database protocol function NewPackageList implementation
Input:
IN EFI_HII_DATABASE_PROTOCOL *This - Pointer to EFI_HII_DATABASE_PROTOCOL structure
IN EFI_HII_PACKAGE_LIST_HEADER *PackageList - Pointer to package list to be added to database
IN EFI_HANDLE DriverHandle - Driver handle
OUT EFI_HII_HANDLE *Handle - Pointer to EFI_HII_HANDLE where to store created handle
Output:
EFI_SUCCESS - Function executed successfully
EFI_INVALID_PARAMETER - Handle or PackageList is NULL
EFI_OUT_OF_RESOURCES - Not enough memory to perform operation


HiiRegisterNotify in the hiidatabase.c

Function : HiiRegisterNotify

File: hiidatabase.c
Description:
This function is HII Database protocol function RegisterPackageNotify implementation
Input:
IN EFI_HII_DATABASE_PROTOCOL *This - Pointer to EFI_HII_DATABASE_PROTOCOL structure
IN UINT8 PackageType - Package type
IN EFI_GUID *PackageGuid - Pointer to Package guid
IN EFI_HII_DATABASE_NOTIFY PackageNotifyFn - Function to be called
IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType - Notify type
OUT EFI_HANDLE *NotifyHandle - Pointer, where to store created Notify handle
Output:
EFI_SUCCESS - Function executed successfully
EFI_INVALID_PARAMETER - PackageGuid is not NULL and PackageType is not Guid package
EFI_OUT_OF_RESOURCES - Not enough memory to perform operation


HiiRemovePack in the hiidatabase.c

Function : HiiRemovePack

File: hiidatabase.c
Description:
This function is HII Database protocol function RemovePackageList implementation
Input:
IN EFI_HII_DATABASE_PROTOCOL *This - Pointer to EFI_HII_DATABASE_PROTOCOL structure
IN EFI_HII_HANDLE Handle - Handle of package list to be removed from database
Output:
EFI_SUCCESS - Function executed successfully
EFI_INVALID_PARAMETER - Handle is not valid


HiiSetKeyboardLayout in the hiidatabase.c

Function : HiiSetKeyboardLayout

File: hiidatabase.c
Description:
This function is HII Database protocol function SetKeyboardLayout implementation
Input:
IN EFI_HII_DATABASE_PROTOCOL *This - Pointer to EFI_HII_DATABASE_PROTOCOL structure
IN EFI_GUID *KeyGuid - Pointer to EFI_GUID of layout to set
Output:
EFI_SUCCESS - Function executed successfully
EFI_INVALID_PARAMETER - KeyGuid is NULL
EFI_NOT_FOUND - Given layout not found


HiiUnregisterNotify in the hiidatabase.c

Function : HiiUnregisterNotify

File: hiidatabase.c
Description:
This function is HII Database protocol function UnregisterPackageNotify implementation
Input:
IN EFI_HII_DATABASE_PROTOCOL *This - Pointer to EFI_HII_DATABASE_PROTOCOL structure
IN EFI_HANDLE NotificationHandle - Notify handle
Output:
EFI_SUCCESS - Function executed successfully
EFI_INVALID_PARAMETER - NotificationHandle is not valid


HiiUpdatePack in the hiidatabase.c

Function : HiiUpdatePack

File: hiidatabase.c
Description:
This function is HII Database protocol function UpdatePackageList implementation
Input:
IN EFI_HII_DATABASE_PROTOCOL *This - Pointer to EFI_HII_DATABASE_PROTOCOL structure
IN EFI_HII_HANDLE Handle - Handle of package list to be updated
IN EFI_HII_PACKAGE_LIST_HEADER *PackageList - Pointer to new Package list
Output:
EFI_SUCCESS - Function executed successfully
EFI_INVALID_PARAMETER - Handle is invalid


InvokeRegisteredNotify in the hiidatabase.c

Function : InvokeRegisteredNotify

File: hiidatabase.c
Description:
This function invokes registered notify function if package types match
Input:
IN EFI_HII_PACKAGE_HEADER *Package - Pointer to package to match
IN EFI_HII_HANDLE Handle - Handle of package list to whom given package belongs
IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType - Notification type
Output:
None


MatchPackage in the hiidatabase.c

Function : MatchPackage

File: hiidatabase.c
Description:
This function checks if given package matches given type and guid
Input:
IN UINT8 PackageType - Package type to match
IN EFI_GUID *PackageGuid - Pointer to package guid to match
IN EFI_HII_PACKAGE_HEADER *Package - Pointer to package to check
Output:
TRUE - package matches given type and guid
FALSE - package don't match


NewNotifyRecord in the hiidatabase.c

Function : NewNotifyRecord

File: hiidatabase.c
Description:
This function creates new NOTIFY_RECORD structure and returns pointer to it
Input:
None
Output:
NOTIFY_RECORD* - pointer to newly created structure
NULL - Not enough memory to perform operation


NewPackageListRecord in the hiidatabase.c

Function : NewPackageListRecord

File: hiidatabase.c
Description:
This function creates new PACKAGE_LIST_RECORD structure and returns pointer to it
Input:
None
Output:
PACKAGE_LIST_RECORD* - pointer to newly created structure
NULL - Not enough memory to perform operation


ParseKeyLayoutPackage in the hiidatabase.c

Function : ParseKeyLayoutPackage

File: hiidatabase.c
Description:
This function extracts keyboard layout from package and saves it in private area
Input:
IN EFI_HII_KEYBOARD_PACKAGE_HDR *Package - Pointer to keyboard layout package
Output:
EFI_SUCCESS - Function executed successfully
EFI_OUT_OF_RESOURCES - Not enough memory to perform operation


ParseSimpleFontsPackage in the hiidatabase.c

Function : ParseSimpleFontsPackage

File: hiidatabase.c
Description:
This function extracts simple fonts from package and saves in private area
Input:
IN EFI_HII_SIMPLE_FONT_PACKAGE_HDR *Package - Pointer to simple font package
Output:
EFI_SUCCESS - Function executed successfully
EFI_OUT_OF_RESOURCES - Not enough memory to perform operation


RemovePackage in the hiidatabase.c

Function : RemovePackage

File: hiidatabase.c
Description:
This function removes package from package list with given handle
Input:
IN EFI_HII_HANDLE Handle - Handle of package list where to add package
IN PACKAGE_LINK *Package - Pointer to package to remove
Output:
None


HiiDatabase.h

Description:
Hii Database protocol header file


HiiFont.c

Description:
Hii font protocol functions implementation

The following functions are used in the file: HiiFont.c.

Function | Description
AdjustLineSize | This function analyzes lines of the string and makes them fit into drawing area size
Draw | This function draws lines of the string
DrawNarrowGlyph | This function draws narrow glyph with given offset and size in given buffer
DrawWideGlyph | This function draws wide glyph with given offset and size in given buffer
GetClipLineLength | This function returns string end symbol index wich fits given MaxLength and adjusted string width depends on ClipClean flag
GetGlyphWidth | This function returns symbol width in pixels using current font
GetLineLength | This function returns string width in pixels using current font
GetMaxLineLength | This function finds the maximum length line in given string
GetWrapIndex | This function splits string into two lines, which fit given MaxLength
HiiGetFontInfo | This function is HII Font protocol function GetFontInfo implementation
HiiGetGlyph | This function is HII Font protocol function GetGlyph implementation
HiiStringIdToImage | This function is HII Font protocol function StringIdToImage implementation
HiiStringToImage | This function is HII Font protocol function StringToImage implementation
IsLineBreak | This function checks if given symbol is a line break
IsLineBreakOpp | This function checks if given symbol is a line break opportunity
SplitByLineBreaks | This function splits given string into lines on linebreaks


AdjustLineSize in the HiiFont.c

Function : AdjustLineSize

File: HiiFont.c
Description:
This function analyzes lines of the string and makes them fit into drawing area size
Input:
None
Output:
EFI_SUCCESS - Function executed successfully
EFI_OUT_OF_RESOURCES - Not enough memory to perform operation
Built on 16:23:58 02/27/09


Draw in the HiiFont.c

Function : Draw

File: HiiFont.c
Description:
This function draws lines of the string
Input:
None
Output:
None
Built on 16:23:58 02/27/09


DrawNarrowGlyph in the HiiFont.c

Function : DrawNarrowGlyph

File: HiiFont.c
Description:
This function draws narrow glyph with given offset and size in given buffer
Input:
IN UINTN StartX - start horizontal position of glyph
IN UINTN StartY - start vertical position of glyph
IN UINTN SizeX - horizontal size of glyph
IN UINTN SizeY - vertical size of glyph
IN CHAR16 Char - symbol to Draw
IN BOOLEAN Transparent - transparency flag
OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Blt - output buffer
Output:
None
Built on 16:23:58 02/27/09


DrawWideGlyph in the HiiFont.c

Function : DrawWideGlyph

File: HiiFont.c
Description:
This function draws wide glyph with given offset and size in given buffer
Input:
IN UINTN StartX - start horizontal position of glyph
IN UINTN StartY - start vertical position of glyph
IN UINTN SizeX - horizontal size of glyph
IN UINTN SizeY - vertical size of glyph
IN CHAR16 Char - symbol to Draw
IN BOOLEAN Transparent - transparency flag
OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Blt - output buffer
Output:
None
Built on 16:23:58 02/27/09


GetClipLineLength in the HiiFont.c

Function : GetClipLineLength

File: HiiFont.c
Description:
This function returns string end symbol index wich fits given MaxLength and adjusted
string width depends on ClipClean flag
Input:
IN UINTN StartIndex - Start symbol index in string
IN UINTN MaxLength - Maximum length allowed
IN BOOLEAN ClipClean - Flag, wich defines partial symbols are visible or not
OUT UINTN *EndIndex - Pointer to end symbol index in string
Output:
UINTN - String width in pixels
Notes:
If ClipClean is TRUE - partial symbols not allowed
Built on 16:23:58 02/27/09


GetGlyphWidth in the HiiFont.c

Function : GetGlyphWidth

File: HiiFont.c
Description:
This function returns symbol width in pixels using current font
Input:
IN CHAR16 Char - Symbol to process
Output:
UINTN - Symbol width in pixels
Built on 16:23:58 02/27/09


GetLineLength in the HiiFont.c

Function : GetLineLength

File: HiiFont.c
Description:
This function returns string width in pixels using current font
Input:
IN UINTN StartIndex - Start symbol index in string
IN UINTN EndIndex - End symbol index in string
Output:
UINTN - String width in pixels
Built on 16:23:58 02/27/09


GetMaxLineLength in the HiiFont.c

Function : GetMaxLineLength

File: HiiFont.c
Description:
This function finds the maximum length line in given string
Input:
None
Output:
UINTN - String width in pixels
Built on 16:23:58 02/27/09


GetWrapIndex in the HiiFont.c

Function : GetWrapIndex

File: HiiFont.c
Description:
This function splits string into two lines, which fit given MaxLength
Input:
IN UINTN StartIndex - Start symbol index in string
IN UINTN MaxLength - Maximum length allowed
IN OUT UINTN *EndIndex - Pointer to end symbol index of line 1
IN OUT UINTN *StartIndex2 - Pointer to start symbol index in line 2
Output:
UINTN - String width in pixels
Built on 16:23:58 02/27/09


HiiGetFontInfo in the HiiFont.c

Function : HiiGetFontInfo

File: HiiFont.c
Description:
This function is HII Font protocol function GetFontInfo implementation
Input:
IN EFI_HII_FONT_PROTOCOL *This - Pointer to EFI_HII_FONT_PROTOCOL structure
IN OUT EFI_FONT_HANDLE *FontHandle - Pointer to font handle
IN EFI_FONT_DISPLAY_INFO *StringInfoIn - Pointer to display info
OUT EFI_FONT_DISPLAY_INFO *StringInfoOut - Pointer to output display info
IN EFI_STRING *String - Pointer to string to test
Output:
EFI_SUCCESS - Function executed successfully
EFI_OUT_OF_RESOURCES - Not enough memory to perform operation


HiiGetGlyph in the HiiFont.c

Function : HiiGetGlyph

File: HiiFont.c
Description:
This function is HII Font protocol function GetGlyph implementation
Input:
IN EFI_HII_FONT_PROTOCOL *This - Pointer to EFI_HII_FONT_PROTOCOL structure
IN CHAR16 Char - Symbol, which glyph to return
IN EFI_FONT_DISPLAY_INFO *StringInfo - Pointer to display info
IN OUT EFI_IMAGE_OUTPUT **Blt - Pointer to output buffer
OUT UINTN *Baseline - Pointer to baseline placeholder
Output:
EFI_SUCCESS - Function executed successfully
EFI_OUT_OF_RESOURCES - Not enough memory to perform operation


HiiStringIdToImage in the HiiFont.c

Function : HiiStringIdToImage

File: HiiFont.c
Description:
This function is HII Font protocol function StringIdToImage implementation
Input:
IN EFI_HII_FONT_PROTOCOL *This - Pointer to EFI_HII_FONT_PROTOCOL structure
IN EFI_HII_OUT_FLAGS Flags - Drawing flags
IN EFI_HII_HANDLE PackageList - Handle of package list where string resides
IN EFI_STRING_ID StringId - String Id
IN CHAR8 *Language - Language Id
IN EFI_FONT_DISPLAY_INFO *StringInfo - Pointer to display info
IN OUT EFI_IMAGE_OUTPUT **Blt - Pointer to output buffer
IN UINTN BltX - start horizontal position
IN UINTN BltY - start vertical position
OUT EFI_HII_ROW_INFO **RowInfoArray - Pointer to returned row info array
OUT UINTN *RowInfoArraySize - Pointer to store row info array size
OUT UINTN *ColumnInfoArray - Pointer to returned column info array
Output:
EFI_SUCCESS - Function executed successfully
EFI_OUT_OF_RESOURCES - Not enough memory to perform operation


HiiStringToImage in the HiiFont.c

Function : HiiStringToImage

File: HiiFont.c
Description:
This function is HII Font protocol function StringToImage implementation
Input:
IN EFI_HII_FONT_PROTOCOL *This - Pointer to EFI_HII_FONT_PROTOCOL structure
IN EFI_HII_OUT_FLAGS Flags - Drawing flags
IN EFI_STRING String - String to Draw
IN EFI_FONT_DISPLAY_INFO *StringInfo - Pointer to display info
IN OUT EFI_IMAGE_OUTPUT **Blt - Pointer to output buffer
IN UINTN BltX - start horizontal position
IN UINTN BltY - start vertical position
OUT EFI_HII_ROW_INFO **RowInfoArray - Pointer to returned row info array
OUT UINTN *RowInfoArraySize - Pointer to store row info array size
OUT UINTN *ColumnInfoArray - Pointer to returned column info array
Output:
EFI_SUCCESS - Function executed successfully
EFI_OUT_OF_RESOURCES - Not enough memory to perform operation


IsLineBreak in the HiiFont.c

Function : IsLineBreak

File: HiiFont.c
Description:
This function checks if given symbol is a line break
Input:
IN CHAR16 Char - Symbol to test
Output:
TRUE - Symbol is a linebreak
FALSE - Symbol is not a linebreak


IsLineBreakOpp in the HiiFont.c

Function : IsLineBreakOpp

File: HiiFont.c
Description:
This function checks if given symbol is a line break opportunity
Input:
IN CHAR16 Char - Symbol to test
Output:
TRUE - Symbol is a linebreak opportunity
FALSE - Symbol is not a linebreak opportunity


SplitByLineBreaks in the HiiFont.c

Function : SplitByLineBreaks

File: HiiFont.c
Description:
This function splits given string into lines on linebreaks
Input:
IN EFI_STRING String - string to split
Output:
EFI_SUCCESS - Function executed successfully
EFI_OUT_OF_RESOURCES - Not enough memory to perform operation


HiiFont.h

Description:
Hii Font protocol header file


HiiPrivate.h

Description:


HiiString.c

Description:
Hii string protocol functions implementation

The following functions are used in the file: HiiString.c.

Function | Description
AddLanguage | This function adds language to private HII database
AddString | This function adds string to private storage
ExtractStrings | This function extracts strings from given block of strings
GetLanguageId | This function returns language private Id which corresponds with given language Id
GetStringBlock | This function packs strings from private storage into string package format
GetStringBlockSize | This function determines block size needed to pack strings into string package
HiiGetLanguages | This function is HII String protocol function GetLanguages implementation
HiiGetSecondLanguages | This function is HII String protocol function GetSecondaryLanguages implementation
HiiGetString | This function is HII String protocol function GetString implementation
HiiNewString | This function is HII String protocol function NewString implementation
HiiSetString | This function is HII String protocol function SetString implementation
ParseStringsPackage | This function parses string package
StrCmp16 | This function compares two UNICODE strings
StrCmp8 | This function compares two ASCII strings
StrCpy16 | This function copies one UNICODE string into another
StrCpy8 | This function copies one ASCII string into another
StrSize16 | This function returns UNICODE string size in bytes
StrSize8 | This function returns ASCII string size in bytes
UpdateStringPackages | This function updates string package with strings contained in private storage


AddLanguage in the HiiString.c

Function : AddLanguage

File: HiiString.c
Description:
This function adds language to private HII database
Input:
IN PACKAGE_LIST_RECORD *PackageList - Pointer to package list where language belongs
IN EFI_HII_HANDLE PackageList - Handle of package list
IN CHAR8 *Language - Language Id
IN CHAR16 *LanguageName - Pointer to human readable language name
IN UINT16 LastStringId - Last string Id on this language
Output:
EFI_SUCCESS - Function executed successfully
EFI_OUT_OF_RESOURCES - Not enough memory to perform operation
Built on 16:23:58 02/27/09


AddString in the HiiString.c

Function : AddString

File: HiiString.c
Description:
This function adds string to private storage
Input:
IN PACKAGE_LIST_RECORD *PackageList - Pointer to package list where string belongs
IN UINT16 LanguageId - Private language Id of the string
IN UINT16 StringId - Private string Id of the string
IN UINT16 FontId - Private font Id of the string
IN EFI_STRING String - String to add
Output:
EFI_SUCCESS - Function executed successfully
EFI_OUT_OF_RESOURCES - Not enough memory to perform operation
Built on 16:23:58 02/27/09


ExtractStrings in the HiiString.c

Function : ExtractStrings

File: HiiString.c
Description:
This function extracts strings from given block of strings
Input:
IN PACKAGE_LIST_RECORD *PackageList - Pointer to package list where strings belong
IN UINT16 LanguageId - Private language Id
IN OUT UINT16 *StringId - Pointer to string Id
IN UINT16 FontId - Font Id
IN UINT16 StringCount - Number of strings to extract
IN BOOLEAN Compressed - Flag, that determines whether string is compressed or not
IN OUT VOID **StringBlock - Pointer to block of strings to extract
Output:
EFI_SUCCESS - Function executed successfully
EFI_ERROR - Some error occured during execution
Built on 16:23:58 02/27/09


GetLanguageId in the HiiString.c

Function : GetLanguageId

File: HiiString.c
Description:
This function returns language private Id which corresponds with given language Id
Input:
IN PACKAGE_LIST_RECORD *PackageList - Pointer to package list where language belongs
IN CHAR8 *Language - Language Id
OUT UINT16 *LanguageId - Pointer where to return private Id
OUT LANGUAGE_LINK **Found - Pointer where to return found language private data
Output:
EFI_SUCCESS - Function executed successfully
EFI_NOT_FOUND - language not found
Built on 16:23:58 02/27/09


GetStringBlock in the HiiString.c

Function : GetStringBlock

File: HiiString.c
Description:
This function packs strings from private storage into string package format
Input:
IN PACKAGE_LIST_RECORD *PackageList - Pointer to package list where strings belong
IN CHAR8 *Language - Language Id
OUT UINT8 *Buffer - Pointer to output buffer
Output:
None
Built on 16:23:58 02/27/09


GetStringBlockSize in the HiiString.c

Function : GetStringBlockSize

File: HiiString.c
Description:
This function determines block size needed to pack strings into string package
Input:
IN PACKAGE_LIST_RECORD *PackageList - Pointer to package list where strings belong
IN CHAR8 *Language - Language Id
Output:
UINTN - String block size in bytes
Built on 16:23:58 02/27/09


HiiGetLanguages in the HiiString.c

Function : HiiGetLanguages

File: HiiString.c
Description:
This function is HII String protocol function GetLanguages implementation
Input:
IN EFI_HII_STRING_PROTOCOL *This - Pointer to EFI_HII_STRING_PROTOCOL structure
IN EFI_HII_HANDLE PackageList - Handle of package list
IN OUT CHAR8 *Languages - Pointer to returned language buffer
IN OUT UINTN *LanguagesSize - Pointer to language buffer size
Output:
EFI_SUCCESS - Function executed successfully
EFI_INVALID_PARAMETER - LanguagesSize or Languages is NULL
EFI_NOT_FOUND - Package list handle is invalid or NULL
EFI_BUFFER_TOO_SMALL - Allocated buffer too small


HiiGetSecondLanguages in the HiiString.c

Function : HiiGetSecondLanguages

File: HiiString.c
Description:
This function is HII String protocol function GetSecondaryLanguages implementation
Input:
IN EFI_HII_STRING_PROTOCOL *This - Pointer to EFI_HII_STRING_PROTOCOL structure
IN EFI_HII_HANDLE PackageList - Handle of package list
IN CHAR8 *FirstLanguage - First language definition
IN OUT CHAR8 *Languages - Pointer to returned language buffer
IN OUT UINTN *LanguagesSize - Pointer to language buffer size
Output:
EFI_SUCCESS - Function executed successfully
EFI_INVALID_PARAMETER - LanguagesSize or Languages is NULL
EFI_NOT_FOUND - Package list handle is invalid or NULL
EFI_BUFFER_TOO_SMALL - Allocated buffer too small


HiiGetString in the HiiString.c

Function : HiiGetString

File: HiiString.c
Description:
This function is HII String protocol function GetString implementation
Input:
IN EFI_HII_STRING_PROTOCOL *This - Pointer to EFI_HII_STRING_PROTOCOL structure
IN CHAR8 *Language - Language definition
IN EFI_HII_HANDLE PackageList - Handle of package list
IN EFI_STRING_ID StringId - String Id
OUT EFI_STRING String - Pointer to output string
IN OUT UINTN *StringSize - Pointer to string size value
OUT EFI_FONT_INFO *StringFontInfo - Pointer to returned string font info
Output:
EFI_SUCCESS - Function executed successfully
EFI_INVALID_PARAMETER - String or StringSize or Language is NULL
EFI_NOT_FOUND - String not found
EFI_BUFFER_TOO_SMALL - Allocated buffer too small


HiiNewString in the HiiString.c

Function : HiiNewString

File: HiiString.c
Description:
This function is HII String protocol function NewString implementation
Input:
IN EFI_HII_STRING_PROTOCOL *This - Pointer to EFI_HII_STRING_PROTOCOL structure
IN EFI_HII_HANDLE PackageList - Handle of package list
OUT EFI_STRING_ID *StringId - Pointer to returned string Id
IN CHAR8 *Language - Language definition
IN CHAR16 *LanguageName - Language human readable name
IN EFI_STRING String - String to set
IN EFI_FONT_INFO *StringFontInfo - Pointer to string font info
Output:
EFI_SUCCESS - Function executed successfully
EFI_INVALID_PARAMETER - String or Language or StringId is NULL
EFI_NOT_FOUND - Package list handle is invalid


HiiSetString in the HiiString.c

Function : HiiSetString

File: HiiString.c
Description:
This function is HII String protocol function SetString implementation
Input:
IN EFI_HII_STRING_PROTOCOL *This - Pointer to EFI_HII_STRING_PROTOCOL structure
IN EFI_HII_HANDLE PackageList - Handle of package list
IN EFI_STRING_ID StringId - String Id
IN CHAR8 *Language - Language definition
IN EFI_STRING String - String to set
IN EFI_FONT_INFO *StringFontInfo - Pointer to string font info
Output:
EFI_SUCCESS - Function executed successfully
EFI_INVALID_PARAMETER - String or Language is NULL
EFI_NOT_FOUND - String not found


ParseStringsPackage in the HiiString.c

Function : ParseStringsPackage

File: HiiString.c
Description:
This function parses string package
Input:
IN PACKAGE_LIST_RECORD *PackageList - Pointer to package list where string package belongs
IN EFI_HII_STRING_PACKAGE_HDR *Package - Pointer to package to parse
Output:
EFI_SUCCESS - Function executed successfully
EFI_ERROR - Some error occured during execution


StrCmp16 in the HiiString.c

Function : StrCmp16

File: HiiString.c
Description:
This function compares two UNICODE strings
Input:
IN CHAR16 *Dest - Pointer to destination string
IN CHAR16 *Src - Pointer to source string
Output:
INTN - Zero if strings are equal, non-zero otherwise


StrCmp8 in the HiiString.c

Function : StrCmp8

File: HiiString.c
Description:
This function compares two ASCII strings
Input:
IN CHAR8 *Dest - Pointer to destination string
IN CHAR8 *Src - Pointer to source string
Output:
INTN - Zero if strings are equal, non-zero otherwise


StrCpy16 in the HiiString.c

Function : StrCpy16

File: HiiString.c
Description:
This function copies one UNICODE string into another
Input:
IN CHAR16 *Dest - Pointer to destination string
IN CHAR16 *Src - Pointer to source string
Output:
None


StrCpy8 in the HiiString.c

Function : StrCpy8

File: HiiString.c
Description:
This function copies one ASCII string into another
Input:
IN CHAR8 *Dest - Pointer to destination string
IN CHAR8 *Src - Pointer to source string
Output:
None


StrSize16 in the HiiString.c

Function : StrSize16

File: HiiString.c
Description:
This function returns UNICODE string size in bytes
Input:
IN CHAR16 *String - Pointer to string
Output:
UINT32 - Size of string in bytes including nul-terminator


StrSize8 in the HiiString.c

Function : StrSize8

File: HiiString.c
Description:
This function returns ASCII string size in bytes
Input:
IN CHAR8 *String - Pointer to string
Output:
UINT32 - Size of string in bytes including nul-terminator


UpdateStringPackages in the HiiString.c

Function : UpdateStringPackages

File: HiiString.c
Description:
This function updates string package with strings contained in private storage
Input:
IN EFI_HII_HANDLE Handle - Handle of package list to update
Output:
EFI_SUCCESS - Function executed successfully
EFI_OUT_OF_RESOURCES - Not enough memory to perform operation


HiiString.h

Description:
Hii String protocol header file


Functions in Alphabetical Order

In Alphabetical Order

The following topics provide a list in alphabetical order.
For a list by file name, see By File Name.

  • A
  • C
  • D
  • E
  • F
  • G
  • H
  • I
  • M
  • N
  • P
  • R
  • S
  • U
Built on 16:23:58 02/27/09


Functions in Alphabetical Order

A

Function | Description
AddLanguage | This function adds language to private HII database
AddPackage | This function adds package to package list with given handle
AddPackages | This function adds packages from PackageList to package list with given handle
AddString | This function adds string to private storage
AdjustLineSize | This function analyzes lines of the string and makes them fit into drawing area size

Built on 16:23:58 02/27/09


Functions in Alphabetical Order

C

Function | Description
CheckIfPresent | This function checks if package list with given guid already in database
CreateNewLink | This function creates new link structure for linked list and returns pointer to it

Built on 16:23:58 02/27/09


Functions in Alphabetical Order

D

Function | Description
DeleteList | This function deletes linked list and frees allocated memory
DeleteSimpleFonts | This function removes simple fonts from private area and frees allocated memory
DeleteStringsFromDatabase | This function removes HII strings from private storage and frees allocated memory
Draw | This function draws lines of the string
DrawNarrowGlyph | This function draws narrow glyph with given offset and size in given buffer
DrawWideGlyph | This function draws wide glyph with given offset and size in given buffer

Built on 16:23:58 02/27/09


Functions in Alphabetical Order

E

Function | Description
ExtractStrings | This function extracts strings from given block of strings

Built on 16:23:58 02/27/09


Functions in Alphabetical Order

F

Function | Description
FindAndRemovePackages | This function finds or removes packages from package list with given handle
FindLayoutByGuid | This function finds keyboard layout in private area by given guid

Built on 16:23:58 02/27/09


Functions in Alphabetical Order

G

Function | Description
GetClipLineLength | This function returns string end symbol index wich fits given MaxLength and adjusted string width depends on ClipClean flag
GetGlyphWidth | This function returns symbol width in pixels using current font
GetLanguageId | This function returns language private Id which corresponds with given language Id
GetLineLength | This function returns string width in pixels using current font
GetMaxLineLength | This function finds the maximum length line in given string
GetStringBlock | This function packs strings from private storage into string package format
GetStringBlockSize | This function determines block size needed to pack strings into string package
GetWrapIndex | This function splits string into two lines, which fit given MaxLength

Built on 16:23:58 02/27/09


Functions in Alphabetical Order

H

Function | Description
HiiDatabaseEntryPoint | This function is HII driver entry point
HiiExportPacks | This function is HII Database protocol function ExportPackageLists implementation
HiiFindKeyboardLayouts | This function is HII Database protocol function FindKeyboardLayouts implementation
HiiGetFontInfo | This function is HII Font protocol function GetFontInfo implementation
HiiGetGlyph | This function is HII Font protocol function GetGlyph implementation
HiiGetKeyboardLayout | This function is HII Database protocol function GetKeyboardLayout implementation
HiiGetLanguages | This function is HII String protocol function GetLanguages implementation
HiiGetPackHandle | This function is HII Database protocol function GetPackageHandle implementation
HiiGetSecondLanguages | This function is HII String protocol function GetSecondaryLanguages implementation
HiiGetString | This function is HII String protocol function GetString implementation
HiiListPacks | This function is HII Database protocol function ListPackageLists implementation
HiiNewPack | This function is HII Database protocol function NewPackageList implementation
HiiNewString | This function is HII String protocol function NewString implementation
HiiRegisterNotify | This function is HII Database protocol function RegisterPackageNotify implementation
HiiRemovePack | This function is HII Database protocol function RemovePackageList implementation
HiiSetKeyboardLayout | This function is HII Database protocol function SetKeyboardLayout implementation
HiiSetString | This function is HII String protocol function SetString implementation
HiiStringIdToImage | This function is HII Font protocol function StringIdToImage implementation
HiiStringToImage | This function is HII Font protocol function StringToImage implementation
HiiUnregisterNotify | This function is HII Database protocol function UnregisterPackageNotify implementation
HiiUpdatePack | This function is HII Database protocol function UpdatePackageList implementation

Built on 16:23:58 02/27/09


Functions in Alphabetical Order

I

Function | Description
InvokeRegisteredNotify | This function invokes registered notify function if package types match
IsLineBreak | This function checks if given symbol is a line break
IsLineBreakOpp | This function checks if given symbol is a line break opportunity

Built on 16:23:58 02/27/09


Functions in Alphabetical Order

M

Function | Description
MatchPackage | This function checks if given package matches given type and guid

Built on 16:23:58 02/27/09


Functions in Alphabetical Order

N

Function | Description
NewNotifyRecord | This function creates new NOTIFY_RECORD structure and returns pointer to it
NewPackageListRecord | This function creates new PACKAGE_LIST_RECORD structure and returns pointer to it

Built on 16:23:58 02/27/09


Functions in Alphabetical Order

P

Function | Description
ParseKeyLayoutPackage | This function extracts keyboard layout from package and saves it in private area
ParseSimpleFontsPackage | This function extracts simple fonts from package and saves in private area
ParseStringsPackage | This function parses string package

Built on 16:23:58 02/27/09


Functions in Alphabetical Order

R

Function | Description
RemovePackage | This function removes package from package list with given handle

Built on 16:23:58 02/27/09


Functions in Alphabetical Order

S

Function | Description
SplitByLineBreaks | This function splits given string into lines on linebreaks
StrCmp16 | This function compares two UNICODE strings
StrCmp8 | This function compares two ASCII strings
StrCpy16 | This function copies one UNICODE string into another
StrCpy8 | This function copies one ASCII string into another
StrSize16 | This function returns UNICODE string size in bytes
StrSize8 | This function returns ASCII string size in bytes

Built on 16:23:58 02/27/09


Functions in Alphabetical Order

U

Function | Description
UpdateStringPackages | This function updates string package with strings contained in private storage

Built on 16:23:58 02/27/09


General Information


Copyright

American Megatrends, Inc.
6145-F, Northbelt Parkway
Norcross, GA 30071 (USA)

Copyright (c) 1999-2009 American Megatrends, Inc. All Rights Reserved.

This publication contains proprietary information, which is protected by copyright. No part of this publication may be reproduced, transcribed, stored in a retrieval system, translated into any language or computer language, or transmitted in any form whatsoever without the prior written consent of the publisher, American Megatrends, Inc.

American Megatrends, Inc. retains the right to update, change, modify this publication at any time, without notice.

For Additional Information

Call American Megatrends BIOS Sales Department at 1-800-828-9264 for additional information.

Limitations of Liability

In no event shall American Megatrends be held liable for any loss, expenses, or damages of any kind whatsoever, whether direct, indirect, incidental, or consequential, arising from the design or use of this product or the support materials provided with the product.

Limited Warranty

No warranties are made, either expressed or implied, with regard to the contents of this work, its merchantability, or fitness for a particular use. American Megatrends assumes no responsibility for errors and omissions or for the uses made of the material contained herein or reader decisions based on such use.

Trademark and Copyright Acknowledgments

All product names used in this publication are for identification purposes only and are trademarks of their respective Companies.