TianoCore EDK2 master
Loading...
Searching...
No Matches
FormDisplay.c File Reference
#include "FormDisplay.h"

Go to the source code of this file.

Functions

CHAR16 * GetToken (IN EFI_STRING_ID Token, IN EFI_HII_HANDLE HiiHandle)
 
VOID InitializeDisplayStrings (VOID)
 
VOID FreeDisplayStrings (VOID)
 
EFI_STRING_ID GetPrompt (IN EFI_IFR_OP_HEADER *OpCode)
 
UINT16 GetWidth (IN UI_MENU_OPTION *MenuOption, OUT UINT16 *AdjustWidth)
 
UINT16 GetLineByWidth (IN CHAR16 *InputString, IN UINT16 LineWidth, IN OUT UINT16 *GlyphWidth, IN OUT UINTN *Index, OUT CHAR16 **OutputString)
 
VOID UiAddMenuOption (IN FORM_DISPLAY_ENGINE_STATEMENT *Statement, IN UINT16 *MenuItemCount, IN BOOLEAN NestIn)
 
VOID ConvertStatementToMenu (VOID)
 
UINTN GetStringWidth (IN CHAR16 *String)
 
VOID UpdateSkipInfoForMenu (IN UI_MENU_OPTION *MenuOption, IN CHAR16 *OptionString)
 
VOID UpdateOptionSkipLines (IN UI_MENU_OPTION *MenuOption)
 
BOOLEAN PrintableMenu (UI_MENU_OPTION *MenuOption)
 
BOOLEAN IsSelectable (UI_MENU_OPTION *MenuOption)
 
INTN MoveToNextStatement (IN BOOLEAN GoUp, IN OUT LIST_ENTRY **CurrentPosition, IN UINTN GapToTop, IN BOOLEAN FindInForm)
 
VOID ProcessStringForDateTime (UI_MENU_OPTION *MenuOption, CHAR16 *OptionString, BOOLEAN AddOptCol)
 
UINTN AdjustDateAndTimePosition (IN BOOLEAN DirectionUp, IN OUT LIST_ENTRY **CurrentPosition)
 
UINT64 GetFieldFromNum (IN EFI_IFR_OP_HEADER *OpCode)
 
BROWSER_HOT_KEYGetHotKeyFromRegisterList (IN EFI_INPUT_KEY *KeyData)
 
BOOLEAN ValueIsScroll (IN BOOLEAN Direction, IN LIST_ENTRY *CurrentPos)
 
UI_EVENT_TYPE UiWaitForEvent (IN EFI_EVENT Event)
 
EFI_QUESTION_ID GetQuestionIdInfo (IN EFI_IFR_OP_HEADER *OpCode)
 
LIST_ENTRYFindTopOfScreenMenu (IN LIST_ENTRY *CurPos, IN UINTN Rows, OUT UINTN *SkipValue)
 
UINTN GetIndexInfoForOpcode (IN EFI_IFR_OP_HEADER *OpCode)
 
BOOLEAN IsSavedHighlightStatement (IN FORM_DISPLAY_ENGINE_STATEMENT *HighLightedStatement)
 
BOOLEAN IsHighLightMenuOption (IN UI_MENU_OPTION *MenuOption)
 
LIST_ENTRYFindHighLightMenuOption (IN FORM_DISPLAY_ENGINE_STATEMENT *HighLightedStatement)
 
BOOLEAN IsTopOfScreeMenuOption (IN UI_MENU_OPTION *MenuOption)
 
UINTN GetDistanceBetweenMenus (IN LIST_ENTRY *StartMenu, IN LIST_ENTRY *EndMenu)
 
LIST_ENTRYFindTopOfScreenMenuOption (IN LIST_ENTRY *HighLightMenu)
 
VOID FindTopMenu (IN FORM_DISPLAY_ENGINE_FORM *FormData, OUT LIST_ENTRY **TopOfScreen, OUT LIST_ENTRY **HighlightMenu, OUT UINTN *SkipValue)
 
VOID UpdateHighlightMenuInfo (IN LIST_ENTRY *Highlight, IN LIST_ENTRY *TopOfScreen, IN UINTN SkipValue)
 
VOID SetDisplayAttribute (IN UI_MENU_OPTION *MenuOption, IN BOOLEAN Highlight)
 
