]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkPkg/Include/Protocol/FrameworkHii.h
Remove structure declaration for EFI_UGA_PIXEL.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / FrameworkHii.h
index 0caf7adfcfc912e8e705721ca4df8d8a05ffdbe1..f5169ef9c4fa6bb9b50060691cd591b6e79680fd 100644 (file)
@@ -3,7 +3,7 @@
   be used by resources which want to publish IFR/Font/String data and have it\r
   collected by the Configuration engine.\r
 \r
-  Copyright (c) 2007, Intel Corporation\r
+  Copyright (c) 2007 - 2008, Intel Corporation\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 //\r
 #include <Protocol/GraphicsOutput.h>\r
 \r
+//\r
+// In both EDK and EDK II, incompatbile change is done to Framework HII protocol. \r
+// This change should cause a change of GUID in both of code and HII spec. But we \r
+// update the GUID in code in EDK and EDK II. The 0.92 spec is not updated. This\r
+// is a known issue..\r
+//\r
 #define EFI_HII_PROTOCOL_GUID \\r
   { \\r
     0xd7ad636e, 0xb997, 0x459b, {0xbf, 0x3f, 0x88, 0x46, 0x89, 0x79, 0x80, 0xe1} \\r
   }\r
 \r
-// BugBug:\r
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r
-// If UGA goes away we need to put this some place. I'm not sure where?\r
-//\r
-//typedef struct {\r
-//  UINT8 Blue;\r
-//  UINT8 Green;\r
-//  UINT8 Red;\r
-//  UINT8 Reserved;\r
-//} EFI_UGA_PIXEL;\r
+#define EFI_HII_COMPATIBILITY_PROTOCOL_GUID \\r
+  { \\r
+    0x5542cce1, 0xdf5c, 0x4d1b, { 0xab, 0xca, 0x36, 0x4f, 0x77, 0xd3, 0x99, 0xfb } \\r
+  }\r
 \r
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r
-//\r
+\r
+typedef UINT16                    STRING_REF;\r
+typedef UINT32                    RELOFST;\r
 \r
 typedef struct _EFI_HII_PROTOCOL  EFI_HII_PROTOCOL;\r
 \r
@@ -78,12 +79,15 @@ typedef UINT16                    FRAMEWORK_EFI_HII_HANDLE;
 \r
 //\r
 // The following types are currently defined:\r
-// EFI_FROM_ID has been defined in UEFI spec.\r
+// EFI_FORM_ID has been defined in UEFI spec.\r
 //\r
 typedef UINT16  EFI_FORM_LABEL;\r
 \r
 #pragma pack(1)\r
 \r
