]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h
MdeModulePkg:Fix the potential memory leak issue in Display Engine
[mirror_edk2.git] / MdeModulePkg / Universal / DisplayEngineDxe / FormDisplay.h
index f369877386ff235a115059fd17367136a8ed7c51..063e94c6bc4d45139ca508fac6e7b1c4cb004c59 100644 (file)
@@ -63,6 +63,7 @@ extern CHAR16            gPromptBlockWidth;
 extern CHAR16            gOptionBlockWidth;\r
 extern CHAR16            gHelpBlockWidth;\r
 extern CHAR16            *mUnknownString;\r
+extern BOOLEAN           gMisMatch;\r
 \r
 //\r
 // Screen definitions\r
@@ -112,8 +113,9 @@ extern CHAR16            *mUnknownString;
 //\r
 // It take 23 characters including the NULL to print a 64 bits number with "[" and "]".\r
 // pow(2, 64) = [18446744073709551616]\r
+// with extra '-' flat, set the width to 24.\r
 //\r
-#define MAX_NUMERIC_INPUT_WIDTH 23\r
+#define MAX_NUMERIC_INPUT_WIDTH 24\r
 \r
 #define EFI_HII_EXPRESSION_INCONSISTENT_IF   0\r
 #define EFI_HII_EXPRESSION_NO_SUBMIT_IF      1\r
@@ -196,9 +198,31 @@ typedef struct {
 \r
 typedef struct {\r
   EFI_HII_HANDLE     HiiHandle;\r
-  EFI_QUESTION_ID    QuestionId;\r
-  EFI_IFR_OP_HEADER  *OpCode;\r
-  UINT16             DisplayRow;\r
+  UINT16             FormId;\r
+  \r
+  //\r
+  // Info for the highlight question.\r
+  // HLT means highlight\r
+  //\r
+  // If one statement has questionid, save questionid info to find the question.\r
+  // If one statement not has questionid info, save the opcode info to find the \r
+  // statement. If more than one statement has same opcode in one form(just like\r
+  // empty subtitle info may has more than one info one form), also use Index \r
+  // info to find the statement.\r
+  //\r
+  EFI_QUESTION_ID    HLTQuestionId;\r
+  EFI_IFR_OP_HEADER  *HLTOpCode;\r
+  UINTN              HLTIndex;\r
+  UINTN              HLTSequence;\r
+  \r
+  //\r
+  // Info for the top of screen question.\r
+  // TOS means Top Of Screen\r
+  //\r
+  EFI_QUESTION_ID    TOSQuestionId;\r
+  EFI_IFR_OP_HEADER  *TOSOpCode;\r
+  UINTN              TOSIndex;\r
+\r
   UINT16             SkipValue;\r
 } DISPLAY_HIGHLIGHT_MENU_INFO;\r
 \r
@@ -610,4 +634,19 @@ RefreshTimeOutProcess (
   IN  VOID         *Context\r
   );\r
 \r
+/**\r
+  Record the highlight menu and top of screen menu info.\r
+\r
+  @param  Highlight               The menu opton which is highlight.\r
+  @param  TopOfScreen             The menu opton which is at the top of the form.\r
+  @param  SkipValue               The skip line info for the top of screen menu.\r
+\r
+**/\r
+VOID\r
+UpdateHighlightMenuInfo (\r
+  IN  LIST_ENTRY                      *Highlight,\r
+  IN  LIST_ENTRY                      *TopOfScreen,\r
+  IN  UINTN                           SkipValue\r
+  );\r
+\r
 #endif\r