UEFI HII: Merge UEFI HII support changes from branch.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4597 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12
2008-01-21 14:33:26 +00:00
parent c03fbe30c1
commit dc7b4a5c43
15 changed files with 521 additions and 383 deletions

View File

@@ -51,6 +51,8 @@
typedef struct _EFI_HII_PROTOCOL EFI_HII_PROTOCOL;
typedef UINT16 FRAMEWORK_EFI_HII_HANDLE;
//
// Global definition
//
@@ -139,7 +141,7 @@ typedef struct {
// ********************************************************
//
typedef struct {
EFI_HII_HANDLE HiiHandle;
FRAMEWORK_EFI_HII_HANDLE HiiHandle;
EFI_GUID PackageGuid;
UINT32 DataTableSize;
UINT32 IfrDataOffset;
@@ -207,25 +209,6 @@ typedef struct {
//
} EFI_HII_STRING_PACK;
//
// Glyph Attributes
//
#define EFI_GLYPH_NON_SPACING 1
#define EFI_GLYPH_WIDE 2
typedef struct {
CHAR16 UnicodeWeight;
UINT8 Attributes;
UINT8 GlyphCol1[GLYPH_HEIGHT];
} EFI_NARROW_GLYPH;
typedef struct {
CHAR16 UnicodeWeight;
UINT8 Attributes;
UINT8 GlyphCol1[GLYPH_HEIGHT];
UINT8 GlyphCol2[GLYPH_HEIGHT];
UINT8 Pad[3];
} EFI_WIDE_GLYPH;
//
// A font list consists of a font header followed by a series
@@ -249,117 +232,6 @@ typedef struct {
EFI_HII_PACK_HEADER Header;
} EFI_HII_IFR_PACK_HEADER;
//
// pedef EFI_HII_PACK_HEADER EFI_HII_IFR_PACK_HEADER;
//
typedef enum {
EfiKeyLCtrl,
EfiKeyA0,
EfiKeyLAlt,
EfiKeySpaceBar,
EfiKeyA2,
EfiKeyA3,
EfiKeyA4,
EfiKeyRCtrl,
EfiKeyLeftArrow,
EfiKeyDownArrow,
EfiKeyRightArrow,
EfiKeyZero,
EfiKeyPeriod,
EfiKeyEnter,
EfiKeyLShift,
EfiKeyB0,
EfiKeyB1,
EfiKeyB2,
EfiKeyB3,
EfiKeyB4,
EfiKeyB5,
EfiKeyB6,
EfiKeyB7,
EfiKeyB8,
EfiKeyB9,
EfiKeyB10,
EfiKeyRshift,
EfiKeyUpArrow,
EfiKeyOne,
EfiKeyTwo,
EfiKeyThree,
EfiKeyCapsLock,
EfiKeyC1,
EfiKeyC2,
EfiKeyC3,
EfiKeyC4,
EfiKeyC5,
EfiKeyC6,
EfiKeyC7,
EfiKeyC8,
EfiKeyC9,
EfiKeyC10,
EfiKeyC11,
EfiKeyC12,
EfiKeyFour,
EfiKeyFive,
EfiKeySix,
EfiKeyPlus,
EfiKeyTab,
EfiKeyD1,
EfiKeyD2,
EfiKeyD3,
EfiKeyD4,
EfiKeyD5,
EfiKeyD6,
EfiKeyD7,
EfiKeyD8,
EfiKeyD9,
EfiKeyD10,
EfiKeyD11,
EfiKeyD12,
EfiKeyD13,
EfiKeyDel,
EfiKeyEnd,
EfiKeyPgDn,
EfiKeySeven,
EfiKeyEight,
EfiKeyNine,
EfiKeyE0,
EfiKeyE1,
EfiKeyE2,
EfiKeyE3,
EfiKeyE4,
EfiKeyE5,
EfiKeyE6,
EfiKeyE7,
EfiKeyE8,
EfiKeyE9,
EfiKeyE10,
EfiKeyE11,
EfiKeyE12,
EfiKeyBackSpace,
EfiKeyIns,
EfiKeyHome,
EfiKeyPgUp,
EfiKeyNLck,
EfiKeySlash,
EfiKeyAsterisk,
EfiKeyMinus,
EfiKeyEsc,
EfiKeyF1,
EfiKeyF2,
EfiKeyF3,
EfiKeyF4,
EfiKeyF5,
EfiKeyF6,
EfiKeyF7,
EfiKeyF8,
EfiKeyF9,
EfiKeyF10,
EfiKeyF11,
EfiKeyF12,
EfiKeyPrint,
EfiKeySLck,
EfiKeyPause
} EFI_KEY;
typedef struct {
EFI_KEY Key;
CHAR16 Unicode;
@@ -367,7 +239,7 @@ typedef struct {
CHAR16 AltGrUnicode;
CHAR16 ShiftedAltGrUnicode;
UINT16 Modifier;
} EFI_KEY_DESCRIPTOR;
} FRAMEWORK_EFI_KEY_DESCRIPTOR;
//
// This structure allows a sparse set of keys to be redefined
@@ -389,7 +261,7 @@ typedef struct {
//
typedef struct {
EFI_HII_PACK_HEADER Header;
EFI_KEY_DESCRIPTOR *Descriptor;
FRAMEWORK_EFI_KEY_DESCRIPTOR *Descriptor;
UINT8 DescriptorCount;
} EFI_HII_KEYBOARD_PACK;
@@ -422,7 +294,7 @@ typedef struct _EFI_HII_VARIABLE_PACK_LIST {
@param This A pointer to the EFI_HII_PROTOCOL instance.
@param Packages A pointer to an EFI_HII_PACKAGES package instance.
@param Handle A pointer to the EFI_HII_HANDLE instance.
@param Handle A pointer to the FRAMEWORK_EFI_HII_HANDLE instance.
@retval EFI_SUCCESS Data was extracted from Packages, the database
was updated with the data, and Handle returned successfully.
@@ -434,7 +306,7 @@ EFI_STATUS
(EFIAPI *EFI_HII_NEW_PACK) (
IN EFI_HII_PROTOCOL *This,
IN EFI_HII_PACKAGES *Packages,
OUT EFI_HII_HANDLE *Handle
OUT FRAMEWORK_EFI_HII_HANDLE *Handle
);
/**
@@ -453,7 +325,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_HII_REMOVE_PACK) (
IN EFI_HII_PROTOCOL *This,
IN EFI_HII_HANDLE Handle
IN FRAMEWORK_EFI_HII_HANDLE Handle
);
/**
@@ -463,7 +335,7 @@ EFI_STATUS
@param HandleBufferLength On input, a pointer to the length of the handle
buffer. On output, the length of the handle buffer that is required
for the handles found.
@param Handle An array of EFI_HII_HANDLE instances returned.
@param Handle An array of FRAMEWORK_EFI_HII_HANDLE instances returned.
@retval EFI_SUCCESS Handle was updated successfully.
@retval EFI_BUFFER_TOO_SMALL The HandleBufferLength parameter indicates
@@ -475,14 +347,14 @@ EFI_STATUS
(EFIAPI *EFI_HII_FIND_HANDLES) (
IN EFI_HII_PROTOCOL *This,
IN OUT UINT16 *HandleBufferLength,
OUT EFI_HII_HANDLE *Handle
OUT FRAMEWORK_EFI_HII_HANDLE *Handle
);
/**
Exports the contents of the database into a buffer.
@param This A pointer to the EFI_HII_PROTOCOL instance.
@param Handle An EFI_HII_HANDLE that corresponds to the desired
@param Handle An FRAMEWORK_EFI_HII_HANDLE that corresponds to the desired
handle to export. If the value is 0, the entire database will be exported.
In either case, the data will be exported in a format described by the
structure definition of EFI_HII_EXPORT_TABLE.
@@ -499,7 +371,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_HII_EXPORT) (
IN EFI_HII_PROTOCOL *This,
IN EFI_HII_HANDLE Handle,
IN FRAMEWORK_EFI_HII_HANDLE Handle,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer
);
@@ -519,7 +391,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_HII_RESET_STRINGS) (
IN EFI_HII_PROTOCOL *This,
IN EFI_HII_HANDLE Handle
IN FRAMEWORK_EFI_HII_HANDLE Handle
);
/**
@@ -637,7 +509,7 @@ EFI_STATUS
(EFIAPI *EFI_HII_NEW_STRING) (
IN EFI_HII_PROTOCOL *This,
IN CHAR16 *Language,
IN EFI_HII_HANDLE Handle,
IN FRAMEWORK_EFI_HII_HANDLE Handle,
IN OUT STRING_REF *Reference,
IN CHAR16 *NewString
);
@@ -659,7 +531,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_HII_GET_PRI_LANGUAGES) (
IN EFI_HII_PROTOCOL *This,
IN EFI_HII_HANDLE Handle,
IN FRAMEWORK_EFI_HII_HANDLE Handle,
OUT EFI_STRING *LanguageString
);
@@ -682,7 +554,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_HII_GET_SEC_LANGUAGES) (
IN EFI_HII_PROTOCOL *This,
IN EFI_HII_HANDLE Handle,
IN FRAMEWORK_EFI_HII_HANDLE Handle,
IN CHAR16 *PrimaryLanguage,
OUT EFI_STRING *LanguageString
);
@@ -714,7 +586,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_HII_GET_STRING) (
IN EFI_HII_PROTOCOL *This,
IN EFI_HII_HANDLE Handle,
IN FRAMEWORK_EFI_HII_HANDLE Handle,
IN STRING_REF Token,
IN BOOLEAN Raw,
IN CHAR16 *LanguageString,
@@ -748,7 +620,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_HII_GET_LINE) (
IN EFI_HII_PROTOCOL *This,
IN EFI_HII_HANDLE Handle,
IN FRAMEWORK_EFI_HII_HANDLE Handle,
IN STRING_REF Token,
IN OUT UINT16 *Index,
IN UINT16 LineWidth,
@@ -782,7 +654,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_HII_GET_FORMS) (
IN EFI_HII_PROTOCOL *This,
IN EFI_HII_HANDLE Handle,
IN FRAMEWORK_EFI_HII_HANDLE Handle,
IN EFI_FORM_ID FormId,
IN OUT UINTN *BufferLength,
OUT UINT8 *Buffer
@@ -809,7 +681,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_HII_GET_DEFAULT_IMAGE) (
IN EFI_HII_PROTOCOL *This,
IN EFI_HII_HANDLE Handle,
IN FRAMEWORK_EFI_HII_HANDLE Handle,
IN UINTN DefaultMask,
OUT EFI_HII_VARIABLE_PACK_LIST **VariablePackList
);
@@ -835,7 +707,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_HII_UPDATE_FORM) (
IN EFI_HII_PROTOCOL *This,
IN EFI_HII_HANDLE Handle,
IN FRAMEWORK_EFI_HII_HANDLE Handle,
IN EFI_FORM_LABEL Label,
IN BOOLEAN AddData,
IN EFI_HII_UPDATE_DATA *Data
@@ -847,7 +719,7 @@ EFI_STATUS
@param This A pointer to the EFI_HII_PROTOCOL instance.
@param DescriptorCount A pointer to the number of Descriptor entries being
described in the keyboard layout being retrieved.
@param Descriptor A pointer to a buffer containing an array of EFI_KEY_DESCRIPTOR
@param Descriptor A pointer to a buffer containing an array of FRAMEWORK_EFI_KEY_DESCRIPTOR
entries. Each entry will reflect the definition of a specific physical key.
@retval EFI_SUCCESS The keyboard layout was retrieved successfully.
@@ -858,7 +730,7 @@ EFI_STATUS
(EFIAPI *EFI_HII_GET_KEYBOARD_LAYOUT) (
IN EFI_HII_PROTOCOL *This,
OUT UINT16 *DescriptorCount,
OUT EFI_KEY_DESCRIPTOR *Descriptor
OUT FRAMEWORK_EFI_KEY_DESCRIPTOR *Descriptor
);
/**