/** @file\r
Private structure, MACRO and function definitions for User Interface related functionalities.\r
\r
-Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2013, 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
\r
\r
extern LIST_ENTRY gMenuOption;\r
+extern LIST_ENTRY gMenuList;\r
extern MENU_REFRESH_ENTRY *gMenuRefreshHead;\r
extern UI_MENU_SELECTION *gCurrentSelection;\r
extern BOOLEAN mHiiPackageListUpdated;\r
);\r
\r
/**\r
- Search Menu with given FormId in the parent menu and all its child menus.\r
+ Search Menu with given FormId, FormSetGuid and Handle in all cached menu list.\r
\r
@param Parent The parent of menu to search.\r
+ @param Handle Hii handle related to this formset.\r
@param FormSetGuid The Formset GUID of the menu to search. \r
@param FormId The Form ID of menu to search.\r
\r
UI_MENU_LIST *\r
UiFindChildMenuList (\r
IN UI_MENU_LIST *Parent,\r
+ IN EFI_HII_HANDLE Handle,\r
IN EFI_GUID *FormSetGuid, \r
IN UINT16 FormId\r
);\r
\r
/**\r
- Search Menu with given FormSetGuid and FormId in all cached menu list.\r
+ Search Menu with given Handle, FormSetGuid and FormId in all cached menu list.\r
\r
+ @param Handle Hii handle related to this formset.\r
@param FormSetGuid The Formset GUID of the menu to search.\r
@param FormId The Form ID of menu to search.\r
\r
**/\r
UI_MENU_LIST *\r
UiFindMenuList (\r
+ IN EFI_HII_HANDLE Handle,\r
IN EFI_GUID *FormSetGuid,\r
IN UINT16 FormId\r
);\r
\r
+/**\r
+ Free Menu list linked list.\r
+\r
+ @param MenuListHead One Menu list point in the menu list.\r
+\r
+**/\r
+VOID\r
+UiFreeMenuList (\r
+ LIST_ENTRY *MenuListHead\r
+ );\r
+\r
/**\r
Free Menu option linked list.\r
\r
IN UINT64 Value\r
);\r
\r
+/**\r
+ Check whether this value already in the array, if yes, return the index.\r
+\r
+ @param Array The data array.\r
+ @param Type Type of the data in this array.\r
+ @param Value The value to be find.\r
+ @param Index The index in the array which has same value with Value.\r
+ \r
+ @retval TRUE Found the value in the array.\r
+ @retval FALSE Not found the value.\r
+\r
+**/\r
+BOOLEAN \r
+FindArrayData (\r
+ IN VOID *Array,\r
+ IN UINT8 Type,\r
+ IN UINT64 Value,\r
+ OUT UINTN *Index OPTIONAL\r
+ );\r
+\r
/**\r
Process a Question's Option (whether selected or un-selected).\r
\r
\r
@param StringPtr The entire help string.\r
@param FormattedString The oupput formatted string.\r
+ @param EachLineWidth The string length of each line in the formatted string.\r
@param RowCount TRUE: if Question is selected.\r
\r
**/\r
UINTN\r
ProcessHelpString (\r
- IN CHAR16 *StringPtr,\r
- OUT CHAR16 **FormattedString,\r
- IN UINTN RowCount\r
+ IN CHAR16 *StringPtr,\r
+ OUT CHAR16 **FormattedString,\r
+ OUT UINT16 *EachLineWidth,\r
+ IN UINTN RowCount\r
);\r
\r
/**\r
/**\r
Will copy LineWidth amount of a string in the OutputString buffer and return the\r
number of CHAR16 characters that were copied into the OutputString buffer.\r
+ In the code, it deals \r,\n,\r\n same as \n\r, also it not process the \r or \g.\r
\r
@param InputString String description for this option.\r
@param LineWidth Width of the desired string to extract in CHAR16\r
characters\r
+ @param GlyphWidth The glyph width of the beging char in the string.\r
@param Index Where in InputString to start the copy process\r
@param OutputString Buffer to copy the string into\r
\r
GetLineByWidth (\r
IN CHAR16 *InputString,\r
IN UINT16 LineWidth,\r
+ IN OUT UINT16 *GlyphWidth,\r
IN OUT UINTN *Index,\r
OUT CHAR16 **OutputString\r
);\r