diff options
author | xdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-10-26 03:03:12 +0000 |
---|---|---|
committer | xdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-10-26 03:03:12 +0000 |
commit | d66e6c168749f686f3be04809923da74f153f340 (patch) | |
tree | 74b3325b78d8baf7f602b40f7672537026f03169 /MdeModulePkg/Universal/SetupBrowserDxe/Ui.h | |
parent | 0ce94f384e29bee048477e4f2e5cebe46314cced (diff) | |
download | edk2-platforms-d66e6c168749f686f3be04809923da74f153f340.tar.xz |
Change the FormBrowser behavior of "Pressing ESC":
The old behavior is: if press ESC, it will exit the whole Formset.
The new behavior is: if press ESC, it will return to the parent Form; if current Form is the root Form of a FormSet, it will exit the whole FormSet.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9359 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/Ui.h')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Ui.h | 76 |
1 files changed, 54 insertions, 22 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.h b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.h index 2c144486dd..f7d4ad1d7f 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.h +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.h @@ -1,7 +1,7 @@ /** @file
Private structure, MACRO and function definitions for User Interface related functionalities.
-Copyright (c) 2004 - 2008, Intel Corporation
+Copyright (c) 2004 - 2009, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -58,7 +58,6 @@ typedef enum { CfPrepareToReadKey,
CfReadKey,
CfScreenOperation,
- CfUiPrevious,
CfUiSelect,
CfUiReset,
CfUiLeft,
@@ -145,13 +144,21 @@ typedef struct { #define MENU_OPTION_FROM_LINK(a) CR (a, UI_MENU_OPTION, Link, UI_MENU_OPTION_SIGNATURE)
-typedef struct {
+typedef struct _UI_MENU_LIST UI_MENU_LIST;
+
+struct _UI_MENU_LIST {
UINTN Signature;
- LIST_ENTRY MenuLink;
+ LIST_ENTRY Link;
+ EFI_GUID FormSetGuid;
UINT16 FormId;
UINT16 QuestionId;
-} UI_MENU_LIST;
+
+ UI_MENU_LIST *Parent;
+ LIST_ENTRY ChildListHead;
+};
+
+#define UI_MENU_LIST_FROM_LINK(a) CR (a, UI_MENU_LIST, Link, UI_MENU_LIST_SIGNATURE)
typedef struct _MENU_REFRESH_ENTRY {
struct _MENU_REFRESH_ENTRY *Next;
@@ -173,7 +180,6 @@ typedef struct { } SCREEN_OPERATION_T0_CONTROL_FLAG;
-extern LIST_ENTRY gMenuList;
extern MENU_REFRESH_ENTRY *gMenuRefreshHead;
extern UI_MENU_SELECTION *gCurrentSelection;
extern BOOLEAN mHiiPackageListUpdated;
@@ -200,34 +206,60 @@ UiInitMenuList ( );
/**
- Remove a Menu in list, and return FormId/QuestionId for previous Menu.
-
- @param Selection Menu selection.
+ Free Menu option linked list.
**/
VOID
-UiRemoveMenuListEntry (
- OUT UI_MENU_SELECTION *Selection
+UiFreeMenu (
+ VOID
);
/**
- Free Menu option linked list.
+ Create a menu with specified formset GUID and form ID, and add it as a child
+ of the given parent menu.
+
+ @param Parent The parent of menu to be added.
+ @param FormSetGuid The Formset Guid of menu to be added.
+ @param FormId The Form ID of menu to be added.
+
+ @return A pointer to the newly added menu or NULL if memory is insufficient.
**/
-VOID
-UiFreeMenuList (
- VOID
+UI_MENU_LIST *
+UiAddMenuList (
+ IN OUT UI_MENU_LIST *Parent,
+ IN EFI_GUID *FormSetGuid,
+ IN UINT16 FormId
);
/**
- Add one menu entry to the linked lst
+ Search Menu with given FormId in the parent menu and all its child menus.
- @param Selection Menu selection.
+ @param Parent The parent of menu to search.
+ @param FormId The Form ID of menu to search.
+
+ @return A pointer to menu found or NULL if not found.
**/
-VOID
-UiAddMenuListEntry (
- IN UI_MENU_SELECTION *Selection
+UI_MENU_LIST *
+UiFindChildMenuList (
+ IN UI_MENU_LIST *Parent,
+ IN UINT16 FormId
+ );
+
+/**
+ Search Menu with given FormSetGuid and FormId in all cached menu list.
+
+ @param FormSetGuid The Formset GUID of the menu to search.
+ @param FormId The Form ID of menu to search.
+
+ @return A pointer to menu found or NULL if not found.
+
+**/
+UI_MENU_LIST *
+UiFindMenuList (
+ IN EFI_GUID *FormSetGuid,
+ IN UINT16 FormId
);
/**
@@ -235,7 +267,7 @@ UiAddMenuListEntry ( **/
VOID
-UiFreeMenu (
+UiFreeRefreshList (
VOID
);
@@ -557,7 +589,7 @@ ClearLines ( This function handles the Unicode string with NARROW_CHAR
and WIDE_CHAR control characters. NARROW_HCAR and WIDE_CHAR
- does not count in the resultant output. If a WIDE_CHAR is
+ does not count in the resultant output. If a WIDE_CHAR is
hit, then 2 Unicode character will consume an output storage
space with size of CHAR16 till a NARROW_CHAR is hit.
|