+//\r
+// The header found at the start of each package.\r
+//\r
 typedef struct {\r
   UINT32  Length;\r
   UINT16  Type;\r
@@ -171,7 +175,6 @@ typedef struct {
   //\r
 } EFI_HII_EXPORT_TABLE;\r
 \r
-#define EFI_HII_UPDATE_DATA FRAMEWORK_EFI_HII_UPDATE_DATA \r
 typedef struct {\r
   BOOLEAN               FormSetUpdate;      // If TRUE, next variable is significant\r
   EFI_PHYSICAL_ADDRESS  FormCallbackHandle; // If not 0, will update Formset with this info\r
@@ -180,7 +183,7 @@ typedef struct {
   STRING_REF            FormTitle;          // If not 0, will update Form with this info\r
   UINT16                DataCount;          // The number of Data entries in this structure\r
   UINT8                 *Data;              // An array of 1+ op-codes, specified by DataCount\r
-} EFI_HII_UPDATE_DATA;\r
+} FRAMEWORK_EFI_HII_UPDATE_DATA;\r
 \r
 //\r
 // String attributes\r
@@ -295,7 +298,7 @@ typedef struct _EFI_HII_VARIABLE_PACK_LIST {
 \r
   @param  This                  A pointer to the EFI_HII_PROTOCOL instance.\r
   @param  Packages              A pointer to an EFI_HII_PACKAGES package instance.\r
-  @param  Handle                A pointer to the FRAMEWORK_EFI_HII_HANDLE  instance.\r
+  @param  Handle                A pointer to the FRAMEWORK_EFI_HII_HANDLE instance.\r
 \r
   @retval EFI_SUCCESS           Data was extracted from Packages, the database\r
                                 was updated with the data, and Handle returned successfully.\r
@@ -304,7 +307,7 @@ typedef struct _EFI_HII_VARIABLE_PACK_LIST {
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *FRAMEWORK_EFI_HII_NEW_PACK) (\r
+(EFIAPI *FRAMEWORK_EFI_HII_NEW_PACK)(\r
   IN  EFI_HII_PROTOCOL    *This,\r
   IN  EFI_HII_PACKAGES    *Packages,\r
   OUT FRAMEWORK_EFI_HII_HANDLE       *Handle\r
@@ -324,7 +327,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *FRAMEWORK_EFI_HII_REMOVE_PACK) (\r
+(EFIAPI *FRAMEWORK_EFI_HII_REMOVE_PACK)(\r
   IN EFI_HII_PROTOCOL    *This,\r
   IN FRAMEWORK_EFI_HII_HANDLE       Handle\r
   );\r
@@ -345,7 +348,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *FRAMEWORK_EFI_HII_FIND_HANDLES) (\r
+(EFIAPI *FRAMEWORK_EFI_HII_FIND_HANDLES)(\r
   IN     EFI_HII_PROTOCOL *This,\r
   IN OUT UINT16           *HandleBufferLength,\r
   OUT    FRAMEWORK_EFI_HII_HANDLE    *Handle\r
@@ -370,7 +373,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *FRAMEWORK_EFI_HII_EXPORT) (\r
+(EFIAPI *FRAMEWORK_EFI_HII_EXPORT)(\r
   IN     EFI_HII_PROTOCOL *This,\r
   IN     FRAMEWORK_EFI_HII_HANDLE    Handle,\r
   IN OUT UINTN            *BufferSize,\r
@@ -390,7 +393,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *FRAMEWORK_EFI_HII_RESET_STRINGS) (\r
+(EFIAPI *FRAMEWORK_EFI_HII_RESET_STRINGS)(\r
   IN     EFI_HII_PROTOCOL   *This,\r
   IN     FRAMEWORK_EFI_HII_HANDLE      Handle\r
   );\r
@@ -446,7 +449,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *FRAMEWORK_EFI_HII_GET_GLYPH) (\r
+(EFIAPI *FRAMEWORK_EFI_HII_GET_GLYPH)(\r
   IN     EFI_HII_PROTOCOL  *This,\r
   IN     CHAR16            *Source,\r
   IN OUT UINT16            *Index,\r
@@ -473,11 +476,13 @@ EFI_STATUS
 \r
   @retval EFI_SUCCESS           It worked.\r
   @retval EFI_NOT_FOUND         A glyph for a character was not found.\r
-\r
+  @note: Inconsistent with specification here:\r
+         In Framework Spec,HII spec 0.92. The type of 3rd, 4th and 8th parameter is EFI_UGA_PIXEL.\r
+         Here the definition use the EFI_GRAPHICS_OUTPUT_BLT_PIXEL which defined in UEFI2.1 spec\r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *FRAMEWORK_EFI_HII_GLYPH_TO_BLT) (\r
+(EFIAPI *FRAMEWORK_EFI_HII_GLYPH_TO_BLT)(\r
   IN     EFI_HII_PROTOCOL             *This,\r
   IN     UINT8                        *GlyphBuffer,\r
   IN     EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground,\r
@@ -507,7 +512,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *FRAMEWORK_EFI_HII_NEW_STRING) (\r
+(EFIAPI *FRAMEWORK_EFI_HII_NEW_STRING)(\r
   IN     EFI_HII_PROTOCOL      *This,\r
   IN     CHAR16                *Language,\r
   IN     FRAMEWORK_EFI_HII_HANDLE         Handle,\r
@@ -530,7 +535,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *FRAMEWORK_EFI_HII_GET_PRI_LANGUAGES) (\r
+(EFIAPI *FRAMEWORK_EFI_HII_GET_PRI_LANGUAGES)(\r
   IN  EFI_HII_PROTOCOL    *This,\r
   IN  FRAMEWORK_EFI_HII_HANDLE       Handle,\r
   OUT EFI_STRING          *LanguageString\r
@@ -553,7 +558,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *FRAMEWORK_EFI_HII_GET_SEC_LANGUAGES) (\r
+(EFIAPI *FRAMEWORK_EFI_HII_GET_SEC_LANGUAGES)(\r
   IN  EFI_HII_PROTOCOL    *This,\r
   IN  FRAMEWORK_EFI_HII_HANDLE       Handle,\r
   IN  CHAR16              *PrimaryLanguage,\r
@@ -585,7 +590,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *FRAMEWORK_EFI_HII_GET_STRING) (\r
+(EFIAPI *FRAMEWORK_EFI_HII_GET_STRING)(\r
   IN     EFI_HII_PROTOCOL  *This,\r
   IN     FRAMEWORK_EFI_HII_HANDLE     Handle,\r
   IN     STRING_REF        Token,\r
@@ -619,7 +624,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *FRAMEWORK_EFI_HII_GET_LINE) (\r
+(EFIAPI *FRAMEWORK_EFI_HII_GET_LINE)(\r
   IN     EFI_HII_PROTOCOL  *This,\r
   IN     FRAMEWORK_EFI_HII_HANDLE     Handle,\r
   IN     STRING_REF        Token,\r
@@ -653,7 +658,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *FRAMEWORK_EFI_HII_GET_FORMS) (\r
+(EFIAPI *FRAMEWORK_EFI_HII_GET_FORMS)(\r
   IN     EFI_HII_PROTOCOL  *This,\r
   IN     FRAMEWORK_EFI_HII_HANDLE     Handle,\r
   IN     EFI_FORM_ID       FormId,\r
@@ -680,7 +685,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *FRAMEWORK_EFI_HII_GET_DEFAULT_IMAGE) (\r
+(EFIAPI *FRAMEWORK_EFI_HII_GET_DEFAULT_IMAGE)(\r
   IN     EFI_HII_PROTOCOL           *This,\r
   IN     FRAMEWORK_EFI_HII_HANDLE   Handle,\r
   IN     UINTN                      DefaultMask,\r
@@ -706,12 +711,12 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *FRAMEWORK_EFI_HII_UPDATE_FORM) (\r
+(EFIAPI *FRAMEWORK_EFI_HII_UPDATE_FORM)(\r
   IN EFI_HII_PROTOCOL     *This,\r
   IN FRAMEWORK_EFI_HII_HANDLE        Handle,\r
   IN EFI_FORM_LABEL       Label,\r
   IN BOOLEAN              AddData,\r
-  IN EFI_HII_UPDATE_DATA  *Data\r
+  IN FRAMEWORK_EFI_HII_UPDATE_DATA  *Data\r
   );\r
 \r
 /**\r
@@ -728,97 +733,110 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *FRAMEWORK_EFI_HII_GET_KEYBOARD_LAYOUT) (\r
+(EFIAPI *FRAMEWORK_EFI_HII_GET_KEYBOARD_LAYOUT)(\r
   IN     EFI_HII_PROTOCOL    *This,\r
   OUT    UINT16              *DescriptorCount,\r
   OUT    FRAMEWORK_EFI_KEY_DESCRIPTOR  *Descriptor\r
   );\r
 \r
 /**\r
-  @par Protocol Description:\r
   The HII Protocol manages the HII database, which is a repository for data\r
   having to do with fonts, strings, forms, keyboards, and other future human\r
   interface items.\r
-\r
-  @param NewPack\r
-  Extracts the various packs from a package list.\r
-\r
-  @param RemovePack\r
-  Removes a package from the HII database.\r
-\r
-  @param FindHandles\r
-  Determines the handles that are currently active in the database.\r
-\r
-  @param ExportDatabase\r
-  Export the entire contents of the database to a buffer.\r
-\r
-  @param TestString\r
-  Tests if all of the characters in a string have corresponding font characters.\r
-\r
-  @param GetGlyph\r
-  Translates a Unicode character into the corresponding font glyph.\r
-\r
-  @param GlyphToBlt\r
-  Converts a glyph value into a format that is ready for a UGA BLT command.\r
-\r
-  @param NewString\r
-  Allows a new string to be added to an already existing string package.\r
-\r
-  @param GetPrimaryLanguages\r
-  Allows a program to determine the primary languages that are supported\r
-  on a given handle.\r
-\r
-  @param GetSecondaryLanguages\r
-  Allows a program to determine which secondary languages are supported\r
-  on a given handle for a given primary language.\r
-\r
-  @param GetString\r
-  Extracts a string from a package that is already registered with the\r
-  EFI HII database.\r
-\r
-  @param ResetString\r
-  Remove any new strings that were added after the initial string export\r
-  for this handle.\r
-\r
-  @param GetLine\r
-  Allows a program to extract a part of a string of not more than a given width.\r
-\r
-  @param GetForms\r
-  Allows a program to extract a form or form package that has been previously registered.\r
-\r
-  @param GetDefaultImage\r
-  Allows a program to extract the nonvolatile image that represents the default storage image.\r
-\r
-  @param UpdateForm\r
-  Allows a program to update a previously registered form.\r
-\r
-  @param GetKeyboardLayout\r
-  Allows a program to extract the current keyboard layout.\r
-\r
 **/\r
 struct _EFI_HII_PROTOCOL {\r
+  ///\r
+  /// Extracts the various packs from a package list.\r
+  ///\r
   FRAMEWORK_EFI_HII_NEW_PACK            NewPack;\r
+  \r
+  ///\r
+  /// Removes a package from the HII database.\r
+  ///\r
   FRAMEWORK_EFI_HII_REMOVE_PACK         RemovePack;\r
+  \r
+  ///\r
+  /// Determines the handles that are currently active in the database.\r
+  /// \r
   FRAMEWORK_EFI_HII_FIND_HANDLES        FindHandles;\r
+  \r
+  ///\r
+  /// Export the entire contents of the database to a buffer.\r
+  ///\r
   FRAMEWORK_EFI_HII_EXPORT              ExportDatabase;\r
 \r
+  ///\r
+  /// Tests if all of the characters in a string have corresponding font characters.\r
+  ///\r
   FRAMEWORK_EFI_HII_TEST_STRING         TestString;\r
+  \r
+  ///\r
+  /// Translates a Unicode character into the corresponding font glyph.\r
+  ///\r
   FRAMEWORK_EFI_HII_GET_GLYPH           GetGlyph;\r
+  \r
+  ///\r
+  /// Converts a glyph value into a format that is ready for a UGA BLT command.\r
+  ///\r
   FRAMEWORK_EFI_HII_GLYPH_TO_BLT        GlyphToBlt;\r
 \r
+  ///\r
+  /// Allows a new string to be added to an already existing string package.\r
+  ///\r
   FRAMEWORK_EFI_HII_NEW_STRING          NewString;\r
+  \r
+  ///\r
+  /// Allows a program to determine the primary languages that are supported\r
+  /// on a given handle.  \r
+  ///\r
   FRAMEWORK_EFI_HII_GET_PRI_LANGUAGES   GetPrimaryLanguages;\r
+  \r
+  ///\r
+  /// Allows a program to determine which secondary languages are supported\r
+  /// on a given handle for a given primary language.  \r
+  ///\r
   FRAMEWORK_EFI_HII_GET_SEC_LANGUAGES   GetSecondaryLanguages;\r
+  \r
+  ///\r
+  /// Extracts a string from a package that is already registered with the\r
+  /// EFI HII database.  \r
+  ///\r
   FRAMEWORK_EFI_HII_GET_STRING          GetString;\r
+  \r
+  ///\r
+  /// Remove any new strings that were added after the initial string export\r
+  /// for this handle.  \r
+  ///\r
   FRAMEWORK_EFI_HII_RESET_STRINGS       ResetStrings;\r
+  \r
+  ///\r
+  /// Allows a program to extract a part of a string of not more than a given width.\r
+  ///\r
   FRAMEWORK_EFI_HII_GET_LINE            GetLine;\r
+  \r
+  ///\r
+  /// Allows a program to extract a form or form package that has been previously registered.\r
+  ///\r
   FRAMEWORK_EFI_HII_GET_FORMS           GetForms;\r
+  \r
+  ///\r
+  /// Allows a program to extract the nonvolatile image that represents the default storage image.\r
+  ///\r
   FRAMEWORK_EFI_HII_GET_DEFAULT_IMAGE   GetDefaultImage;\r
+  \r
+  ///\r
+  /// Allows a program to update a previously registered form.\r
+  ///\r
   FRAMEWORK_EFI_HII_UPDATE_FORM         UpdateForm;\r
 \r
+  ///\r
+  /// Allows a program to extract the current keyboard layout.\r
+  ///\r
   FRAMEWORK_EFI_HII_GET_KEYBOARD_LAYOUT GetKeyboardLayout;\r
 };\r
 \r
 extern EFI_GUID gEfiHiiProtocolGuid;\r
+extern EFI_GUID gEfiHiiCompatibilityProtocolGuid;\r
+\r
 \r
 #endif\r