]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SetupBrowserDxe/Ui.h
Update HiiBlockToConfig function to follow spec.
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Ui.h
index bd75714f7fe4e5b52397fac44e31ceff16aaeb5d..cec7dcd0c1309bde238ea190d22b8cc62ac84689 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
 Private structure, MACRO and function definitions for User Interface related functionalities.\r
 \r
-Copyright (c) 2004 - 2009, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>\r
+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
 http://opensource.org/licenses/bsd-license.php\r
@@ -76,6 +76,8 @@ typedef enum {
 #define UI_ACTION_REFRESH_FORMSET    2\r
 #define UI_ACTION_EXIT               3\r
 \r
+typedef struct _UI_MENU_LIST UI_MENU_LIST;\r
+\r
 typedef struct {\r
   EFI_HII_HANDLE  Handle;\r
 \r
@@ -85,6 +87,7 @@ typedef struct {
   EFI_GUID        FormSetGuid;\r
   UINT16          FormId;\r
   UINT16          QuestionId;\r
+  UINTN           Sequence;  // used for time/date only.\r
 \r
   UINTN           TopRow;\r
   UINTN           BottomRow;\r
@@ -111,6 +114,8 @@ typedef struct {
   // Whether the Form is editable\r
   //\r
   BOOLEAN                 FormEditable;\r
+\r
+  UI_MENU_LIST            *CurrentMenu;\r
 } UI_MENU_SELECTION;\r
 \r
 #define UI_MENU_OPTION_SIGNATURE  SIGNATURE_32 ('u', 'i', 'm', 'm')\r
@@ -152,8 +157,6 @@ typedef struct {
 \r
 #define MENU_OPTION_FROM_LINK(a)  CR (a, UI_MENU_OPTION, Link, UI_MENU_OPTION_SIGNATURE)\r
 \r
-typedef struct _UI_MENU_LIST UI_MENU_LIST;\r
-\r
 struct _UI_MENU_LIST {\r
   UINTN           Signature;\r
   LIST_ENTRY      Link;\r
@@ -161,6 +164,7 @@ struct _UI_MENU_LIST {
   EFI_GUID        FormSetGuid;\r
   UINT16          FormId;\r
   UINT16          QuestionId;\r
+  UINTN           Sequence;    // used for time/date only.\r
 \r
   UI_MENU_LIST    *Parent;\r
   LIST_ENTRY      ChildListHead;\r
@@ -168,14 +172,16 @@ struct _UI_MENU_LIST {
 \r
 #define UI_MENU_LIST_FROM_LINK(a)  CR (a, UI_MENU_LIST, Link, UI_MENU_LIST_SIGNATURE)\r
 \r
-typedef struct _MENU_REFRESH_ENTRY {\r
-  struct _MENU_REFRESH_ENTRY  *Next;\r
+typedef struct _MENU_REFRESH_ENTRY MENU_REFRESH_ENTRY;\r
+struct _MENU_REFRESH_ENTRY {\r
+  MENU_REFRESH_ENTRY          *Next;\r
   UI_MENU_OPTION              *MenuOption;  // Describes the entry needing an update\r
   UI_MENU_SELECTION           *Selection;\r
   UINTN                       CurrentColumn;\r
   UINTN                       CurrentRow;\r
   UINTN                       CurrentAttribute;\r
-} MENU_REFRESH_ENTRY;\r
+  EFI_EVENT                   Event;\r
+};\r
 \r
 typedef struct {\r
   UINT16              ScanCode;\r
@@ -327,6 +333,26 @@ FreeBrowserStrings (
   VOID\r
   );\r
 \r
+/**\r
+  Process the goto op code, update the info in the selection structure.\r
+\r
+  @param Statement    The statement belong to goto op code.\r
+  @param Selection    The selection info.\r
+  @param Repaint      Whether need to repaint the menu.\r
+  @param NewLine      Whether need to create new line.\r
+\r
+  @retval EFI_SUCCESS    The menu process successfully.\r
+  @return Other value if the process failed.\r
+**/\r
+EFI_STATUS\r
+ProcessGotoOpCode (\r
+  IN OUT   FORM_BROWSER_STATEMENT      *Statement,\r
+  IN OUT   UI_MENU_SELECTION           *Selection,\r
+  OUT      BOOLEAN                     *Repaint,\r
+  OUT      BOOLEAN                     *NewLine\r
+  );\r
+\r
+\r
 /**\r
   The worker function that send the displays to the screen. On output,\r
   the selection made by user is returned.\r
@@ -388,6 +414,7 @@ UiWaitForSingleEvent (
 \r
 **/\r
 VOID\r
+EFIAPI\r
 CreateMultiStringPopUp (\r
   IN  UINTN                       ScreenWidth,\r
   IN  UINTN                       NumberOfLines,\r
@@ -399,7 +426,7 @@ CreateMultiStringPopUp (
 \r
   @param  MenuOption        Pointer to the current input menu.\r
   @param  Prompt            The prompt string shown on popup window.\r
-  @param  StringPtr         Destination for use input string.\r
+  @param  StringPtr         Old user input and destination for use input string.\r
 \r
   @retval EFI_SUCCESS       If string input is read successfully\r
   @retval EFI_DEVICE_ERROR  If operation fails\r
@@ -407,9 +434,9 @@ CreateMultiStringPopUp (
 **/\r
 EFI_STATUS\r
 ReadString (\r
-  IN  UI_MENU_OPTION              *MenuOption,\r
-  IN  CHAR16                      *Prompt,\r
-  OUT CHAR16                      *StringPtr\r
+  IN     UI_MENU_OPTION              *MenuOption,\r
+  IN     CHAR16                      *Prompt,\r
+  IN OUT CHAR16                      *StringPtr\r
   );\r
 \r
 /**\r
@@ -447,6 +474,7 @@ GetNumericInput (
 /**\r
   Update status bar on the bottom of menu.\r
 \r
+  @param  Selection              Current selection info.\r
   @param  MessageType            The type of message to be shown.\r
   @param  Flags                  The flags in Question header.\r
   @param  State                  Set or clear.\r
@@ -454,6 +482,7 @@ GetNumericInput (
 **/\r
 VOID\r
 UpdateStatusBar (\r
+  IN  UI_MENU_SELECTION           *Selection,\r
   IN  UINTN                       MessageType,\r
   IN  UINT8                       Flags,\r
   IN  BOOLEAN                     State\r
@@ -622,6 +651,8 @@ ClearLines (
   hit, then 2 Unicode character will consume an output storage\r
   space with size of CHAR16 till a NARROW_CHAR is hit.\r
 \r
+  If String is NULL, then ASSERT ().\r
+\r
   @param String          The input string to be counted.\r
 \r
   @return Storage space for the input string.\r
@@ -734,6 +765,80 @@ PopScope (
   OUT UINT8     *Operand\r
   );\r
 \r
+/**\r
+  Reset stack pointer to begin of the stack.\r
+\r
+**/\r
+VOID\r
+ResetCurrentExpressionStack (\r
+  VOID\r
+  );\r
+\r
+/**\r
+  Push current expression onto the Stack\r
+\r
+  @param  Pointer                Pointer to current expression.\r
+\r
+  @retval EFI_SUCCESS            The value was pushed onto the stack.\r
+  @retval EFI_OUT_OF_RESOURCES   There is not enough system memory to grow the stack.\r
+\r
+**/\r
+EFI_STATUS\r
+PushCurrentExpression (\r
+  IN VOID  *Pointer\r
+  );\r
+\r
+/**\r
+  Pop current expression from the Stack\r
+\r
+  @param  Pointer                Pointer to current expression to be pop.\r
+\r
+  @retval EFI_SUCCESS            The value was pushed onto the stack.\r
+  @retval EFI_OUT_OF_RESOURCES   There is not enough system memory to grow the stack.\r
+\r
+**/\r
+EFI_STATUS\r
+PopCurrentExpression (\r
+  OUT VOID    **Pointer\r
+  );\r
+\r
+/**\r
+  Reset stack pointer to begin of the stack.\r
+\r
+**/\r
+VOID\r
+ResetMapExpressionListStack (\r
+  VOID\r
+  );\r
+\r
+/**\r
+  Push the list of map expression onto the Stack\r
+\r
+  @param  Pointer                Pointer to the list of map expression to be pushed.\r
+\r
+  @retval EFI_SUCCESS            The value was pushed onto the stack.\r
+  @retval EFI_OUT_OF_RESOURCES   There is not enough system memory to grow the stack.\r
+\r
+**/\r
+EFI_STATUS\r
+PushMapExpressionList (\r
+  IN VOID  *Pointer\r
+  );\r
+\r
+/**\r
+  Pop the list of map expression from the Stack\r
+\r
+  @param  Pointer                Pointer to the list of map expression to be pop.\r
+\r
+  @retval EFI_SUCCESS            The value was pushed onto the stack.\r
+  @retval EFI_OUT_OF_RESOURCES   There is not enough system memory to grow the stack.\r
+\r
+**/\r
+EFI_STATUS\r
+PopMapExpressionList (\r
+  OUT VOID    **Pointer\r
+  );\r
+\r
 /**\r
   Get Form given its FormId.\r
 \r