]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SetupBrowserDxe/Setup.h
Change the FormBrowser behavior of "Pressing ESC":
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Setup.h
index b4aef47567865ccc0134e41e643f0537e8098514..91b5aaee40e6334b8d281396ac2d25abd3aa984d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-Private MACRO, structure and function definitions for Setup Browser module. \r
+Private MACRO, structure and function definitions for Setup Browser module.\r
 \r
-Copyright (c) 2007, Intel Corporation\r
+Copyright (c) 2007 - 2009, 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
@@ -19,8 +19,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include <PiDxe.h>\r
 \r
-#include <Protocol/Print.h>\r
-#include <Protocol/Print2.h>\r
 #include <Protocol/SimpleTextOut.h>\r
 #include <Protocol/SimpleTextIn.h>\r
 #include <Protocol/FormBrowser2.h>\r
@@ -30,9 +28,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/HiiConfigRouting.h>\r
 #include <Protocol/HiiDatabase.h>\r
 #include <Protocol/HiiString.h>\r
-#include <Protocol/ConsoleControl.h>\r
 \r
-#include <MdeModuleHii.h>\r
+#include <Guid/MdeModuleHii.h>\r
+#include <Guid/HiiPlatformSetupFormset.h>\r
 \r
 #include <Library/PrintLib.h>\r
 #include <Library/DebugLib.h>\r
@@ -42,11 +40,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/BaseLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
-#include <Library/IfrSupportLib.h>\r
-#include <Library/ExtendedIfrSupportLib.h>\r
 #include <Library/HiiLib.h>\r
-#include <Library/ExtendedHiiLib.h>\r
 #include <Library/PcdLib.h>\r
+#include <Library/DevicePathLib.h>\r
 \r
 #include "Colors.h"\r
 \r
@@ -75,10 +71,9 @@ extern UINT8  SetupBrowserStrings[];
 // Definition for function key setting\r
 //\r
 #define NONE_FUNCTION_KEY_SETTING     0\r
-#define DEFAULT_FUNCTION_KEY_SETTING  (FUNCTION_ONE | FUNCTION_TWO | FUNCTION_NINE | FUNCTION_TEN)\r
+#define DEFAULT_FUNCTION_KEY_SETTING  (FUNCTION_ONE | FUNCTION_NINE | FUNCTION_TEN)\r
 \r
 #define FUNCTION_ONE                  (1 << 0)\r
-#define FUNCTION_TWO                  (1 << 1)\r
 #define FUNCTION_NINE                 (1 << 2)\r
 #define FUNCTION_TEN                  (1 << 3)\r
 \r
@@ -173,7 +168,6 @@ typedef struct {
   // Produced protocol\r
   //\r
   EFI_FORM_BROWSER2_PROTOCOL         FormBrowser2;\r
-  EFI_PRINT2_PROTOCOL                Print;\r
 \r
 } SETUP_DRIVER_PRIVATE_DATA;\r
 \r
