TianoCore EDK2 master
|
#include "FormDisplay.h"
Go to the source code of this file.
Entry and initialization module for the browser.
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2014, Hewlett-Packard Development Company, L.P.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file FormDisplay.c.
UINTN AdjustDateAndTimePosition | ( | IN BOOLEAN | DirectionUp, |
IN OUT LIST_ENTRY ** | CurrentPosition | ||
) |
Adjust Data and Time position accordingly. Data format : [01/02/2004] [11:22:33] Line number : 0 0 1 0 0 1
This is an internal function.
DirectionUp | the up or down direction. False is down. True is up. |
CurrentPosition | Current position. On return: Point to the last Option (Year or Second) if up; Point to the first Option (Month or Hour) if down. |
Definition at line 1252 of file FormDisplay.c.
VOID BrowserStatusProcess | ( | VOID | ) |
Base on the browser status info to show an pop up message.
Definition at line 3909 of file FormDisplay.c.
VOID ConvertStatementToMenu | ( | VOID | ) |
Create the menu list base on the form data info.
Definition at line 766 of file FormDisplay.c.
VOID DisplayMenuString | ( | IN UI_MENU_OPTION * | MenuOption, |
IN UINTN | Col, | ||
IN UINTN | Row, | ||
IN CHAR16 * | String, | ||
IN UINTN | Width, | ||
IN BOOLEAN | Highlight | ||
) |
Print string for this menu option.
MenuOption | The menu opton which this attribut used to. |
Col | The column that this string will be print at. |
Row | The row that this string will be print at. |
String | The string which need to print. |
Width | The width need to print, if string is less than the width, the block space will be used. |
Highlight | Whether this menu will be highlight. |
Definition at line 2143 of file FormDisplay.c.
EFI_STATUS DisplayOneMenu | ( | IN UI_MENU_OPTION * | MenuOption, |
IN UINTN | SkipWidth, | ||
IN UINTN | BeginCol, | ||
IN UINTN | SkipLine, | ||
IN UINTN | BottomRow, | ||
IN BOOLEAN | Highlight, | ||
IN BOOLEAN | UpdateCol | ||
) |
Print string for this menu option.
MenuOption | The menu opton which this attribut used to. |
SkipWidth | The skip width between the left to the start of the prompt. |
BeginCol | The begin column for one menu. |
SkipLine | The skip line for this menu. |
BottomRow | The bottom row for this form. |
Highlight | Whether this menu will be highlight. |
UpdateCol | Whether need to update the column info for Date/Time. |
EFI_SUCESSS | Process the user selection success. |
Definition at line 2386 of file FormDisplay.c.
VOID EFIAPI DriverClearDisplayPage | ( | VOID | ) |
Clear Screen to the initial state.
Definition at line 4193 of file FormDisplay.c.
LIST_ENTRY * FindHighLightMenuOption | ( | IN FORM_DISPLAY_ENGINE_STATEMENT * | HighLightedStatement | ) |
Find the highlight menu.
If the input is NULL, base on the record highlight info in gHighligthMenuInfo to find the last highlight menu.
HighLightedStatement | The input highlight statement. |
The | highlight menu index. |
Definition at line 1678 of file FormDisplay.c.
VOID FindTopMenu | ( | IN FORM_DISPLAY_ENGINE_FORM * | FormData, |
OUT LIST_ENTRY ** | TopOfScreen, | ||
OUT LIST_ENTRY ** | HighlightMenu, | ||
OUT UINTN * | SkipValue | ||
) |
Find the first menu which will be show at the top.
FormData | The data info for this form. |
TopOfScreen | The link_entry pointer to top menu. |
HighlightMenu | The menu which will be highlight. |
SkipValue | The skip value for the top menu. |
Definition at line 1857 of file FormDisplay.c.
LIST_ENTRY * FindTopOfScreenMenu | ( | IN LIST_ENTRY * | CurPos, |
IN UINTN | Rows, | ||
OUT UINTN * | SkipValue | ||
) |
Find the top of screen menu base on the current menu.
CurPos | Current input menu. |
Rows | Totol screen rows. |
SkipValue | SkipValue for this new form. |
TopOfScreen | Top of screen menu for the new form. |
Definition at line 1525 of file FormDisplay.c.
LIST_ENTRY * FindTopOfScreenMenuOption | ( | IN LIST_ENTRY * | HighLightMenu | ) |
Find the top of screen menu base on the previous record menu info.
HighLightMenu | The link_entry pointer to highlight menu. |
Return | the the link_entry pointer top of screen menu. |
Definition at line 1800 of file FormDisplay.c.
EFI_STATUS EFIAPI FormDisplay | ( | IN FORM_DISPLAY_ENGINE_FORM * | FormData, |
OUT USER_INPUT * | UserInputData | ||
) |
Display one form, and return user input.
FormData | Form Data to be shown. |
UserInputData | User input data. |
EFI_SUCCESS | 1.Form Data is shown, and user input is got. 2.Error info has show and return. |
EFI_INVALID_PARAMETER | The input screen dimension is not valid |
EFI_NOT_FOUND | New form data has some error. |
Definition at line 4111 of file FormDisplay.c.
VOID FreeDisplayStrings | ( | VOID | ) |
Free up the resource allocated for all strings required by Setup Browser.
Definition at line 275 of file FormDisplay.c.
VOID FreeMenuOptionData | ( | LIST_ENTRY * | MenuOptionList | ) |
Free the UI Menu Option structure data.
MenuOptionList | Point to the menu option list which need to be free. |
Definition at line 3881 of file FormDisplay.c.
BOOLEAN FxConfirmPopup | ( | IN UINT32 | Action | ) |
Double confirm with user about the action.
Action | The user input action. |
TRUE | User confirm with the input or not need user confirm. |
FALSE | User want ignore this input. |
Definition at line 2237 of file FormDisplay.c.
UINTN GetDistanceBetweenMenus | ( | IN LIST_ENTRY * | StartMenu, |
IN LIST_ENTRY * | EndMenu | ||
) |
Calculate the distance between two menus and include the skip value of StartMenu.
StartMenu | The link_entry pointer to start menu. |
EndMenu | The link_entry pointer to end menu. |
Definition at line 1766 of file FormDisplay.c.
UINT64 GetFieldFromNum | ( | IN EFI_IFR_OP_HEADER * | OpCode | ) |
Get step info from numeric opcode.
[in] | OpCode | The input numeric op code. |
Definition at line 1317 of file FormDisplay.c.
BROWSER_HOT_KEY * GetHotKeyFromRegisterList | ( | IN EFI_INPUT_KEY * | KeyData | ) |
Find the registered HotKey based on KeyData.
[in] | KeyData | A pointer to a buffer that describes the keystroke information for the hot key. |
Definition at line 1360 of file FormDisplay.c.
UINTN GetIndexInfoForOpcode | ( | IN EFI_IFR_OP_HEADER * | OpCode | ) |
Get the index info for this opcode.
OpCode | The input opcode for the statement. |
The | index of this statement. |
Definition at line 1576 of file FormDisplay.c.
UINT16 GetLineByWidth | ( | IN CHAR16 * | InputString, |
IN UINT16 | LineWidth, | ||
IN OUT UINT16 * | GlyphWidth, | ||
IN OUT UINTN * | Index, | ||
OUT CHAR16 ** | OutputString | ||
) |
Will copy LineWidth amount of a string in the OutputString buffer and return the number of CHAR16 characters that were copied into the OutputString buffer. The output string format is: Glyph Info + String info + '\0'.
In the code, it deals \r,
,\r
same as
\r, also it not process the \r or \g.
InputString | String description for this option. |
LineWidth | Width of the desired string to extract in CHAR16 characters |
GlyphWidth | The glyph width of the begin of the char in the string. |
Index | Where in InputString to start the copy process |
OutputString | Buffer to copy the string into |
Definition at line 464 of file FormDisplay.c.
EFI_STRING_ID GetPrompt | ( | IN EFI_IFR_OP_HEADER * | OpCode | ) |
Get prompt string id from the opcode data buffer.
OpCode | The input opcode buffer. |
Definition at line 341 of file FormDisplay.c.
EFI_QUESTION_ID GetQuestionIdInfo | ( | IN EFI_IFR_OP_HEADER * | OpCode | ) |
Get question id info from the input opcode header.
OpCode | The input opcode header pointer. |
The | question id for this opcode. |
Definition at line 1499 of file FormDisplay.c.
Count the storage space of a Unicode string.
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 hit, then 2 Unicode character will consume an output storage space with size of CHAR16 till a NARROW_CHAR is hit.
If String is NULL, then ASSERT ().
String | The input string to be counted. |
Definition at line 830 of file FormDisplay.c.
CHAR16 * GetToken | ( | IN EFI_STRING_ID | Token, |
IN EFI_HII_HANDLE | HiiHandle | ||
) |
Get the string based on the StringId and HII Package List Handle.
Token | The String's ID. |
HiiHandle | The package list in the HII database to search for the specified string. |
Definition at line 191 of file FormDisplay.c.
UINT16 GetWidth | ( | IN UI_MENU_OPTION * | MenuOption, |
OUT UINT16 * | AdjustWidth | ||
) |
Get the supported width for a particular op-code
MenuOption | The menu option. |
AdjustWidth | The width which is saved for the space. |
Definition at line 366 of file FormDisplay.c.
BOOLEAN HasOptionString | ( | IN UI_MENU_OPTION * | MenuOption | ) |
Check whether this menu can has option string.
MenuOption | The menu opton which this attribut used to. |
TRUE | This menu option can have option string. |
FALSE | This menu option can't have option string. |
Definition at line 2186 of file FormDisplay.c.
EFI_STATUS EFIAPI InitializeDisplayEngine | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Initialize Setup Browser driver.
ImageHandle | The image handle. |
SystemTable | The system table. |
EFI_SUCCESS | The Setup Browser module is initialized correctly.. |
Definition at line 4236 of file FormDisplay.c.
VOID InitializeDisplayStrings | ( | VOID | ) |
Initialize the HII String Token to the correct values.
Definition at line 212 of file FormDisplay.c.
BOOLEAN IsHighLightMenuOption | ( | IN UI_MENU_OPTION * | MenuOption | ) |
Is this the highlight menu.
MenuOption | The input Menu option. |
TRUE | This is the highlight menu option. |
FALSE | This is not the highlight menu option. |
Definition at line 1645 of file FormDisplay.c.
BOOLEAN IsSavedHighlightStatement | ( | IN FORM_DISPLAY_ENGINE_STATEMENT * | HighLightedStatement | ) |
Is this the saved highlight statement.
HighLightedStatement | The input highlight statement. |
TRUE | This is the highlight statement. |
FALSE | This is not the highlight statement. |
Definition at line 1612 of file FormDisplay.c.
BOOLEAN IsSelectable | ( | UI_MENU_OPTION * | MenuOption | ) |
Check whether this Menu Option could be highlighted.
This is an internal function.
MenuOption | The MenuOption to be checked. |
TRUE | This Menu Option is selectable. |
FALSE | This Menu Option could not be selected. |
Definition at line 1025 of file FormDisplay.c.
BOOLEAN IsTopOfScreeMenuOption | ( | IN UI_MENU_OPTION * | MenuOption | ) |
Is this the Top of screen menu.
MenuOption | The input Menu option. |
TRUE | This is the Top of screen menu option. |
FALSE | This is not the Top of screen menu option. |
Definition at line 1739 of file FormDisplay.c.
INTN MoveToNextStatement | ( | IN BOOLEAN | GoUp, |
IN OUT LIST_ENTRY ** | CurrentPosition, | ||
IN UINTN | GapToTop, | ||
IN BOOLEAN | FindInForm | ||
) |
Move to next selectable statement.
This is an internal function.
GoUp | The navigation direction. TRUE: up, FALSE: down. |
CurrentPosition | Current position. |
GapToTop | Gap position to top or bottom. |
FindInForm | Whether find menu in current form or beyond. |
-1 | Reach the begin of the menu, still can't find the selectable menu. |
Value | Find the selectable menu, maybe the truly selectable, maybe the first menu showing beyond current form or last menu showing in current form. The value is the line number between the new selected menu and the current select menu, not include the new selected menu. |
Definition at line 1059 of file FormDisplay.c.
BOOLEAN PrintableMenu | ( | UI_MENU_OPTION * | MenuOption | ) |
Check whether this Menu Option could be print.
Check Prompt string, option string or text two string not NULL.
This is an internal function.
MenuOption | The MenuOption to be checked. |
TRUE | This Menu Option is printable. |
FALSE | This Menu Option could not be printable. |
Definition at line 978 of file FormDisplay.c.
VOID ProcessStringForDateTime | ( | UI_MENU_OPTION * | MenuOption, |
CHAR16 * | OptionString, | ||
BOOLEAN | AddOptCol | ||
) |
Process option string for date/time opcode.
MenuOption | Menu option point to date/time. |
OptionString | Option string input for process. |
AddOptCol | Whether need to update MenuOption->OptCol. |
Definition at line 1136 of file FormDisplay.c.
VOID SetDisplayAttribute | ( | IN UI_MENU_OPTION * | MenuOption, |
IN BOOLEAN | Highlight | ||
) |
Update attribut for this menu.
MenuOption | The menu opton which this attribut used to. |
Highlight | Whether this menu will be highlight. |
Definition at line 2105 of file FormDisplay.c.
Set Buffer to Value for Size bytes.
Buffer | Memory to set. |
Size | Number of bytes to set |
Value | Value of the set operation. |
Definition at line 4210 of file FormDisplay.c.
VOID UiAddMenuOption | ( | IN FORM_DISPLAY_ENGINE_STATEMENT * | Statement, |
IN UINT16 * | MenuItemCount, | ||
IN BOOLEAN | NestIn | ||
) |
Add one menu option by specified description and context.
Statement | Statement of this Menu Option. |
MenuItemCount | The index for this Option in the Menu. |
NestIn | Whether this statement is nest in another statement. |
Definition at line 627 of file FormDisplay.c.
EFI_STATUS UiDisplayMenu | ( | IN FORM_DISPLAY_ENGINE_FORM * | FormData | ) |
Display menu and wait for user to select one menu option, then return it. If AutoBoot is enabled, then if user doesn't select any option, after period of time, it will automatically return the first menu option.
FormData | The current form data info. |
EFI_SUCESSS | Process the user selection success. |
EFI_NOT_FOUND | Process option string for orderedlist/Oneof fail. |
Definition at line 2634 of file FormDisplay.c.
Wait for a given event to fire, or for an optional timeout to expire.
Event | The event to wait for |
UI_EVENT_TYPE | The type of the event which is trigged. |
Definition at line 1419 of file FormDisplay.c.
EFI_STATUS EFIAPI UnloadDisplayEngine | ( | IN EFI_HANDLE | ImageHandle | ) |
This is the default unload handle for display core drivers.
[in] | ImageHandle | The drivers' driver image. |
EFI_SUCCESS | The image is unloaded. |
Others | Failed to unload the image. |
Definition at line 4320 of file FormDisplay.c.
VOID UpdateHighlightMenuInfo | ( | IN LIST_ENTRY * | Highlight, |
IN LIST_ENTRY * | TopOfScreen, | ||
IN UINTN | SkipValue | ||
) |
Record the highlight menu and top of screen menu info.
Highlight | The menu opton which is highlight. |
TopOfScreen | The menu opton which is at the top of the form. |
SkipValue | The skip line info for the top of screen menu. |
Definition at line 2023 of file FormDisplay.c.
VOID UpdateOptionSkipLines | ( | IN UI_MENU_OPTION * | MenuOption | ) |
Update display lines for a Menu Option.
MenuOption | The MenuOption to be checked. |
Definition at line 938 of file FormDisplay.c.
VOID UpdateSkipInfoForMenu | ( | IN UI_MENU_OPTION * | MenuOption, |
IN CHAR16 * | OptionString | ||
) |
Base on the input option string to update the skip value for a menu option.
MenuOption | The MenuOption to be checked. |
OptionString | The input option string. |
Definition at line 900 of file FormDisplay.c.
BOOLEAN ValueIsScroll | ( | IN BOOLEAN | Direction, |
IN LIST_ENTRY * | CurrentPos | ||
) |
Determine if the menu is the last menu that can be selected.
This is an internal function.
Direction | The scroll direction. False is down. True is up. |
CurrentPos | The current focus. |
Definition at line 1394 of file FormDisplay.c.
CHAR16* gBrowserError |
Definition at line 116 of file FormDisplay.c.
CHAR16* gCancelOption |
Definition at line 153 of file FormDisplay.c.
CHAR16* gChangesOpt |
Definition at line 113 of file FormDisplay.c.
CHAR16* gCheckError |
Definition at line 123 of file FormDisplay.c.
CHAR16* gConfirmDefaultMsg |
Definition at line 136 of file FormDisplay.c.
CHAR16* gConfirmDefaultMsg2nd |
Definition at line 142 of file FormDisplay.c.
CHAR16* gConfirmDiscardMsg |
Definition at line 138 of file FormDisplay.c.
CHAR16* gConfirmError |
Definition at line 128 of file FormDisplay.c.
CHAR16* gConfirmExitMsg |
Definition at line 140 of file FormDisplay.c.
CHAR16* gConfirmExitMsg2nd |
Definition at line 144 of file FormDisplay.c.
CHAR16* gConfirmMsgConnect |
Definition at line 157 of file FormDisplay.c.
CHAR16* gConfirmMsgEnd |
Definition at line 158 of file FormDisplay.c.
CHAR16* gConfirmOpt |
Definition at line 145 of file FormDisplay.c.
CHAR16* gConfirmOptCancel |
Definition at line 149 of file FormDisplay.c.
CHAR16* gConfirmOptNo |
Definition at line 147 of file FormDisplay.c.
CHAR16* gConfirmOptOk |
Definition at line 148 of file FormDisplay.c.
CHAR16* gConfirmOptYes |
Definition at line 146 of file FormDisplay.c.
CHAR16* gConfirmPassword |
Definition at line 127 of file FormDisplay.c.
CHAR16* gConfirmResetMsg |
Definition at line 139 of file FormDisplay.c.
CHAR16* gConfirmResetMsg2nd |
Definition at line 143 of file FormDisplay.c.
CHAR16* gConfirmSubmitMsg |
Definition at line 137 of file FormDisplay.c.
CHAR16* gConfirmSubmitMsg2nd |
Definition at line 141 of file FormDisplay.c.
UINT16 gDirection |
Definition at line 101 of file FormDisplay.c.
CHAR16* gDiscardChange |
Definition at line 121 of file FormDisplay.c.
EFI_GUID gDisplayEngineGuid |
Definition at line 91 of file FormDisplay.c.
CHAR16* gEmptyString |
Definition at line 131 of file FormDisplay.c.
CHAR16* gErrorPopup |
Definition at line 154 of file FormDisplay.c.
FORM_DISPLAY_ENGINE_FORM* gFormData |
Definition at line 99 of file FormDisplay.c.
CHAR16* gFormNotFound |
Definition at line 114 of file FormDisplay.c.
CHAR16* gFormSuppress |
Definition at line 134 of file FormDisplay.c.
CHAR16 gHelpBlockWidth |
Definition at line 163 of file FormDisplay.c.
DISPLAY_HIGHLIGHT_MENU_INFO gHighligthMenuInfo = { 0 } |
Definition at line 103 of file FormDisplay.c.
EFI_HII_HANDLE gHiiHandle |
Definition at line 100 of file FormDisplay.c.
CHAR16* gInfoPopup |
Definition at line 156 of file FormDisplay.c.
CHAR16* gJumpToFormSet |
Definition at line 122 of file FormDisplay.c.
LIST_ENTRY gMenuOption |
Definition at line 102 of file FormDisplay.c.
CHAR16* gMiniString |
Definition at line 132 of file FormDisplay.c.
BOOLEAN gMisMatch |
Definition at line 95 of file FormDisplay.c.
CHAR16 gModalSkipColumn |
Definition at line 160 of file FormDisplay.c.
CHAR16* gNoOption |
Definition at line 151 of file FormDisplay.c.
CHAR16* gNoSubmitIf |
Definition at line 115 of file FormDisplay.c.
CHAR16* gNoSubmitIfFailed |
Definition at line 118 of file FormDisplay.c.
CHAR16* gOkOption |
Definition at line 152 of file FormDisplay.c.
FORM_ENTRY_INFO gOldFormEntry = { 0 } |
Definition at line 105 of file FormDisplay.c.
CHAR16 gOptionBlockWidth |
Definition at line 162 of file FormDisplay.c.
CHAR16* gOptionMismatch |
Definition at line 133 of file FormDisplay.c.
CHAR16* gPassowordInvalid |
Definition at line 129 of file FormDisplay.c.
CHAR16* gPasswordUnsupported |
Definition at line 159 of file FormDisplay.c.
CHAR16* gPressEnter |
Definition at line 130 of file FormDisplay.c.
CHAR16 gPromptBlockWidth |
Definition at line 161 of file FormDisplay.c.
CHAR16* gPromptForData |
Definition at line 124 of file FormDisplay.c.
CHAR16* gPromptForNewPassword |
Definition at line 126 of file FormDisplay.c.
CHAR16* gPromptForPassword |
Definition at line 125 of file FormDisplay.c.
CHAR16* gProtocolNotFound |
Definition at line 135 of file FormDisplay.c.
CHAR16* gReconnectConfirmChanges |
Definition at line 110 of file FormDisplay.c.
CHAR16* gReconnectFail |
Definition at line 111 of file FormDisplay.c.
CHAR16* gReconnectRequired |
Definition at line 112 of file FormDisplay.c.
CHAR16* gSaveFailed |
Definition at line 117 of file FormDisplay.c.
CHAR16* gSaveNoSubmitProcess |
Definition at line 120 of file FormDisplay.c.
CHAR16* gSaveProcess |
Definition at line 119 of file FormDisplay.c.
SCAN_CODE_TO_SCREEN_OPERATION gScanCodeToOperation[] |
Definition at line 15 of file FormDisplay.c.
SCREEN_OPERATION_T0_CONTROL_FLAG gScreenOperationToControlFlag[] |
Definition at line 48 of file FormDisplay.c.
EFI_SCREEN_DESCRIPTOR gStatementDimensions |
Definition at line 96 of file FormDisplay.c.
USER_INPUT* gUserInput |
Definition at line 98 of file FormDisplay.c.
CHAR16* gWarningPopup |
Definition at line 155 of file FormDisplay.c.
CHAR16* gYesOption |
Definition at line 150 of file FormDisplay.c.
BOOLEAN mIsFirstForm = TRUE |
Definition at line 104 of file FormDisplay.c.
FORM_DISPLAY_DRIVER_PRIVATE_DATA mPrivateData |
Definition at line 166 of file FormDisplay.c.
UINTN mScanCodeNumber = ARRAY_SIZE (gScanCodeToOperation) |
Definition at line 46 of file FormDisplay.c.
BOOLEAN mStatementLayoutIsChanged = TRUE |
Definition at line 97 of file FormDisplay.c.
CHAR16* mUnknownString |
Definition at line 164 of file FormDisplay.c.