]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SetupBrowserDxe/Ui.h
Keep the highlight field after user changes the value for time/date opcode
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Ui.h
index 362f8e7d6001e4c19c63988ea4bf031a54a238f0..0acec825cfebb60ca2c844b892623cdc583865b9 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Private structure, MACRO and function definitions for User Interface related functionalities.\r
 \r
-Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\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
@@ -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
@@ -176,6 +180,7 @@ struct _MENU_REFRESH_ENTRY {
   UINTN                       CurrentColumn;\r
   UINTN                       CurrentRow;\r
   UINTN                       CurrentAttribute;\r
+  EFI_EVENT                   Event;\r
 };\r
 \r
 typedef struct {\r
@@ -328,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
@@ -449,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
@@ -456,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