@@ -199,6 +193,9 @@ typedef struct {
 #define FORM_INCONSISTENT_VALIDATION         0\r
 #define FORM_NO_SUBMIT_VALIDATION            1\r
 \r
+#define FORMSET_CLASS_PLATFORM_SETUP         0\r
+#define FORMSET_CLASS_FRONT_PAGE             1\r
+\r
 typedef struct {\r
   UINT8               Type;\r
   EFI_IFR_TYPE_VALUE  Value;\r
@@ -258,10 +255,10 @@ typedef struct {
 \r
   EFI_HII_VALUE     Value;       // For EFI_IFR_EQ_ID_VAL, EFI_IFR_UINT64, EFI_IFR_UINT32, EFI_IFR_UINT16, EFI_IFR_UINT8, EFI_IFR_STRING_REF1\r
 \r
-  EFI_QUESTION_ID   QuestionId;  // For EFI_IFR_EQ_ID_ID, EFI_IFR_EQ_ID_LIST, EFI_IFR_QUESTION_REF1\r
+  EFI_QUESTION_ID   QuestionId;  // For EFI_IFR_EQ_ID_ID, EFI_IFR_EQ_ID_VAL_LIST, EFI_IFR_QUESTION_REF1\r
   EFI_QUESTION_ID   QuestionId2;\r
 \r
-  UINT16            ListLength;  // For EFI_IFR_EQ_ID_LIST\r
+  UINT16            ListLength;  // For EFI_IFR_EQ_ID_VAL_LIST\r
   UINT16            *ValueList;\r
 \r
   EFI_STRING_ID     DevicePath;  // For EFI_IFR_QUESTION_REF3_2, EFI_IFR_QUESTION_REF3_3\r
@@ -385,6 +382,7 @@ typedef struct {
   LIST_ENTRY            NoSubmitListHead;    // nested nosubmit expression list (FORM_EXPRESSION)\r
   FORM_EXPRESSION       *GrayOutExpression;  // nesting inside of GrayOutIf\r
   FORM_EXPRESSION       *SuppressExpression; // nesting inside of SuppressIf\r
+  FORM_EXPRESSION       *DisableExpression;  // nesting inside of DisableIf\r
 \r
 } FORM_BROWSER_STATEMENT;\r
 \r
@@ -431,8 +429,10 @@ typedef struct {
   EFI_GUID                        Guid;\r
   EFI_STRING_ID                   FormSetTitle;\r
   EFI_STRING_ID                   Help;\r
-  UINT16                          Class;\r
-  UINT16                          SubClass;\r
+  UINT8                           NumberOfClassGuid;\r
+  EFI_GUID                        ClassGuid[3];         // Up to three ClassGuid\r
+  UINT16                          Class;                // Tiano extended Class code\r
+  UINT16                          SubClass;             // Tiano extended Subclass code\r
   EFI_IMAGE_ID                    ImageId;\r
 \r
   FORM_BROWSER_STATEMENT          *StatementBuffer;     // Buffer for all Statements and Questions\r
@@ -448,8 +448,8 @@ extern EFI_HII_DATABASE_PROTOCOL         *mHiiDatabase;
 extern EFI_HII_STRING_PROTOCOL           *mHiiString;\r
 extern EFI_HII_CONFIG_ROUTING_PROTOCOL   *mHiiConfigRouting;\r
 \r
-extern BANNER_DATA           *BannerData;\r
-extern EFI_HII_HANDLE        FrontPageHandle;\r
+extern BANNER_DATA           *gBannerData;\r
+extern EFI_HII_HANDLE        gFrontPageHandle;\r
 extern UINTN                 gClassOfVfr;\r
 extern UINTN                 gFunctionKeySetting;\r
 extern BOOLEAN               gResetRequired;\r
@@ -460,11 +460,12 @@ extern EFI_SCREEN_DESCRIPTOR gScreenDimensions;
 extern BOOLEAN               gUpArrow;\r
 extern BOOLEAN               gDownArrow;\r
 \r
+extern FORM_BROWSER_FORMSET  *gOldFormSet;\r
+\r
 //\r
 // Browser Global Strings\r
 //\r
 extern CHAR16            *gFunctionOneString;\r
-extern CHAR16            *gFunctionTwoString;\r
 extern CHAR16            *gFunctionNineString;\r
 extern CHAR16            *gFunctionTenString;\r
 extern CHAR16            *gEnterString;\r
@@ -891,6 +892,19 @@ LoadFormConfig (
   IN FORM_BROWSER_FORM                *Form\r
   );\r
 \r
+/**\r
+  Initialize Question's Edit copy from Storage for the whole Formset.\r
+\r
+  @param  FormSet                FormSet data structure.\r
+\r
+  @retval EFI_SUCCESS            The function completed successfully.\r
+\r
+**/\r
+EFI_STATUS\r
+LoadFormSetConfig (\r
+  IN FORM_BROWSER_FORMSET             *FormSet\r
+  );\r
+\r
 /**\r
   Convert setting of Buffer Storage or NameValue Storage to <ConfigResp>.\r
 \r
@@ -982,7 +996,7 @@ GetIfrBinaryData (
                          ScreenDimenions - This allows the browser to be called so that it occupies a\r
                          portion of the physical screen instead of dynamically determining the screen dimensions.\r
                          ActionRequest   - Points to the action recommended by the form.\r
-  @param ScreenDimensions Points to recommended form dimensions, including any non-content area, in \r
+  @param ScreenDimensions Points to recommended form dimensions, including any non-content area, in\r
                           characters.\r
   @param ActionRequest       Points to the action recommended by the form.\r
 \r