VOID DisplayMenuString (IN UI_MENU_OPTION *MenuOption, IN UINTN Col, IN UINTN Row, IN CHAR16 *String, IN UINTN Width, IN BOOLEAN Highlight)
 
BOOLEAN HasOptionString (IN UI_MENU_OPTION *MenuOption)
 
BOOLEAN FxConfirmPopup (IN UINT32 Action)
 
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)
 
EFI_STATUS UiDisplayMenu (IN FORM_DISPLAY_ENGINE_FORM *FormData)
 
VOID FreeMenuOptionData (LIST_ENTRY *MenuOptionList)
 
VOID BrowserStatusProcess (VOID)
 
EFI_STATUS EFIAPI FormDisplay (IN FORM_DISPLAY_ENGINE_FORM *FormData, OUT USER_INPUT *UserInputData)
 
VOID EFIAPI DriverClearDisplayPage (VOID)
 
VOID SetUnicodeMem (IN VOID *Buffer, IN UINTN Size, IN CHAR16 Value)
 
EFI_STATUS EFIAPI InitializeDisplayEngine (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 
EFI_STATUS EFIAPI UnloadDisplayEngine (IN EFI_HANDLE ImageHandle)
 

Variables

SCAN_CODE_TO_SCREEN_OPERATION gScanCodeToOperation []
 
UINTN mScanCodeNumber = ARRAY_SIZE (gScanCodeToOperation)
 
SCREEN_OPERATION_T0_CONTROL_FLAG gScreenOperationToControlFlag []
 
EFI_GUID gDisplayEngineGuid
 
BOOLEAN gMisMatch
 
EFI_SCREEN_DESCRIPTOR gStatementDimensions
 
BOOLEAN mStatementLayoutIsChanged = TRUE
 
USER_INPUTgUserInput
 
FORM_DISPLAY_ENGINE_FORMgFormData
 
EFI_HII_HANDLE gHiiHandle
 
UINT16 gDirection
 
LIST_ENTRY gMenuOption
 
DISPLAY_HIGHLIGHT_MENU_INFO gHighligthMenuInfo = { 0 }
 
BOOLEAN mIsFirstForm = TRUE
 
FORM_ENTRY_INFO gOldFormEntry = { 0 }
 
CHAR16 * gReconnectConfirmChanges
 
CHAR16 * gReconnectFail
 
CHAR16 * gReconnectRequired
 
CHAR16 * gChangesOpt
 
CHAR16 * gFormNotFound
 
CHAR16 * gNoSubmitIf
 
CHAR16 * gBrowserError
 
CHAR16 * gSaveFailed
 
CHAR16 * gNoSubmitIfFailed
 
CHAR16 * gSaveProcess
 
CHAR16 * gSaveNoSubmitProcess
 
CHAR16 * gDiscardChange
 
CHAR16 * gJumpToFormSet
 
CHAR16 * gCheckError
 
CHAR16 * gPromptForData
 
CHAR16 * gPromptForPassword
 
CHAR16 * gPromptForNewPassword
 
CHAR16 * gConfirmPassword
 
CHAR16 * gConfirmError
 
CHAR16 * gPassowordInvalid
 
CHAR16 * gPressEnter
 
CHAR16 * gEmptyString
 
CHAR16 * gMiniString
 
CHAR16 * gOptionMismatch
 
CHAR16 * gFormSuppress
 
CHAR16 * gProtocolNotFound
 
CHAR16 * gConfirmDefaultMsg
 
CHAR16 * gConfirmSubmitMsg
 
CHAR16 * gConfirmDiscardMsg
 
CHAR16 * gConfirmResetMsg
 
CHAR16 * gConfirmExitMsg
 
CHAR16 * gConfirmSubmitMsg2nd
 
CHAR16 * gConfirmDefaultMsg2nd
 
CHAR16 * gConfirmResetMsg2nd
 
CHAR16 * gConfirmExitMsg2nd
 
CHAR16 * gConfirmOpt
 
CHAR16 * gConfirmOptYes
 
CHAR16 * gConfirmOptNo
 
CHAR16 * gConfirmOptOk
 
CHAR16 * gConfirmOptCancel
 
CHAR16 * gYesOption
 
CHAR16 * gNoOption
 
CHAR16 * gOkOption
 
CHAR16 * gCancelOption
 
CHAR16 * gErrorPopup
 
CHAR16 * gWarningPopup
 
CHAR16 * gInfoPopup
 
CHAR16 * gConfirmMsgConnect
 
CHAR16 * gConfirmMsgEnd
 
CHAR16 * gPasswordUnsupported
 
CHAR16 gModalSkipColumn
 
CHAR16 gPromptBlockWidth
 
CHAR16 gOptionBlockWidth
 
CHAR16 gHelpBlockWidth
 
CHAR16 * mUnknownString
 
FORM_DISPLAY_DRIVER_PRIVATE_DATA mPrivateData
 

Detailed Description

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.

Function Documentation

◆ AdjustDateAndTimePosition()

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.

Parameters
DirectionUpthe up or down direction. False is down. True is up.
CurrentPositionCurrent position. On return: Point to the last Option (Year or Second) if up; Point to the first Option (Month or Hour) if down.
Returns
Return line number to pad. It is possible that we stand on a zero-advance
data or time opcode, so pad one line when we judge if we are going to scroll outside.

Definition at line 1252 of file FormDisplay.c.

◆ BrowserStatusProcess()

VOID BrowserStatusProcess ( VOID  )

Base on the browser status info to show an pop up message.

Definition at line 3909 of file FormDisplay.c.

◆ ConvertStatementToMenu()

VOID ConvertStatementToMenu ( VOID  )

Create the menu list base on the form data info.

Definition at line 766 of file FormDisplay.c.

◆ DisplayMenuString()

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.

Parameters
MenuOptionThe menu opton which this attribut used to.
ColThe column that this string will be print at.
RowThe row that this string will be print at.
StringThe string which need to print.
WidthThe width need to print, if string is less than the width, the block space will be used.
HighlightWhether this menu will be highlight.

Definition at line 2143 of file FormDisplay.c.

◆ DisplayOneMenu()

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.

Parameters
MenuOptionThe menu opton which this attribut used to.
SkipWidthThe skip width between the left to the start of the prompt.
BeginColThe begin column for one menu.
SkipLineThe skip line for this menu.
BottomRowThe bottom row for this form.
HighlightWhether this menu will be highlight.
UpdateColWhether need to update the column info for Date/Time.
Return values
EFI_SUCESSSProcess the user selection success.

Definition at line 2386 of file FormDisplay.c.

◆ DriverClearDisplayPage()

VOID EFIAPI DriverClearDisplayPage ( VOID  )

Clear Screen to the initial state.

Definition at line 4193 of file FormDisplay.c.

◆ FindHighLightMenuOption()

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.

Parameters
HighLightedStatementThe input highlight statement.
Return values
Thehighlight menu index.

Definition at line 1678 of file FormDisplay.c.

◆ FindTopMenu()

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.

Parameters
FormDataThe data info for this form.
TopOfScreenThe link_entry pointer to top menu.
HighlightMenuThe menu which will be highlight.
SkipValueThe skip value for the top menu.

Definition at line 1857 of file FormDisplay.c.

◆ FindTopOfScreenMenu()

LIST_ENTRY * FindTopOfScreenMenu ( IN LIST_ENTRY CurPos,
IN UINTN  Rows,
OUT UINTN SkipValue 
)

Find the top of screen menu base on the current menu.

Parameters
CurPosCurrent input menu.
RowsTotol screen rows.
SkipValueSkipValue for this new form.
Return values
TopOfScreenTop of screen menu for the new form.

Definition at line 1525 of file FormDisplay.c.

◆ FindTopOfScreenMenuOption()

LIST_ENTRY * FindTopOfScreenMenuOption ( IN LIST_ENTRY HighLightMenu)

Find the top of screen menu base on the previous record menu info.

Parameters
HighLightMenuThe link_entry pointer to highlight menu.
Return values
Returnthe the link_entry pointer top of screen menu.

Definition at line 1800 of file FormDisplay.c.

◆ FormDisplay()

EFI_STATUS EFIAPI FormDisplay ( IN FORM_DISPLAY_ENGINE_FORM FormData,
OUT USER_INPUT UserInputData 
)

Display one form, and return user input.

Parameters
FormDataForm Data to be shown.
UserInputDataUser input data.
Return values
EFI_SUCCESS1.Form Data is shown, and user input is got. 2.Error info has show and return.
EFI_INVALID_PARAMETERThe input screen dimension is not valid
EFI_NOT_FOUNDNew form data has some error.

Definition at line 4111 of file FormDisplay.c.

◆ FreeDisplayStrings()

VOID FreeDisplayStrings ( VOID  )

Free up the resource allocated for all strings required by Setup Browser.

Definition at line 275 of file FormDisplay.c.

◆ FreeMenuOptionData()

VOID FreeMenuOptionData ( LIST_ENTRY MenuOptionList)

Free the UI Menu Option structure data.

Parameters
MenuOptionListPoint to the menu option list which need to be free.

Definition at line 3881 of file FormDisplay.c.

◆ FxConfirmPopup()

BOOLEAN FxConfirmPopup ( IN UINT32  Action)

Double confirm with user about the action.

Parameters
ActionThe user input action.
Return values
TRUEUser confirm with the input or not need user confirm.
FALSEUser want ignore this input.

Definition at line 2237 of file FormDisplay.c.

◆ GetDistanceBetweenMenus()

UINTN GetDistanceBetweenMenus ( IN LIST_ENTRY StartMenu,
IN LIST_ENTRY EndMenu 
)

Calculate the distance between two menus and include the skip value of StartMenu.

Parameters
StartMenuThe link_entry pointer to start menu.
EndMenuThe link_entry pointer to end menu.

Definition at line 1766 of file FormDisplay.c.

◆ GetFieldFromNum()

UINT64 GetFieldFromNum ( IN EFI_IFR_OP_HEADER OpCode)

Get step info from numeric opcode.

Parameters
[in]OpCodeThe input numeric op code.
Returns
step info for this opcode.

Definition at line 1317 of file FormDisplay.c.

◆ GetHotKeyFromRegisterList()

BROWSER_HOT_KEY * GetHotKeyFromRegisterList ( IN EFI_INPUT_KEY KeyData)

Find the registered HotKey based on KeyData.

Parameters
[in]KeyDataA pointer to a buffer that describes the keystroke information for the hot key.
Returns
The registered HotKey context. If no found, NULL will return.

Definition at line 1360 of file FormDisplay.c.

◆ GetIndexInfoForOpcode()

UINTN GetIndexInfoForOpcode ( IN EFI_IFR_OP_HEADER OpCode)

Get the index info for this opcode.

Parameters
OpCodeThe input opcode for the statement.
Return values
Theindex of this statement.

Definition at line 1576 of file FormDisplay.c.

◆ GetLineByWidth()

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.

Parameters
InputStringString description for this option.
LineWidthWidth of the desired string to extract in CHAR16 characters
GlyphWidthThe glyph width of the begin of the char in the string.
IndexWhere in InputString to start the copy process
OutputStringBuffer to copy the string into
Returns
Returns the number of CHAR16 characters that were copied into the OutputString buffer, include extra glyph info and '\0' info.

Definition at line 464 of file FormDisplay.c.

◆ GetPrompt()

EFI_STRING_ID GetPrompt ( IN EFI_IFR_OP_HEADER OpCode)

Get prompt string id from the opcode data buffer.

Parameters
OpCodeThe input opcode buffer.
Returns
The prompt string id.

Definition at line 341 of file FormDisplay.c.

◆ GetQuestionIdInfo()

EFI_QUESTION_ID GetQuestionIdInfo ( IN EFI_IFR_OP_HEADER OpCode)

Get question id info from the input opcode header.

Parameters
OpCodeThe input opcode header pointer.
Return values
Thequestion id for this opcode.

Definition at line 1499 of file FormDisplay.c.

◆ GetStringWidth()

UINTN GetStringWidth ( IN CHAR16 *  String)

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 ().

Parameters
StringThe input string to be counted.
Returns
Storage space for the input string.

Definition at line 830 of file FormDisplay.c.

◆ GetToken()

CHAR16 * GetToken ( IN EFI_STRING_ID  Token,
IN EFI_HII_HANDLE  HiiHandle 
)

Get the string based on the StringId and HII Package List Handle.

Parameters
TokenThe String's ID.
HiiHandleThe package list in the HII database to search for the specified string.
Returns
The output string.

Definition at line 191 of file FormDisplay.c.

◆ GetWidth()

UINT16 GetWidth ( IN UI_MENU_OPTION MenuOption,
OUT UINT16 *  AdjustWidth 
)

Get the supported width for a particular op-code

Parameters
MenuOptionThe menu option.
AdjustWidthThe width which is saved for the space.
Returns
Returns the number of CHAR16 characters that is support.

Definition at line 366 of file FormDisplay.c.

◆ HasOptionString()

BOOLEAN HasOptionString ( IN UI_MENU_OPTION MenuOption)

Check whether this menu can has option string.

Parameters
MenuOptionThe menu opton which this attribut used to.
Return values
TRUEThis menu option can have option string.
FALSEThis menu option can't have option string.

Definition at line 2186 of file FormDisplay.c.

◆ InitializeDisplayEngine()

EFI_STATUS EFIAPI InitializeDisplayEngine ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Initialize Setup Browser driver.

Parameters
ImageHandleThe image handle.
SystemTableThe system table.
Return values
EFI_SUCCESSThe Setup Browser module is initialized correctly..
Returns
Other value if failed to initialize the Setup Browser module.

Definition at line 4236 of file FormDisplay.c.

◆ InitializeDisplayStrings()

VOID InitializeDisplayStrings ( VOID  )

Initialize the HII String Token to the correct values.

Definition at line 212 of file FormDisplay.c.

◆ IsHighLightMenuOption()

BOOLEAN IsHighLightMenuOption ( IN UI_MENU_OPTION MenuOption)

Is this the highlight menu.

Parameters
MenuOptionThe input Menu option.
Return values
TRUEThis is the highlight menu option.
FALSEThis is not the highlight menu option.

Definition at line 1645 of file FormDisplay.c.

◆ IsSavedHighlightStatement()

BOOLEAN IsSavedHighlightStatement ( IN FORM_DISPLAY_ENGINE_STATEMENT HighLightedStatement)

Is this the saved highlight statement.

Parameters
HighLightedStatementThe input highlight statement.
Return values
TRUEThis is the highlight statement.
FALSEThis is not the highlight statement.

Definition at line 1612 of file FormDisplay.c.

◆ IsSelectable()

BOOLEAN IsSelectable ( UI_MENU_OPTION MenuOption)

Check whether this Menu Option could be highlighted.

This is an internal function.

Parameters
MenuOptionThe MenuOption to be checked.
Return values
TRUEThis Menu Option is selectable.
FALSEThis Menu Option could not be selected.

Definition at line 1025 of file FormDisplay.c.

◆ IsTopOfScreeMenuOption()

BOOLEAN IsTopOfScreeMenuOption ( IN UI_MENU_OPTION MenuOption)

Is this the Top of screen menu.

Parameters
MenuOptionThe input Menu option.
Return values
TRUEThis is the Top of screen menu option.
FALSEThis is not the Top of screen menu option.

Definition at line 1739 of file FormDisplay.c.

◆ MoveToNextStatement()

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.

Parameters
GoUpThe navigation direction. TRUE: up, FALSE: down.
CurrentPositionCurrent position.
GapToTopGap position to top or bottom.
FindInFormWhether find menu in current form or beyond.
Returns
The row distance from current MenuOption to next selectable MenuOption.
Return values
-1Reach the begin of the menu, still can't find the selectable menu.
ValueFind 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.

◆ PrintableMenu()

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.

Parameters
MenuOptionThe MenuOption to be checked.
Return values
TRUEThis Menu Option is printable.
FALSEThis Menu Option could not be printable.

Definition at line 978 of file FormDisplay.c.

◆ ProcessStringForDateTime()

VOID ProcessStringForDateTime ( UI_MENU_OPTION MenuOption,
CHAR16 *  OptionString,
BOOLEAN  AddOptCol 
)

Process option string for date/time opcode.

Parameters
MenuOptionMenu option point to date/time.
OptionStringOption string input for process.
AddOptColWhether need to update MenuOption->OptCol.

Definition at line 1136 of file FormDisplay.c.

◆ SetDisplayAttribute()

VOID SetDisplayAttribute ( IN UI_MENU_OPTION MenuOption,
IN BOOLEAN  Highlight 
)

Update attribut for this menu.

Parameters
MenuOptionThe menu opton which this attribut used to.
HighlightWhether this menu will be highlight.

Definition at line 2105 of file FormDisplay.c.

◆ SetUnicodeMem()

VOID SetUnicodeMem ( IN VOID *  Buffer,
IN UINTN  Size,
IN CHAR16  Value 
)

Set Buffer to Value for Size bytes.

Parameters
BufferMemory to set.
SizeNumber of bytes to set
ValueValue of the set operation.

Definition at line 4210 of file FormDisplay.c.

◆ UiAddMenuOption()

VOID UiAddMenuOption ( IN FORM_DISPLAY_ENGINE_STATEMENT Statement,
IN UINT16 *  MenuItemCount,
IN BOOLEAN  NestIn 
)

Add one menu option by specified description and context.

Parameters
StatementStatement of this Menu Option.
MenuItemCountThe index for this Option in the Menu.
NestInWhether this statement is nest in another statement.

Definition at line 627 of file FormDisplay.c.

◆ UiDisplayMenu()

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.

Parameters
FormDataThe current form data info.
Return values
EFI_SUCESSSProcess the user selection success.
EFI_NOT_FOUNDProcess option string for orderedlist/Oneof fail.

Definition at line 2634 of file FormDisplay.c.

◆ UiWaitForEvent()

UI_EVENT_TYPE UiWaitForEvent ( IN EFI_EVENT  Event)

Wait for a given event to fire, or for an optional timeout to expire.

Parameters
EventThe event to wait for
Return values
UI_EVENT_TYPEThe type of the event which is trigged.

Definition at line 1419 of file FormDisplay.c.

◆ UnloadDisplayEngine()

EFI_STATUS EFIAPI UnloadDisplayEngine ( IN EFI_HANDLE  ImageHandle)

This is the default unload handle for display core drivers.

Parameters
[in]ImageHandleThe drivers' driver image.
Return values
EFI_SUCCESSThe image is unloaded.
OthersFailed to unload the image.

Definition at line 4320 of file FormDisplay.c.

◆ UpdateHighlightMenuInfo()

VOID UpdateHighlightMenuInfo ( IN LIST_ENTRY Highlight,
IN LIST_ENTRY TopOfScreen,
IN UINTN  SkipValue 
)

Record the highlight menu and top of screen menu info.

Parameters
HighlightThe menu opton which is highlight.
TopOfScreenThe menu opton which is at the top of the form.
SkipValueThe skip line info for the top of screen menu.

Definition at line 2023 of file FormDisplay.c.

◆ UpdateOptionSkipLines()

VOID UpdateOptionSkipLines ( IN UI_MENU_OPTION MenuOption)

Update display lines for a Menu Option.

Parameters
MenuOptionThe MenuOption to be checked.

Definition at line 938 of file FormDisplay.c.

◆ UpdateSkipInfoForMenu()

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.

Parameters
MenuOptionThe MenuOption to be checked.
OptionStringThe input option string.

Definition at line 900 of file FormDisplay.c.

◆ ValueIsScroll()

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.

Parameters
DirectionThe scroll direction. False is down. True is up.
CurrentPosThe current focus.
Returns
FALSE – the menu isn't the last menu that can be selected.
TRUE – the menu is the last menu that can be selected.

Definition at line 1394 of file FormDisplay.c.

Variable Documentation

◆ gBrowserError

CHAR16* gBrowserError

Definition at line 116 of file FormDisplay.c.

◆ gCancelOption

CHAR16* gCancelOption

Definition at line 153 of file FormDisplay.c.

◆ gChangesOpt

CHAR16* gChangesOpt

Definition at line 113 of file FormDisplay.c.

◆ gCheckError

CHAR16* gCheckError

Definition at line 123 of file FormDisplay.c.

◆ gConfirmDefaultMsg

CHAR16* gConfirmDefaultMsg

Definition at line 136 of file FormDisplay.c.

◆ gConfirmDefaultMsg2nd

CHAR16* gConfirmDefaultMsg2nd

Definition at line 142 of file FormDisplay.c.

◆ gConfirmDiscardMsg

CHAR16* gConfirmDiscardMsg

Definition at line 138 of file FormDisplay.c.

◆ gConfirmError

CHAR16* gConfirmError

Definition at line 128 of file FormDisplay.c.

◆ gConfirmExitMsg

CHAR16* gConfirmExitMsg

Definition at line 140 of file FormDisplay.c.

◆ gConfirmExitMsg2nd

CHAR16* gConfirmExitMsg2nd

Definition at line 144 of file FormDisplay.c.

◆ gConfirmMsgConnect

CHAR16* gConfirmMsgConnect

Definition at line 157 of file FormDisplay.c.

◆ gConfirmMsgEnd

CHAR16* gConfirmMsgEnd

Definition at line 158 of file FormDisplay.c.

◆ gConfirmOpt

CHAR16* gConfirmOpt

Definition at line 145 of file FormDisplay.c.

◆ gConfirmOptCancel

CHAR16* gConfirmOptCancel

Definition at line 149 of file FormDisplay.c.

◆ gConfirmOptNo

CHAR16* gConfirmOptNo

Definition at line 147 of file FormDisplay.c.

◆ gConfirmOptOk

CHAR16* gConfirmOptOk

Definition at line 148 of file FormDisplay.c.

◆ gConfirmOptYes

CHAR16* gConfirmOptYes

Definition at line 146 of file FormDisplay.c.

◆ gConfirmPassword

CHAR16* gConfirmPassword

Definition at line 127 of file FormDisplay.c.

◆ gConfirmResetMsg

CHAR16* gConfirmResetMsg

Definition at line 139 of file FormDisplay.c.

◆ gConfirmResetMsg2nd

CHAR16* gConfirmResetMsg2nd

Definition at line 143 of file FormDisplay.c.

◆ gConfirmSubmitMsg

CHAR16* gConfirmSubmitMsg

Definition at line 137 of file FormDisplay.c.

◆ gConfirmSubmitMsg2nd

CHAR16* gConfirmSubmitMsg2nd

Definition at line 141 of file FormDisplay.c.

◆ gDirection

UINT16 gDirection

Definition at line 101 of file FormDisplay.c.

◆ gDiscardChange

CHAR16* gDiscardChange

Definition at line 121 of file FormDisplay.c.

◆ gDisplayEngineGuid

EFI_GUID gDisplayEngineGuid
Initial value:
= {
0xE38C1029, 0xE38F, 0x45b9, { 0x8F, 0x0D, 0xE2, 0xE6, 0x0B, 0xC9, 0xB2, 0x62 }
}

Definition at line 91 of file FormDisplay.c.

◆ gEmptyString

CHAR16* gEmptyString

Definition at line 131 of file FormDisplay.c.

◆ gErrorPopup

CHAR16* gErrorPopup

Definition at line 154 of file FormDisplay.c.

◆ gFormData

Definition at line 99 of file FormDisplay.c.

◆ gFormNotFound

CHAR16* gFormNotFound

Definition at line 114 of file FormDisplay.c.

◆ gFormSuppress

CHAR16* gFormSuppress

Definition at line 134 of file FormDisplay.c.

◆ gHelpBlockWidth

CHAR16 gHelpBlockWidth

Definition at line 163 of file FormDisplay.c.

◆ gHighligthMenuInfo

DISPLAY_HIGHLIGHT_MENU_INFO gHighligthMenuInfo = { 0 }

Definition at line 103 of file FormDisplay.c.

◆ gHiiHandle

EFI_HII_HANDLE gHiiHandle

Definition at line 100 of file FormDisplay.c.

◆ gInfoPopup

CHAR16* gInfoPopup

Definition at line 156 of file FormDisplay.c.

◆ gJumpToFormSet

CHAR16* gJumpToFormSet

Definition at line 122 of file FormDisplay.c.

◆ gMenuOption

LIST_ENTRY gMenuOption

Definition at line 102 of file FormDisplay.c.

◆ gMiniString

CHAR16* gMiniString

Definition at line 132 of file FormDisplay.c.

◆ gMisMatch

BOOLEAN gMisMatch

Definition at line 95 of file FormDisplay.c.

◆ gModalSkipColumn

CHAR16 gModalSkipColumn

Definition at line 160 of file FormDisplay.c.

◆ gNoOption

CHAR16* gNoOption

Definition at line 151 of file FormDisplay.c.

◆ gNoSubmitIf

CHAR16* gNoSubmitIf

Definition at line 115 of file FormDisplay.c.

◆ gNoSubmitIfFailed

CHAR16* gNoSubmitIfFailed

Definition at line 118 of file FormDisplay.c.

◆ gOkOption

CHAR16* gOkOption

Definition at line 152 of file FormDisplay.c.

◆ gOldFormEntry

FORM_ENTRY_INFO gOldFormEntry = { 0 }

Definition at line 105 of file FormDisplay.c.

◆ gOptionBlockWidth

CHAR16 gOptionBlockWidth

Definition at line 162 of file FormDisplay.c.

◆ gOptionMismatch

CHAR16* gOptionMismatch

Definition at line 133 of file FormDisplay.c.

◆ gPassowordInvalid

CHAR16* gPassowordInvalid

Definition at line 129 of file FormDisplay.c.

◆ gPasswordUnsupported

CHAR16* gPasswordUnsupported

Definition at line 159 of file FormDisplay.c.

◆ gPressEnter

CHAR16* gPressEnter

Definition at line 130 of file FormDisplay.c.

◆ gPromptBlockWidth

CHAR16 gPromptBlockWidth

Definition at line 161 of file FormDisplay.c.

◆ gPromptForData

CHAR16* gPromptForData

Definition at line 124 of file FormDisplay.c.

◆ gPromptForNewPassword

CHAR16* gPromptForNewPassword

Definition at line 126 of file FormDisplay.c.

◆ gPromptForPassword

CHAR16* gPromptForPassword

Definition at line 125 of file FormDisplay.c.

◆ gProtocolNotFound

CHAR16* gProtocolNotFound

Definition at line 135 of file FormDisplay.c.

◆ gReconnectConfirmChanges

CHAR16* gReconnectConfirmChanges

Definition at line 110 of file FormDisplay.c.

◆ gReconnectFail

CHAR16* gReconnectFail

Definition at line 111 of file FormDisplay.c.

◆ gReconnectRequired

CHAR16* gReconnectRequired

Definition at line 112 of file FormDisplay.c.

◆ gSaveFailed

CHAR16* gSaveFailed

Definition at line 117 of file FormDisplay.c.

◆ gSaveNoSubmitProcess

CHAR16* gSaveNoSubmitProcess

Definition at line 120 of file FormDisplay.c.

◆ gSaveProcess

CHAR16* gSaveProcess

Definition at line 119 of file FormDisplay.c.

◆ gScanCodeToOperation

SCAN_CODE_TO_SCREEN_OPERATION gScanCodeToOperation[]
Initial value:
= {
{
SCAN_UP,
UiUp,
},
{
SCAN_DOWN,
UiDown,
},
{
SCAN_PAGE_UP,
UiPageUp,
},
{
SCAN_PAGE_DOWN,
UiPageDown,
},
{
SCAN_ESC,
UiReset,
},
{
SCAN_LEFT,
UiLeft,
},
{
SCAN_RIGHT,
UiRight,
}
}

Definition at line 15 of file FormDisplay.c.

◆ gScreenOperationToControlFlag

SCREEN_OPERATION_T0_CONTROL_FLAG gScreenOperationToControlFlag[]

Definition at line 48 of file FormDisplay.c.

◆ gStatementDimensions

EFI_SCREEN_DESCRIPTOR gStatementDimensions

Definition at line 96 of file FormDisplay.c.

◆ gUserInput

USER_INPUT* gUserInput

Definition at line 98 of file FormDisplay.c.

◆ gWarningPopup

CHAR16* gWarningPopup

Definition at line 155 of file FormDisplay.c.

◆ gYesOption

CHAR16* gYesOption

Definition at line 150 of file FormDisplay.c.

◆ mIsFirstForm

BOOLEAN mIsFirstForm = TRUE

Definition at line 104 of file FormDisplay.c.

◆ mPrivateData

Initial value:
= {
FORM_DISPLAY_DRIVER_SIGNATURE,
{
},
{
EFI_HII_POPUP_PROTOCOL_REVISION,
}
}
UINTN EFIAPI ConfirmDataChange(VOID)
VOID EFIAPI DriverClearDisplayPage(VOID)
Definition: FormDisplay.c:4193
EFI_STATUS EFIAPI FormDisplay(IN FORM_DISPLAY_ENGINE_FORM *FormData, OUT USER_INPUT *UserInputData)
Definition: FormDisplay.c:4111
EFI_STATUS EFIAPI CreatePopup(IN EFI_HII_POPUP_PROTOCOL *This, IN EFI_HII_POPUP_STYLE PopupStyle, IN EFI_HII_POPUP_TYPE PopupType, IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID Message, OUT EFI_HII_POPUP_SELECTION *UserSelection OPTIONAL)
Definition: Popup.c:688
#define NULL
Definition: Base.h:319

Definition at line 166 of file FormDisplay.c.

◆ mScanCodeNumber

UINTN mScanCodeNumber = ARRAY_SIZE (gScanCodeToOperation)

Definition at line 46 of file FormDisplay.c.

◆ mStatementLayoutIsChanged

BOOLEAN mStatementLayoutIsChanged = TRUE

Definition at line 97 of file FormDisplay.c.

◆ mUnknownString

CHAR16* mUnknownString

Definition at line 164 of file FormDisplay.c.