TianoCore EDK2 master
|
#include "Setup.h"
Go to the source code of this file.
Variables | |
BOOLEAN | mHiiPackageListUpdated |
UI_MENU_SELECTION * | gCurrentSelection |
EFI_HII_HANDLE | mCurrentHiiHandle = NULL |
EFI_GUID | mCurrentFormSetGuid |
UINT16 | mCurrentFormId = 0 |
EFI_EVENT | mValueChangedEvent = NULL |
LIST_ENTRY | mRefreshEventList = INITIALIZE_LIST_HEAD_VARIABLE (mRefreshEventList) |
UINT16 | mCurFakeQestId |
FORM_DISPLAY_ENGINE_FORM | gDisplayFormData |
BOOLEAN | mFinishRetrieveCall = FALSE |
Utility functions for UI presentation.
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2015 - 2022 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Presentation.c.
VOID AddStatementToDisplayForm | ( | VOID | ) |
Enum all statement in current form, find all the statement can be display and add to the display form.
Definition at line 531 of file Presentation.c.
EFI_STATUS CheckConfigAccess | ( | IN FORM_BROWSER_FORMSET * | FormSet | ) |
Check whether the ConfigAccess protocol is available.
FormSet | FormSet of which the ConfigAcces protocol need to be checked. |
EFI_SUCCESS | The function executed successfully. |
Definition at line 34 of file Presentation.c.
VOID CreateRefreshEventForForm | ( | IN FORM_BROWSER_FORM * | Form | ) |
Create refresh hook event for form which has refresh event or interval.
Form | The form need to check. |
Definition at line 267 of file Presentation.c.
VOID CreateRefreshEventForStatement | ( | IN FORM_BROWSER_STATEMENT * | Statement | ) |
Create refresh hook event for statement which has refresh event or interval.
Statement | The statement need to check. |
Definition at line 233 of file Presentation.c.
EFI_HII_HANDLE DevicePathToHiiHandle | ( | IN EFI_DEVICE_PATH_PROTOCOL * | DevicePath, |
IN EFI_GUID * | FormsetGuid | ||
) |
Find HII Handle in the HII database associated with given Device Path.
If DevicePath is NULL, then ASSERT.
DevicePath | Device Path associated with the HII package list handle. |
FormsetGuid | The formset guid for this formset. |
Handle | HII package list Handle associated with the Device Path. |
NULL | Hii Package list handle is not found. |
Definition at line 1165 of file Presentation.c.
EFI_STATUS DisplayForm | ( | VOID | ) |
Display form and wait for user to select one menu option, then return it.
EFI_SUCESSS | This function always return successfully for now. |
Definition at line 1694 of file Presentation.c.
EFI_STATUS EvaluateFormExpressions | ( | IN FORM_BROWSER_FORMSET * | FormSet, |
IN FORM_BROWSER_FORM * | Form | ||
) |
Evaluate all expressions in a Form.
FormSet | FormSet this Form belongs to. |
Form | The Form. |
EFI_SUCCESS | The expression evaluated successfuly |
Definition at line 67 of file Presentation.c.
BOOLEAN FindNextMenu | ( | IN OUT UI_MENU_SELECTION * | Selection, |
IN BROWSER_SETTING_SCOPE | SettingLevel | ||
) |
Find menu which will show next time.
Selection | On input, Selection tell setup browser the information about the Selection, form and formset to be displayed. On output, Selection return the screen item that is selected by user. |
SettingLevel | Input Settting level, if it is FormLevel, just exit current form. else, we need to exit current formset. |
TRUE | Exit current form. |
FALSE | User press ESC and keep in current form. |
Definition at line 1878 of file Presentation.c.
VOID FindParentFormSet | ( | IN OUT UI_MENU_SELECTION * | Selection | ) |
Find parent formset menu(the first menu which has different formset) for current menu. If not find, just return to the first menu.
Selection | The selection info. |
Definition at line 1336 of file Presentation.c.
EFI_HII_HANDLE FormSetGuidToHiiHandle | ( | EFI_GUID * | ComparingGuid | ) |
Find HII Handle in the HII database associated with given form set guid.
If FormSetGuid is NULL, then ASSERT.
ComparingGuid | FormSet Guid associated with the HII package list handle. |
Handle | HII package list Handle associated with the Device Path. |
NULL | Hii Package list handle is not found. |
Definition at line 1241 of file Presentation.c.
EFI_STATUS EFIAPI FormUpdateNotify | ( | IN UINT8 | PackageType, |
IN CONST EFI_GUID * | PackageGuid, | ||
IN CONST EFI_HII_PACKAGE_HEADER * | Package, | ||
IN EFI_HII_HANDLE | Handle, | ||
IN EFI_HII_DATABASE_NOTIFY_TYPE | NotifyType | ||
) |
Functions which are registered to receive notification of database events have this prototype. The actual event is encoded in NotifyType. The following table describes how PackageType, PackageGuid, Handle, and Package are used for each of the notification types.
PackageType | Package type of the notification. |
PackageGuid | If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then this is the pointer to the GUID from the Guid field of EFI_HII_PACKAGE_GUID_HEADER. Otherwise, it must be NULL. |
Package | Points to the package referred to by the notification Handle The handle of the package list which contains the specified package. |
Handle | The HII handle. |
NotifyType | The type of change concerning the database. See EFI_HII_DATABASE_NOTIFY_TYPE. |
Definition at line 1784 of file Presentation.c.
VOID FreeDisplayFormData | ( | VOID | ) |
Free the Display form structure data.
Definition at line 856 of file Presentation.c.
VOID FreeHotkeyList | ( | VOID | ) |
Free the kotkey info saved in form data.
Definition at line 758 of file Presentation.c.
VOID FreeRefreshEvent | ( | VOID | ) |
Free the refresh event list.
Definition at line 137 of file Presentation.c.
VOID FreeStatementData | ( | LIST_ENTRY * | StatementList | ) |
Free the Display Statement structure data.
StatementList | Point to the statement list which need to be free. |
Definition at line 812 of file Presentation.c.
FORM_BROWSER_STATEMENT * GetBrowserStatement | ( | IN FORM_DISPLAY_ENGINE_STATEMENT * | DisplayStatement | ) |
Get FORM_BROWSER_STATEMENT from FORM_DISPLAY_ENGINE_STATEMENT based on the OpCode info.
DisplayStatement | The input FORM_DISPLAY_ENGINE_STATEMENT. |
FORM_BROWSER_STATEMENT | The return FORM_BROWSER_STATEMENT info. |
Definition at line 878 of file Presentation.c.
FORM_DISPLAY_ENGINE_STATEMENT * GetDisplayStatement | ( | IN EFI_IFR_OP_HEADER * | OpCode | ) |
Base on the opcode buffer info to get the display statement.
OpCode | The input opcode buffer for this statement. |
Statement | The statement use this opcode buffer. |
Definition at line 111 of file Presentation.c.
BOOLEAN GetFormsetGuidFromHiiHandle | ( | IN EFI_HII_HANDLE | HiiHandle, |
IN EFI_GUID * | FormSetGuid | ||
) |
Check whether the formset guid is in this Hii package list.
HiiHandle | The HiiHandle for this HII package list. |
FormSetGuid | The formset guid for the request formset. |
TRUE | Find the formset guid. |
FALSE | Not found the formset guid. |
Definition at line 1077 of file Presentation.c.
VOID InitializeDisplayFormData | ( | VOID | ) |
Initialize the Display form structure data.
Definition at line 727 of file Presentation.c.
VOID InitializeDisplayStatement | ( | IN OUT FORM_DISPLAY_ENGINE_STATEMENT * | DisplayStatement, |
IN FORM_BROWSER_STATEMENT * | Statement | ||
) |
Initialize the Display statement structure data.
DisplayStatement | Pointer to the display Statement data strucure. |
Statement | The statement need to check. |
Definition at line 302 of file Presentation.c.
BOOLEAN IsNvUpdateRequiredForForm | ( | IN FORM_BROWSER_FORM * | Form | ) |
Update the NvUpdateRequired flag for a form.
Form | Form data structure. |
Definition at line 1843 of file Presentation.c.
BOOLEAN IsNvUpdateRequiredForFormSet | ( | IN FORM_BROWSER_FORMSET * | FormSet | ) |
Update the NV flag info for this form set.
FormSet | FormSet data structure. |
Definition at line 1804 of file Presentation.c.
EFI_STATUS ProcessAction | ( | IN UINT32 | Action, |
IN UINT16 | DefaultId | ||
) |
Process the action request in user input.
Action | The user input action request info. |
DefaultId | The user input default Id info. |
EFI_SUCESSS | This function always return successfully for now. |
Definition at line 1011 of file Presentation.c.
EFI_STATUS ProcessCallBackFunction | ( | IN OUT UI_MENU_SELECTION * | Selection, |
IN FORM_BROWSER_FORMSET * | FormSet, | ||
IN FORM_BROWSER_FORM * | Form, | ||
IN FORM_BROWSER_STATEMENT * | Question, | ||
IN EFI_BROWSER_ACTION | Action, | ||
IN BOOLEAN | SkipSaveOrDiscard | ||
) |
Call the call back function for the question and process the return action.
Selection | On input, Selection tell setup browser the information about the Selection, form and formset to be displayed. On output, Selection return the screen item that is selected by user. |
FormSet | The formset this question belong to. |
Form | The form this question belong to. |
Question | The Question which need to call. |
Action | The action request. |
SkipSaveOrDiscard | Whether skip save or discard action. |
EFI_SUCCESS | The call back function executes successfully. |
Definition at line 1987 of file Presentation.c.
BOOLEAN ProcessChangedData | ( | IN OUT UI_MENU_SELECTION * | Selection, |
IN BROWSER_SETTING_SCOPE | Scope | ||
) |
check how to process the changed data in current form or form set.
Selection | On input, Selection tell setup browser the information about the Selection, form and formset to be displayed. On output, Selection return the screen item that is selected by user. |
Scope | Data save or discard scope, form or formset. |
TRUE | Success process the changed data, will return to the parent form. |
FALSE | Reject to process the changed data, will stay at current form. |
Definition at line 1291 of file Presentation.c.
EFI_STATUS ProcessGotoOpCode | ( | IN OUT FORM_BROWSER_STATEMENT * | Statement, |
IN OUT UI_MENU_SELECTION * | Selection | ||
) |
Process the goto op code, update the info in the selection structure.
Statement | The statement belong to goto op code. |
Selection | The selection info. |
EFI_SUCCESS | The menu process successfully. |
Definition at line 1369 of file Presentation.c.
EFI_STATUS ProcessQuestionConfig | ( | IN UI_MENU_SELECTION * | Selection, |
IN FORM_BROWSER_STATEMENT * | Question | ||
) |
Process Question Config.
Selection | The UI menu selection. |
Question | The Question to be peocessed. |
EFI_SUCCESS | Question Config process success. |
Other | Question Config process fail. |
Definition at line 1519 of file Presentation.c.
UINT32 ProcessQuestionExtraAttr | ( | IN EFI_QUESTION_ID | QuestionId | ) |
Get the extra question attribute from override question list.
QuestionId | The question id for this request question. |
The | attribute for this question or NULL if not found this question in the list. |
Definition at line 493 of file Presentation.c.
EFI_STATUS ProcessRetrieveForQuestion | ( | IN EFI_HII_CONFIG_ACCESS_PROTOCOL * | ConfigAccess, |
IN FORM_BROWSER_STATEMENT * | Statement, | ||
IN FORM_BROWSER_FORMSET * | FormSet | ||
) |
Call the retrieve type call back function for one question to get the initialize data.
This function only used when in the initialize stage, because in this stage, the Selection->Form is not ready. For other case, use the ProcessCallBackFunction instead.
ConfigAccess | The config access protocol produced by the hii driver. |
Statement | The Question which need to call. |
FormSet | The formset this question belong to. |
EFI_SUCCESS | The call back function executes successfully. |
Definition at line 2310 of file Presentation.c.
EFI_STATUS ProcessUserInput | ( | IN USER_INPUT * | UserInput | ) |
Process the user input data.
UserInput | The user input data. |
EFI_SUCESSS | This function always return successfully for now. |
Definition at line 1564 of file Presentation.c.
BOOLEAN ReconnectController | ( | IN EFI_HANDLE | DriverHandle | ) |
Reconnect the controller.
DriverHandle | The controller handle which need to be reconnect. |
TRUE | do the reconnect behavior success. |
FALSE | do the reconnect behavior failed. |
Definition at line 1956 of file Presentation.c.
Refresh the questions within this form.
Event | The event which has this function related. |
Context | The input context info related to this event or the status code return to the caller. |
Definition at line 216 of file Presentation.c.
Refresh the question which has refresh guid event attribute.
Event | The event which has this function related. |
Context | The input context info related to this event or the status code return to the caller. |
Definition at line 196 of file Presentation.c.
Process for the refresh interval statement.
Event | The Event need to be process |
Context | The context of the event. |
Definition at line 428 of file Presentation.c.
EFI_STATUS SetupBrowser | ( | IN OUT UI_MENU_SELECTION * | Selection | ) |
The worker function that send the displays to the screen. On output, the selection made by user is returned.
Selection | On input, Selection tell setup browser the information about the Selection, form and formset to be displayed. On output, Selection return the screen item that is selected by user. |
EFI_SUCCESS | The page is displayed successfully. |
Definition at line 2379 of file Presentation.c.
VOID UpdateDataChangedFlag | ( | VOID | ) |
Initialize the SettingChangedFlag variable in the display form.
Definition at line 673 of file Presentation.c.
VOID UpdateDisplayFormData | ( | VOID | ) |
Update the Display form structure data.
Definition at line 783 of file Presentation.c.
VOID UpdateHotkeyList | ( | VOID | ) |
Make a copy of the global hotkey info.
Definition at line 457 of file Presentation.c.
VOID UpdateStatement | ( | IN OUT FORM_BROWSER_STATEMENT * | Statement | ) |
Check whether this statement value is changed. If yes, update the statement value and return TRUE; else return FALSE.
Statement | The statement need to check. |
Definition at line 163 of file Presentation.c.
VOID UpdateStatementStatus | ( | IN FORM_BROWSER_FORMSET * | FormSet, |
IN FORM_BROWSER_FORM * | Form, | ||
IN BROWSER_SETTING_SCOPE | SettingScope | ||
) |
Update the ValueChanged status for questions.
FormSet | FormSet data structure. |
Form | Form data structure. |
SettingScope | Setting Scope for Default action. |
Definition at line 963 of file Presentation.c.
VOID UpdateStatementStatusForForm | ( | IN FORM_BROWSER_FORMSET * | FormSet, |
IN FORM_BROWSER_FORM * | Form | ||
) |
Update the ValueChanged status for questions in this form.
FormSet | FormSet data structure. |
Form | Form data structure. |
Definition at line 907 of file Presentation.c.
VOID UpdateStatementStatusForFormSet | ( | IN FORM_BROWSER_FORMSET * | FormSet | ) |
Update the ValueChanged status for questions in this formset.
FormSet | FormSet data structure. |
Definition at line 938 of file Presentation.c.
UI_MENU_SELECTION* gCurrentSelection |
Definition at line 13 of file Presentation.c.
FORM_DISPLAY_ENGINE_FORM gDisplayFormData |
Definition at line 22 of file Presentation.c.
UINT16 mCurFakeQestId |
Definition at line 21 of file Presentation.c.
UINT16 mCurrentFormId = 0 |
Definition at line 18 of file Presentation.c.
EFI_GUID mCurrentFormSetGuid |
Definition at line 15 of file Presentation.c.
EFI_HII_HANDLE mCurrentHiiHandle = NULL |
Definition at line 14 of file Presentation.c.
BOOLEAN mFinishRetrieveCall = FALSE |
Definition at line 23 of file Presentation.c.
BOOLEAN mHiiPackageListUpdated |
Definition at line 12 of file Presentation.c.
LIST_ENTRY mRefreshEventList = INITIALIZE_LIST_HEAD_VARIABLE (mRefreshEventList) |
Definition at line 20 of file Presentation.c.
Definition at line 19 of file Presentation.c.