]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SetupBrowserDxe/Ui.h
K8:
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Ui.h
index 6e6b8975c17bcd2af65c4762e84c19df9f35262e..7031c3973b23e8f6a3806f2dd3e789f0f0a65003 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Private structure, MACRO and function definitions for User Interface related functionalities.\r
 \r
-Copyright (c) 2004 - 2007, Intel Corporation\r
+Copyright (c) 2004 - 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
@@ -26,6 +26,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #define SUBTITLE_INDENT  2\r
 \r
+\r
+//\r
+// It take 23 characters including the NULL to print a 64 bits number with "[" and "]".\r
+// pow(2, 64) = [18446744073709551616]\r
+//\r
+#define MAX_NUMERIC_INPUT_WIDTH 23\r
+\r
 typedef enum {\r
   UiNoOperation,\r
   UiDefault,\r
@@ -104,8 +111,8 @@ typedef struct {
   FORM_BROWSER_STATEMENT  *Statement;\r
 } UI_MENU_SELECTION;\r
 \r
-#define UI_MENU_OPTION_SIGNATURE  EFI_SIGNATURE_32 ('u', 'i', 'm', 'm')\r
-#define UI_MENU_LIST_SIGNATURE    EFI_SIGNATURE_32 ('u', 'i', 'm', 'l')\r
+#define UI_MENU_OPTION_SIGNATURE  SIGNATURE_32 ('u', 'i', 'm', 'm')\r
+#define UI_MENU_LIST_SIGNATURE    SIGNATURE_32 ('u', 'i', 'm', 'l')\r
 \r
 typedef struct {\r
   UINTN                   Signature;\r
@@ -169,6 +176,7 @@ typedef struct {
 extern LIST_ENTRY          gMenuList;\r
 extern MENU_REFRESH_ENTRY  *gMenuRefreshHead;\r
 extern UI_MENU_SELECTION   *gCurrentSelection;\r
+extern BOOLEAN             mHiiPackageListUpdated;\r
 \r
 //\r
 // Global Functions\r
@@ -180,8 +188,7 @@ extern UI_MENU_SELECTION   *gCurrentSelection;
 VOID\r
 UiInitMenu (\r
   VOID\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Initialize Menu option list.\r
@@ -190,8 +197,7 @@ UiInitMenu (
 VOID\r
 UiInitMenuList (\r
   VOID\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Remove a Menu in list, and return FormId/QuestionId for previous Menu.\r
@@ -202,8 +208,7 @@ UiInitMenuList (
 VOID\r
 UiRemoveMenuListEntry (\r
   OUT UI_MENU_SELECTION  *Selection\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Free Menu option linked list.\r
@@ -212,8 +217,7 @@ UiRemoveMenuListEntry (
 VOID\r
 UiFreeMenuList (\r
   VOID\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Add one menu entry to the linked lst\r
@@ -224,8 +228,7 @@ UiFreeMenuList (
 VOID\r
 UiAddMenuListEntry (\r
   IN UI_MENU_SELECTION            *Selection\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Free Menu option linked list.\r
@@ -234,8 +237,7 @@ UiAddMenuListEntry (
 VOID\r
 UiFreeMenu (\r
   VOID\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Add one menu option by specified description and context.\r
@@ -254,8 +256,7 @@ UiAddMenuOption (
   IN FORM_BROWSER_STATEMENT  *Statement,\r
   IN UINT16                  NumberOfLines,\r
   IN UINT16                  MenuItemCount\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Display menu and wait for user to select one menu option, then return it.\r
@@ -271,8 +272,7 @@ UiAddMenuOption (
 EFI_STATUS\r
 UiDisplayMenu (\r
   IN OUT UI_MENU_SELECTION           *Selection\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Free up the resource allocated for all strings required\r
@@ -282,8 +282,7 @@ UiDisplayMenu (
 VOID\r
 FreeBrowserStrings (\r
   VOID\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   The worker function that send the displays to the screen. On output,\r
@@ -301,8 +300,7 @@ FreeBrowserStrings (
 EFI_STATUS\r
 SetupBrowser (\r
   IN OUT UI_MENU_SELECTION    *Selection\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   VSPrint worker function that prints a Value as a decimal number in Buffer.\r
@@ -320,8 +318,7 @@ ValueToString (
   IN CHAR16   *Buffer,\r
   IN BOOLEAN  Flags,\r
   IN INT64    Value\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Set Buffer to Value for Size bytes.\r
@@ -336,8 +333,7 @@ SetUnicodeMem (
   IN VOID   *Buffer,\r
   IN UINTN  Size,\r
   IN CHAR16 Value\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Wait for a given event to fire, or for an optional timeout to expire.\r
@@ -355,16 +351,14 @@ UiWaitForSingleEvent (
   IN EFI_EVENT                Event,\r
   IN UINT64                   Timeout, OPTIONAL\r
   IN UINT8                    RefreshInterval OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Draw a pop up windows based on the dimension, number of lines and\r
   strings specified.\r
 \r
-  @param RequestedWidth  The width of the pop-up.\r
+  @param ScreenWidth     The width of the pop-up.\r
   @param NumberOfLines   The number of lines.\r
-  @param ArrayOfStrings  The array of string to be printed.\r
   @param ...             A series of text strings that displayed in the pop-up.\r
 \r
 **/\r
@@ -372,10 +366,8 @@ VOID
 CreatePopUp (\r
   IN  UINTN                       ScreenWidth,\r
   IN  UINTN                       NumberOfLines,\r
-  IN  CHAR16                      *ArrayOfStrings,\r
   ...\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Get string or password input from user.\r
@@ -393,8 +385,7 @@ ReadString (
   IN  UI_MENU_OPTION              *MenuOption,\r
   IN  CHAR16                      *Prompt,\r
   OUT CHAR16                      *StringPtr\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Get selection for OneOf and OrderedList (Left/Right will be ignored).\r
@@ -410,8 +401,7 @@ EFI_STATUS
 GetSelectionInputPopUp (\r
   IN  UI_MENU_SELECTION           *Selection,\r
   IN  UI_MENU_OPTION              *MenuOption\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   This routine reads a numeric value from the user input.\r
@@ -427,8 +417,7 @@ EFI_STATUS
 GetNumericInput (\r
   IN  UI_MENU_SELECTION           *Selection,\r
   IN  UI_MENU_OPTION              *MenuOption\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Update status bar on the bottom of menu.\r
@@ -443,8 +432,7 @@ UpdateStatusBar (
   IN  UINTN                       MessageType,\r
   IN  UINT8                       Flags,\r
   IN  BOOLEAN                     State\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Process Question Config.\r
@@ -460,8 +448,7 @@ EFI_STATUS
 ProcessQuestionConfig (\r
   IN  UI_MENU_SELECTION       *Selection,\r
   IN  FORM_BROWSER_STATEMENT  *Question\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Print Question Value according to it's storage width and display attributes.\r
@@ -479,8 +466,7 @@ PrintFormattedNumber (
   IN FORM_BROWSER_STATEMENT   *Question,\r
   IN OUT CHAR16               *FormattedNumber,\r
   IN UINTN                    BufferSize\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Search an Option of a Question by its value.\r
@@ -496,8 +482,7 @@ QUESTION_OPTION *
 ValueToOption (\r
   IN FORM_BROWSER_STATEMENT   *Question,\r
   IN EFI_HII_VALUE            *OptionValue\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Process a Question's Option (whether selected or un-selected).\r
@@ -517,8 +502,7 @@ ProcessOptions (
   IN  UI_MENU_OPTION              *MenuOption,\r
   IN  BOOLEAN                     Selected,\r
   OUT CHAR16                      **OptionString\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Process the help string: Split StringPtr to several lines of strings stored in\r
@@ -534,8 +518,7 @@ ProcessHelpString (
   IN  CHAR16                      *StringPtr,\r
   OUT CHAR16                      **FormattedString,\r
   IN  UINTN                       RowCount\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Update key's help imformation.\r
@@ -548,8 +531,7 @@ VOID
 UpdateKeyHelp (\r
   IN  UI_MENU_OPTION              *MenuOption,\r
   IN  BOOLEAN                     Selected\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Clear retangle with specified text attribute.\r
@@ -568,8 +550,7 @@ ClearLines (
   UINTN                                       TopRow,\r
   UINTN                                       BottomRow,\r
   UINTN                                       TextAttribute\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Count the storage space of a Unicode string.\r
@@ -588,8 +569,7 @@ ClearLines (
 UINTN\r
 GetStringWidth (\r
   CHAR16                                      *String\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Will copy LineWidth amount of a string in the OutputString buffer and return the\r
@@ -610,8 +590,7 @@ GetLineByWidth (
   IN      UINT16                      LineWidth,\r
   IN OUT  UINTN                       *Index,\r
   OUT     CHAR16                      **OutputString\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Get the supported width for a particular op-code\r
@@ -626,8 +605,7 @@ UINT16
 GetWidth (\r
   IN FORM_BROWSER_STATEMENT        *Statement,\r
   IN EFI_HII_HANDLE                 Handle\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Concatenate a narrow string to another string.\r
@@ -641,8 +619,7 @@ VOID
 NewStrCat (\r
   CHAR16                                      *Destination,\r
   CHAR16                                      *Source\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Wait for a key to be pressed by user.\r
@@ -655,8 +632,7 @@ NewStrCat (
 EFI_STATUS\r
 WaitForKeyStroke (\r
   OUT  EFI_INPUT_KEY           *Key\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Reset stack pointer to begin of the stack.\r
@@ -665,8 +641,7 @@ WaitForKeyStroke (
 VOID\r
 ResetScopeStack (\r
   VOID\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Push an Operand onto the Stack\r
@@ -681,8 +656,7 @@ ResetScopeStack (
 EFI_STATUS\r
 PushScope (\r
   IN UINT8   Operand\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Pop an Operand from the Stack\r
@@ -697,8 +671,7 @@ PushScope (
 EFI_STATUS\r
 PopScope (\r
   OUT UINT8     *Operand\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Get Form given its FormId.\r
@@ -714,8 +687,7 @@ FORM_BROWSER_FORM *
 IdToForm (\r
   IN FORM_BROWSER_FORMSET  *FormSet,\r
   IN UINT16                FormId\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Search a Question in Formset scope using its QuestionId.\r
@@ -733,8 +705,7 @@ IdToQuestion (
   IN FORM_BROWSER_FORMSET  *FormSet,\r
   IN FORM_BROWSER_FORM     *Form,\r
   IN UINT16                QuestionId\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Zero extend integer/boolean/date/time to UINT64 for comparing.\r
@@ -745,8 +716,7 @@ IdToQuestion (
 VOID\r
 ExtendValueToU64 (\r
   IN  EFI_HII_VALUE   *Value\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Compare two Hii value.\r
@@ -766,8 +736,7 @@ CompareHiiValue (
   IN  EFI_HII_VALUE   *Value1,\r
   IN  EFI_HII_VALUE   *Value2,\r
   IN  EFI_HII_HANDLE  HiiHandle OPTIONAL\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
   Evaluate the result of a HII expression\r
@@ -790,7 +759,6 @@ EvaluateExpression (
   IN FORM_BROWSER_FORMSET  *FormSet,\r
   IN FORM_BROWSER_FORM     *Form,\r
   IN OUT FORM_EXPRESSION   *Expression\r
-  )\r
-;\r
+  );\r
 \r
 #endif // _UI_H\r