/** @file\r
Private structure, MACRO and function definitions for User Interface related functionalities.\r
\r
-Copyright (c) 2004 - 2008, Intel Corporation\r
+Copyright (c) 2004 - 2009, 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
CfPrepareToReadKey,\r
CfReadKey,\r
CfScreenOperation,\r
- CfUiPrevious,\r
CfUiSelect,\r
CfUiReset,\r
CfUiLeft,\r
\r
#define MENU_OPTION_FROM_LINK(a) CR (a, UI_MENU_OPTION, Link, UI_MENU_OPTION_SIGNATURE)\r
\r
-typedef struct {\r
+typedef struct _UI_MENU_LIST UI_MENU_LIST;\r
+\r
+struct _UI_MENU_LIST {\r
UINTN Signature;\r
- LIST_ENTRY MenuLink;\r
+ LIST_ENTRY Link;\r
\r
+ EFI_GUID FormSetGuid;\r
UINT16 FormId;\r
UINT16 QuestionId;\r
-} UI_MENU_LIST;\r
+\r
+ UI_MENU_LIST *Parent;\r
+ LIST_ENTRY ChildListHead;\r
+};\r
+\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
} SCREEN_OPERATION_T0_CONTROL_FLAG;\r
\r
\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
- Remove a Menu in list, and return FormId/QuestionId for previous Menu.\r
-\r
- @param Selection Menu selection.\r
+ Free Menu option linked list.\r
\r
**/\r
VOID\r
-UiRemoveMenuListEntry (\r
- OUT UI_MENU_SELECTION *Selection\r
+UiFreeMenu (\r
+ VOID\r
);\r
\r
/**\r
- Free Menu option linked list.\r
+ Create a menu with specified formset GUID and form ID, and add it as a child\r
+ of the given parent menu.\r
+\r
+ @param Parent The parent of menu to be added.\r
+ @param FormSetGuid The Formset Guid of menu to be added.\r
+ @param FormId The Form ID of menu to be added.\r
+\r
+ @return A pointer to the newly added menu or NULL if memory is insufficient.\r
\r
**/\r
-VOID\r
-UiFreeMenuList (\r
- VOID\r
+UI_MENU_LIST *\r
+UiAddMenuList (\r
+ IN OUT UI_MENU_LIST *Parent,\r
+ IN EFI_GUID *FormSetGuid,\r
+ IN UINT16 FormId\r
);\r
\r
/**\r
- Add one menu entry to the linked lst\r
+ Search Menu with given FormId in the parent menu and all its child menus.\r
\r
- @param Selection Menu selection.\r
+ @param Parent The parent of menu to search.\r
+ @param FormId The Form ID of menu to search.\r
+\r
+ @return A pointer to menu found or NULL if not found.\r
\r
**/\r
-VOID\r
-UiAddMenuListEntry (\r
- IN UI_MENU_SELECTION *Selection\r
+UI_MENU_LIST *\r
+UiFindChildMenuList (\r
+ IN UI_MENU_LIST *Parent,\r
+ IN UINT16 FormId\r
+ );\r
+\r
+/**\r
+ Search Menu with given FormSetGuid and FormId in all cached menu list.\r
+\r
+ @param FormSetGuid The Formset GUID of the menu to search.\r
+ @param FormId The Form ID of menu to search.\r
+\r
+ @return A pointer to menu found or NULL if not found.\r
+\r
+**/\r
+UI_MENU_LIST *\r
+UiFindMenuList (\r
+ IN EFI_GUID *FormSetGuid,\r
+ IN UINT16 FormId\r
);\r
\r
/**\r
\r
**/\r
VOID\r
-UiFreeMenu (\r
+UiFreeRefreshList (\r
VOID\r
);\r
\r
\r
This function handles the Unicode string with NARROW_CHAR\r
and WIDE_CHAR control characters. NARROW_HCAR and WIDE_CHAR\r
- does not count in the resultant output. If a WIDE_CHAR is \r
+ does not count in the resultant output. If a WIDE_CHAR is\r
hit, then 2 Unicode character will consume an output storage\r
space with size of CHAR16 till a NARROW_CHAR is hit.\r
\r