/** @file\r
Private MACRO, structure and function definitions for Setup Browser module.\r
\r
-Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 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
#include <Protocol/SimpleTextOut.h>\r
#include <Protocol/SimpleTextIn.h>\r
#include <Protocol/FormBrowser2.h>\r
+#include <Protocol/FormBrowserEx.h>\r
#include <Protocol/DevicePath.h>\r
#include <Protocol/UnicodeCollation.h>\r
#include <Protocol/HiiConfigAccess.h>\r
#include <Protocol/HiiDatabase.h>\r
#include <Protocol/HiiString.h>\r
#include <Protocol/UserManager.h>\r
+#include <Protocol/DevicePathFromText.h>\r
\r
#include <Guid/MdeModuleHii.h>\r
#include <Guid/HiiPlatformSetupFormset.h>\r
// Definition for function key setting\r
//\r
#define NONE_FUNCTION_KEY_SETTING 0\r
-#define DEFAULT_FUNCTION_KEY_SETTING (FUNCTION_NINE | FUNCTION_TEN)\r
-\r
-#define FUNCTION_NINE (1 << 2)\r
-#define FUNCTION_TEN (1 << 3)\r
+#define ENABLE_FUNCTION_KEY_SETTING 1\r
\r
typedef struct {\r
EFI_GUID FormSetGuid;\r
//\r
// Produced protocol\r
//\r
- EFI_FORM_BROWSER2_PROTOCOL FormBrowser2;\r
+ EFI_FORM_BROWSER2_PROTOCOL FormBrowser2;\r
+ \r
+ EFI_FORM_BROWSER_EXTENSION_PROTOCOL FormBrowserEx;\r
\r
} SETUP_DRIVER_PRIVATE_DATA;\r
\r
#define EFI_HII_VARSTORE_BUFFER 0\r
#define EFI_HII_VARSTORE_NAME_VALUE 1\r
#define EFI_HII_VARSTORE_EFI_VARIABLE 2\r
+#define EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER 3\r
\r
#define FORM_INCONSISTENT_VALIDATION 0\r
#define FORM_NO_SUBMIT_VALIDATION 1\r
\r
typedef struct {\r
UINT8 Type;\r
+ UINT8 *Buffer;\r
+ UINT16 BufferLen;\r
EFI_IFR_TYPE_VALUE Value;\r
} EFI_HII_VALUE;\r
\r
\r
#define FORM_EXPRESSION_FROM_LINK(a) CR (a, FORM_EXPRESSION, Link, FORM_EXPRESSION_SIGNATURE)\r
\r
+#define FORM_EXPRESSION_LIST_SIGNATURE SIGNATURE_32 ('F', 'E', 'X', 'R')\r
+\r
+typedef struct {\r
+ UINTN Signature;\r
+ UINTN Count;\r
+ FORM_EXPRESSION *Expression[1]; // Array[Count] of expressions\r
+} FORM_EXPRESSION_LIST;\r
+\r
#define QUESTION_DEFAULT_SIGNATURE SIGNATURE_32 ('Q', 'D', 'F', 'T')\r
\r
typedef struct {\r
#define QUESTION_OPTION_SIGNATURE SIGNATURE_32 ('Q', 'O', 'P', 'T')\r
\r
typedef struct {\r
- UINTN Signature;\r
- LIST_ENTRY Link;\r
+ UINTN Signature;\r
+ LIST_ENTRY Link;\r
\r
- EFI_STRING_ID Text;\r
- UINT8 Flags;\r
- EFI_HII_VALUE Value;\r
- EFI_IMAGE_ID ImageId;\r
+ EFI_STRING_ID Text;\r
+ UINT8 Flags;\r
+ EFI_HII_VALUE Value;\r
+ EFI_IMAGE_ID ImageId;\r
\r
- FORM_EXPRESSION *SuppressExpression; // Non-NULL indicates nested inside of SuppressIf\r
+ FORM_EXPRESSION_LIST *SuppressExpression; // Non-NULL indicates nested inside of SuppressIf\r
} QUESTION_OPTION;\r
\r
#define QUESTION_OPTION_FROM_LINK(a) CR (a, QUESTION_OPTION, Link, QUESTION_OPTION_SIGNATURE)\r
\r
+typedef enum {\r
+ ExpressFalse = 0,\r
+ ExpressGrayOut, \r
+ ExpressSuppress,\r
+ ExpressDisable\r
+} EXPRESS_RESULT;\r
+\r
+typedef enum {\r
+ ExpressNone = 0,\r
+ ExpressForm, \r
+ ExpressStatement,\r
+ ExpressOption\r
+} EXPRESS_LEVEL;\r
+\r
#define FORM_BROWSER_STATEMENT_SIGNATURE SIGNATURE_32 ('F', 'S', 'T', 'A')\r
\r
typedef struct {\r
\r
EFI_DEFAULT_ID DefaultId; // for EFI_IFR_RESET_BUTTON\r
EFI_GUID RefreshGuid; // for EFI_IFR_REFRESH_ID\r
-\r
+ BOOLEAN Locked; // Whether this statement is locked.\r
//\r
// Get from IFR parsing\r
//\r
\r
LIST_ENTRY InconsistentListHead;// nested inconsistent expression list (FORM_EXPRESSION)\r
LIST_ENTRY NoSubmitListHead; // nested nosubmit expression list (FORM_EXPRESSION)\r
- FORM_EXPRESSION *GrayOutExpression; // nesting inside of GrayOutIf\r
- FORM_EXPRESSION *SuppressExpression; // nesting inside of SuppressIf\r
- FORM_EXPRESSION *DisableExpression; // nesting inside of DisableIf\r
+ FORM_EXPRESSION_LIST *Expression; // nesting inside of GrayOutIf/DisableIf/SuppressIf\r
\r
FORM_EXPRESSION *ReadExpression; // nested EFI_IFR_READ, provide this question value by read expression.\r
FORM_EXPRESSION *WriteExpression; // nested EFI_IFR_WRITE, evaluate write expression after this question value is set.\r
#define STANDARD_MAP_FORM_TYPE 0x01\r
\r
typedef struct {\r
- UINTN Signature;\r
- LIST_ENTRY Link;\r
+ UINTN Signature;\r
+ LIST_ENTRY Link;\r
\r
- UINT16 FormId; // FormId of normal form or formmap form.\r
- EFI_STRING_ID FormTitle; // FormTile of normal form, or FormMapMethod title of formmap form.\r
- UINT16 FormType; // Specific form type for the different form.\r
+ UINT16 FormId; // FormId of normal form or formmap form.\r
+ EFI_STRING_ID FormTitle; // FormTile of normal form, or FormMapMethod title of formmap form.\r
+ UINT16 FormType; // Specific form type for the different form.\r
\r
- EFI_IMAGE_ID ImageId;\r
+ EFI_IMAGE_ID ImageId;\r
\r
- BOOLEAN ModalForm; // Whether this is a modal form.\r
+ BOOLEAN ModalForm; // Whether this is a modal form.\r
+ BOOLEAN Locked; // Whether this form is locked.\r
\r
- BOOLEAN NvUpdateRequired; // Whether this form has NV update request.\r
+ BOOLEAN NvUpdateRequired; // Whether this form has NV update request.\r
\r
- LIST_ENTRY ExpressionListHead; // List of Expressions (FORM_EXPRESSION)\r
- LIST_ENTRY StatementListHead; // List of Statements and Questions (FORM_BROWSER_STATEMENT)\r
- LIST_ENTRY ConfigRequestHead; // List of configreques for all storage.\r
- FORM_EXPRESSION *SuppressExpression; // nesting inside of SuppressIf\r
+ LIST_ENTRY ExpressionListHead; // List of Expressions (FORM_EXPRESSION)\r
+ LIST_ENTRY StatementListHead; // List of Statements and Questions (FORM_BROWSER_STATEMENT)\r
+ LIST_ENTRY ConfigRequestHead; // List of configreques for all storage.\r
+ FORM_EXPRESSION_LIST *SuppressExpression; // nesting inside of SuppressIf\r
} FORM_BROWSER_FORM;\r
\r
#define FORM_BROWSER_FORM_FROM_LINK(a) CR (a, FORM_BROWSER_FORM, Link, FORM_BROWSER_FORM_SIGNATURE)\r
\r
#define FORMSET_DEFAULTSTORE_FROM_LINK(a) CR (a, FORMSET_DEFAULTSTORE, Link, FORMSET_DEFAULTSTORE_SIGNATURE)\r
\r
+#define FORM_BROWSER_FORMSET_SIGNATURE SIGNATURE_32 ('F', 'B', 'F', 'S')\r
+\r
typedef struct {\r
- EFI_HII_HANDLE HiiHandle;\r
+ UINTN Signature;\r
+ LIST_ENTRY Link;\r
+ EFI_HII_HANDLE HiiHandle; // unique id for formset.\r
EFI_HANDLE DriverHandle;\r
EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess;\r
EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
LIST_ENTRY ExpressionListHead; // List of Expressions (FORM_EXPRESSION)\r
} FORM_BROWSER_FORMSET;\r
\r
+#define FORM_BROWSER_FORMSET_FROM_LINK(a) CR (a, FORM_BROWSER_FORMSET, Link, FORM_BROWSER_FORMSET_SIGNATURE)\r
+\r
#define BROWSER_CONTEXT_SIGNATURE SIGNATURE_32 ('B', 'C', 'T', 'X')\r
\r
typedef struct {\r
BOOLEAN ResetRequired;\r
UINT16 Direction;\r
EFI_SCREEN_DESCRIPTOR ScreenDimensions;\r
- CHAR16 *FunctionNineString;\r
- CHAR16 *FunctionTenString;\r
CHAR16 *EnterString;\r
CHAR16 *EnterCommitString;\r
CHAR16 *EnterEscapeString;\r
CHAR16 *EscapeString;\r
- CHAR16 *SaveFailed;\r
CHAR16 *MoveHighlight;\r
CHAR16 *MakeSelection;\r
CHAR16 *DecNumericInput;\r
CHAR16 *SaveChanges;\r
CHAR16 *OptionMismatch;\r
CHAR16 *FormSuppress;\r
+ CHAR16 *ProtocolNotFound;\r
CHAR16 PromptBlockWidth;\r
CHAR16 OptionBlockWidth;\r
CHAR16 HelpBlockWidth;\r
\r
#define BROWSER_CONTEXT_FROM_LINK(a) CR (a, BROWSER_CONTEXT, Link, BROWSER_CONTEXT_SIGNATURE)\r
\r
+#define BROWSER_HOT_KEY_SIGNATURE SIGNATURE_32 ('B', 'H', 'K', 'S')\r
+\r
+typedef struct {\r
+ UINTN Signature;\r
+ LIST_ENTRY Link;\r
+ \r
+ EFI_INPUT_KEY *KeyData;\r
+ IN UINT32 Action;\r
+ IN UINT16 DefaultId;\r
+ IN EFI_STRING HelpString;\r
+} BROWSER_HOT_KEY;\r
+\r
+#define BROWSER_HOT_KEY_FROM_LINK(a) CR (a, BROWSER_HOT_KEY, Link, BROWSER_HOT_KEY_SIGNATURE)\r
+\r
+//\r
+// Scope for get defaut value. It may be GetDefaultForNoStorage, GetDefaultForStorage or GetDefaultForAll.\r
+//\r
+typedef enum {\r
+ GetDefaultForNoStorage, // Get default value for question which not has storage.\r
+ GetDefaultForStorage, // Get default value for question which has storage.\r
+ GetDefaultForAll, // Get default value for all questions.\r
+ GetDefaultForMax // Invalid value.\r
+} BROWSER_GET_DEFAULT_VALUE;\r
+\r
+//\r
+// Get/set question value from/to.\r
+//\r
+typedef enum {\r
+ GetSetValueWithEditBuffer, // Get/Set question value from/to editbuffer in the storage.\r
+ GetSetValueWithBuffer, // Get/Set question value from/to buffer in the storage.\r
+ GetSetValueWithHiiDriver, // Get/Set question value from/to hii driver.\r
+ GetSetValueWithMax // Invalid value.\r
+} GET_SET_QUESTION_VALUE_WITH;\r
+\r
extern EFI_HII_DATABASE_PROTOCOL *mHiiDatabase;\r
extern EFI_HII_STRING_PROTOCOL *mHiiString;\r
extern EFI_HII_CONFIG_ROUTING_PROTOCOL *mHiiConfigRouting;\r
+extern EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *mPathFromText;\r
\r
extern BANNER_DATA *gBannerData;\r
extern EFI_HII_HANDLE gFrontPageHandle;\r
extern EFI_SCREEN_DESCRIPTOR gScreenDimensions;\r
\r
extern FORM_BROWSER_FORMSET *gOldFormSet;\r
+extern LIST_ENTRY gBrowserFormSetList;\r
+extern LIST_ENTRY gBrowserHotKeyList;\r
+extern BROWSER_SETTING_SCOPE gBrowserSettingScope;\r
+extern EXIT_HANDLER ExitHandlerFunction;\r
+extern UINTN gFooterHeight;\r
\r
//\r
// Browser Global Strings\r
//\r
-extern CHAR16 *gFunctionNineString;\r
-extern CHAR16 *gFunctionTenString;\r
+extern CHAR16 *gDiscardFailed;\r
+extern CHAR16 *gDefaultFailed;\r
extern CHAR16 *gEnterString;\r
extern CHAR16 *gEnterCommitString;\r
extern CHAR16 *gEnterEscapeString;\r
extern CHAR16 *gSaveChanges;\r
extern CHAR16 *gOptionMismatch;\r
extern CHAR16 *gFormSuppress;\r
+extern CHAR16 *gProtocolNotFound;\r
\r
extern CHAR16 gPromptBlockWidth;\r
extern CHAR16 gOptionBlockWidth;\r
@param Storage The NameValue Storage.\r
@param Name The Name.\r
@param Value The retured Value.\r
+ @param GetValueFrom Where to get source value, from EditValue or Value.\r
\r
@retval EFI_SUCCESS Value found for given Name.\r
@retval EFI_NOT_FOUND No such Name found in NameValue storage.\r
**/\r
EFI_STATUS\r
GetValueByName (\r
- IN FORMSET_STORAGE *Storage,\r
- IN CHAR16 *Name,\r
- IN OUT CHAR16 **Value\r
+ IN FORMSET_STORAGE *Storage,\r
+ IN CHAR16 *Name,\r
+ IN OUT CHAR16 **Value,\r
+ IN GET_SET_QUESTION_VALUE_WITH GetValueFrom\r
);\r
\r
/**\r
@param Storage The NameValue Storage.\r
@param Name The Name.\r
@param Value The Value to set.\r
- @param Edit Whether update editValue or Value.\r
+ @param SetValueTo Whether update editValue or Value.\r
\r
@retval EFI_SUCCESS Value found for given Name.\r
@retval EFI_NOT_FOUND No such Name found in NameValue storage.\r
**/\r
EFI_STATUS\r
SetValueByName (\r
- IN FORMSET_STORAGE *Storage,\r
- IN CHAR16 *Name,\r
- IN CHAR16 *Value,\r
- IN BOOLEAN Edit\r
+ IN FORMSET_STORAGE *Storage,\r
+ IN CHAR16 *Name,\r
+ IN CHAR16 *Value,\r
+ IN GET_SET_QUESTION_VALUE_WITH SetValueTo\r
);\r
\r
/**\r
@param FormSet FormSet data structure.\r
@param Form Form data structure.\r
@param Question Question to be initialized.\r
- @param Cached TRUE: get from Edit copy FALSE: get from original\r
- Storage\r
+ @param GetValueFrom Where to get value, may from editbuffer, buffer or hii driver.\r
\r
@retval EFI_SUCCESS The function completed successfully.\r
\r
IN FORM_BROWSER_FORMSET *FormSet,\r
IN FORM_BROWSER_FORM *Form,\r
IN OUT FORM_BROWSER_STATEMENT *Question,\r
- IN BOOLEAN Cached\r
+ IN GET_SET_QUESTION_VALUE_WITH GetValueFrom\r
);\r
\r
/**\r
@param FormSet FormSet data structure.\r
@param Form Form data structure.\r
@param Question Pointer to the Question.\r
- @param Cached TRUE: set to Edit copy FALSE: set to original\r
- Storage\r
+ @param SetValueTo Update the question value to editbuffer , buffer or hii driver.\r
\r
@retval EFI_SUCCESS The function completed successfully.\r
\r
IN FORM_BROWSER_FORMSET *FormSet,\r
IN FORM_BROWSER_FORM *Form,\r
IN OUT FORM_BROWSER_STATEMENT *Question,\r
- IN BOOLEAN Cached\r
+ IN GET_SET_QUESTION_VALUE_WITH SetValueTo\r
);\r
\r
/**\r
IN UINTN Type\r
);\r
\r
+\r
/**\r
- Discard data for form level or formset level.\r
+ Discard data based on the input setting scope (Form, FormSet or System).\r
\r
@param FormSet FormSet data structure.\r
@param Form Form data structure.\r
- @param SingleForm whether submit single form or formset.\r
+ @param SettingScope Setting Scope for Discard action.\r
\r
@retval EFI_SUCCESS The function completed successfully.\r
+ @retval EFI_UNSUPPORTED Unsupport SettingScope.\r
\r
**/\r
EFI_STATUS\r
DiscardForm (\r
IN FORM_BROWSER_FORMSET *FormSet,\r
IN FORM_BROWSER_FORM *Form,\r
- IN BOOLEAN SingleForm\r
+ IN BROWSER_SETTING_SCOPE SettingScope\r
);\r
\r
/**\r
- Submit data for form level or formset level.\r
+ Submit data based on the input Setting level (Form, FormSet or System).\r
\r
@param FormSet FormSet data structure.\r
@param Form Form data structure.\r
- @param SingleForm whether submit single form or formset.\r
+ @param SettingScope Setting Scope for Submit action.\r
\r
@retval EFI_SUCCESS The function completed successfully.\r
+ @retval EFI_UNSUPPORTED Unsupport SettingScope.\r
\r
**/\r
EFI_STATUS\r
SubmitForm (\r
IN FORM_BROWSER_FORMSET *FormSet,\r
IN FORM_BROWSER_FORM *Form,\r
- IN BOOLEAN SingleForm\r
+ IN BROWSER_SETTING_SCOPE SettingScope\r
);\r
\r
/**\r
GUID), take the first FormSet found in package\r
list.\r
@param FormSet FormSet data structure.\r
+ @param UpdateGlobalVar Whether need to update the global variable.\r
\r
@retval EFI_SUCCESS The function completed successfully.\r
@retval EFI_NOT_FOUND The specified FormSet could not be found.\r
InitializeFormSet (\r
IN EFI_HII_HANDLE Handle,\r
IN OUT EFI_GUID *FormSetGuid,\r
- OUT FORM_BROWSER_FORMSET *FormSet\r
+ OUT FORM_BROWSER_FORMSET *FormSet,\r
+ IN BOOLEAN UpdateGlobalVar \r
);\r
\r
/**\r
- Reset Questions in a Formset to their default value.\r
+ Reset Questions to their initial value or default value in a Form, Formset or System.\r
+\r
+ GetDefaultValueScope parameter decides which questions will reset \r
+ to its default value.\r
\r
@param FormSet FormSet data structure.\r
+ @param Form Form data structure.\r
@param DefaultId The Class of the default.\r
+ @param SettingScope Setting Scope for Default action.\r
+ @param GetDefaultValueScope Get default value scope.\r
+ @param Storage Get default value only for this storage.\r
+ @param RetrieveValueFirst Whether call the retrieve call back to\r
+ get the initial value before get default\r
+ value.\r
\r
@retval EFI_SUCCESS The function completed successfully.\r
+ @retval EFI_UNSUPPORTED Unsupport SettingScope.\r
\r
**/\r
EFI_STATUS\r
-ExtractFormSetDefault (\r
+ExtractDefault (\r
IN FORM_BROWSER_FORMSET *FormSet,\r
- IN UINT16 DefaultId\r
+ IN FORM_BROWSER_FORM *Form,\r
+ IN UINT16 DefaultId,\r
+ IN BROWSER_SETTING_SCOPE SettingScope,\r
+ IN BROWSER_GET_DEFAULT_VALUE GetDefaultValueScope,\r
+ IN FORMSET_STORAGE *Storage,\r
+ IN BOOLEAN RetrieveValueFirst\r
);\r
\r
/**\r
@param Selection Selection contains the information about \r
the Selection, form and formset to be displayed.\r
Selection action may be updated in retrieve callback.\r
+ If Selection is NULL, only initialize Question value.\r
@param FormSet FormSet data structure.\r
@param Form Form data structure.\r
\r
@param Selection Selection contains the information about \r
the Selection, form and formset to be displayed.\r
Selection action may be updated in retrieve callback.\r
+ If Selection is NULL, only initialize Question value.\r
@param FormSet FormSet data structure.\r
\r
@retval EFI_SUCCESS The function completed successfully.\r
IN EFI_BROWSER_ACTION Action,\r
IN BOOLEAN SkipSaveOrDiscard\r
);\r
+ \r
+/**\r
+ Call the retrieve type call back function for one question to get the initialize data.\r
+ \r
+ This function only used when in the initialize stage, because in this stage, the \r
+ Selection->Form is not ready. For other case, use the ProcessCallBackFunction instead.\r
+\r
+ @param ConfigAccess The config access protocol produced by the hii driver.\r
+ @param Statement The Question which need to call.\r
+\r
+ @retval EFI_SUCCESS The call back function excutes successfully.\r
+ @return Other value if the call back function failed to excute. \r
+**/\r
+EFI_STATUS \r
+ProcessRetrieveForQuestion (\r
+ IN EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess,\r
+ IN FORM_BROWSER_STATEMENT *Statement\r
+ );\r
+\r
+/**\r
+ Find the matched FormSet context in the backup maintain list based on HiiHandle.\r
+ \r
+ @param Handle The Hii Handle.\r
+ \r
+ @return the found FormSet context. If no found, NULL will return.\r
+\r
+**/\r
+FORM_BROWSER_FORMSET * \r
+GetFormSetFromHiiHandle (\r
+ EFI_HII_HANDLE Handle\r
+ );\r
+\r
+/**\r
+ Check whether the input HII handle is the FormSet that is being used.\r
+ \r
+ @param Handle The Hii Handle.\r
+ \r
+ @retval TRUE HII handle is being used.\r
+ @retval FALSE HII handle is not being used.\r
+\r
+**/\r
+BOOLEAN\r
+IsHiiHandleInBrowserContext (\r
+ EFI_HII_HANDLE Handle\r
+ );\r
+\r
+/**\r
+ Configure what scope the hot key will impact.\r
+ All hot keys have the same scope. The mixed hot keys with the different level are not supported.\r
+ If no scope is set, the default scope will be FormSet level.\r
+ After all registered hot keys are removed, previous Scope can reset to another level.\r
+ \r
+ @param[in] Scope Scope level to be set. \r
+ \r
+ @retval EFI_SUCCESS Scope is set correctly.\r
+ @retval EFI_INVALID_PARAMETER Scope is not the valid value specified in BROWSER_SETTING_SCOPE. \r
+ @retval EFI_UNSPPORTED Scope level is different from current one that the registered hot keys have.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+SetScope (\r
+ IN BROWSER_SETTING_SCOPE Scope\r
+ );\r
+\r
+/**\r
+ Register the hot key with its browser action, or unregistered the hot key.\r
+ Only support hot key that is not printable character (control key, function key, etc.).\r
+ If the action value is zero, the hot key will be unregistered if it has been registered.\r
+ If the same hot key has been registered, the new action and help string will override the previous ones.\r
+ \r
+ @param[in] KeyData A pointer to a buffer that describes the keystroke\r
+ information for the hot key. Its type is EFI_INPUT_KEY to \r
+ be supported by all ConsoleIn devices.\r
+ @param[in] Action Action value that describes what action will be trigged when the hot key is pressed. \r
+ @param[in] DefaultId Specifies the type of defaults to retrieve, which is only for DEFAULT action.\r
+ @param[in] HelpString Help string that describes the hot key information.\r
+ Its value may be NULL for the unregistered hot key.\r
+ \r
+ @retval EFI_SUCCESS Hot key is registered or unregistered.\r
+ @retval EFI_INVALID_PARAMETER KeyData is NULL.\r
+ @retval EFI_NOT_FOUND KeyData is not found to be unregistered.\r
+ @retval EFI_UNSUPPORTED Key represents a printable character. It is conflicted with Browser.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+RegisterHotKey (\r
+ IN EFI_INPUT_KEY *KeyData,\r
+ IN UINT32 Action,\r
+ IN UINT16 DefaultId,\r
+ IN EFI_STRING HelpString OPTIONAL\r
+ );\r
+\r
+/**\r
+ Register Exit handler function. \r
+ When more than one handler function is registered, the latter one will override the previous one. \r
+ When NULL handler is specified, the previous Exit handler will be unregistered. \r
+ \r
+ @param[in] Handler Pointer to handler function. \r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+RegiserExitHandler (\r
+ IN EXIT_HANDLER Handler\r
+ );\r
+\r
+/**\r
+ Create reminder to let user to choose save or discard the changed browser data.\r
+ Caller can use it to actively check the changed browser data.\r
+\r
+ @retval BROWSER_NO_CHANGES No browser data is changed.\r
+ @retval BROWSER_SAVE_CHANGES The changed browser data is saved.\r
+ @retval BROWSER_DISCARD_CHANGES The changed browser data is discard.\r
+\r
+**/\r
+UINT32\r
+EFIAPI\r
+SaveReminder (\r
+ VOID\r
+ );\r
+\r
+/**\r
+ Find the registered HotKey based on KeyData.\r
+ \r
+ @param[in] KeyData A pointer to a buffer that describes the keystroke\r
+ information for the hot key.\r
+\r
+ @return The registered HotKey context. If no found, NULL will return.\r
+**/\r
+BROWSER_HOT_KEY *\r
+GetHotKeyFromRegisterList (\r
+ IN EFI_INPUT_KEY *KeyData\r
+ );\r
+\r
#endif\r