TianoCore EDK2 master
|
#include "FormDisplay.h"
Go to the source code of this file.
Functions | |
VOID | FreeSelectableOptions (LIST_ENTRY *OptionList) |
VOID | DisplayOneSelectableOption (IN USER_SELECTABLE_OPTION *SelectableOption, IN BOOLEAN Highlight) |
EFI_STATUS | AddOneSelectableOption (IN EFI_HII_POPUP_TYPE PopupType, IN EFI_HII_POPUP_SELECTION OptionType, IN CHAR16 *OptionString, IN UINTN OptionCol, IN UINTN OptionRow) |
EFI_STATUS | AddUserSelectableOptions (IN EFI_HII_POPUP_TYPE PopupType) |
VOID | GetUserSelection (IN EFI_HII_POPUP_TYPE PopupType, OUT EFI_HII_POPUP_SELECTION *UserSelection) |
VOID | GetStringOffsetWithWidth (IN CHAR16 *String, IN UINTN MaxWidth, OUT UINTN *Offset) |
UINTN | ParseMessageString (IN CHAR16 *InputString, OUT CHAR16 **OutputString, OUT UINTN *OutputStrWidth, IN OUT UINTN *Index) |
VOID | CalculatePopupPosition (IN EFI_HII_POPUP_TYPE PopupType, OUT EFI_SCREEN_DESCRIPTOR *ScreenForPopup) |
EFI_STATUS | DrawMessageBox (IN EFI_HII_POPUP_STYLE PopupStyle) |
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) |
Variables | |
EFI_SCREEN_DESCRIPTOR | gPopupDimensions |
LIST_ENTRY | gUserSelectableOptions |
EFI_STRING | gMessageString |
UINTN | gMesStrLineNum |
UINTN | gMaxRowWidth |
Implementation for Hii Popup Protocol.
Copyright (c) 2017, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Popup.c.
EFI_STATUS AddOneSelectableOption | ( | IN EFI_HII_POPUP_TYPE | PopupType, |
IN EFI_HII_POPUP_SELECTION | OptionType, | ||
IN CHAR16 * | OptionString, | ||
IN UINTN | OptionCol, | ||
IN UINTN | OptionRow | ||
) |
Add one selectable option to option list. This is the work function for AddUserSelectableOptions.
PopupType | The option need to be drew. |
OptionType | The type of this selection option. |
OptionString | Point to the option string that to be shown. |
OptionCol | The column that the option need to be drew at. |
OptionRow | The row that the option need to be drew at. |
EFI_SUCCESS | This function implement successfully. |
EFI_OUT_OF_RESOURCES | There are not enough resources available. |
EFI_STATUS AddUserSelectableOptions | ( | IN EFI_HII_POPUP_TYPE | PopupType | ) |
VOID CalculatePopupPosition | ( | IN EFI_HII_POPUP_TYPE | PopupType, |
OUT EFI_SCREEN_DESCRIPTOR * | ScreenForPopup | ||
) |
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 | ||
) |
Displays a popup window.
This | A pointer to the EFI_HII_POPUP_PROTOCOL instance. |
PopupStyle | Popup style to use. |
PopupType | Type of the popup to display. |
HiiHandle | HII handle of the string pack containing Message |
Message | A message to display in the popup box. |
UserSelection | User selection. |
EFI_SUCCESS | The popup box was successfully displayed. |
EFI_INVALID_PARAMETER | HiiHandle and Message do not define a valid HII string. |
EFI_INVALID_PARAMETER | PopupType is not one of the values defined by this specification. |
EFI_OUT_OF_RESOURCES | There are not enough resources available to display the popup box. |
VOID DisplayOneSelectableOption | ( | IN USER_SELECTABLE_OPTION * | SelectableOption, |
IN BOOLEAN | Highlight | ||
) |
EFI_STATUS DrawMessageBox | ( | IN EFI_HII_POPUP_STYLE | PopupStyle | ) |
VOID FreeSelectableOptions | ( | LIST_ENTRY * | OptionList | ) |
Get the offset in the input string when the width reaches to a fixed one.
The input string may contain NARROW_CHAR and WIDE_CHAR. Notice: the input string doesn't contain line break characters.
String | The input string to be counted. |
MaxWidth | The max length this function supported. |
Offset | The max index of the string can be show out. If string's width less than MaxWidth, offset will point to the "\0" of the string. |
UINTN ParseMessageString | ( | IN CHAR16 * | InputString, |
OUT CHAR16 ** | OutputString, | ||
OUT UINTN * | OutputStrWidth, | ||
IN OUT UINTN * | Index | ||
) |
Parse the message to check if it contains line break characters. For once call, caller can get the string for one line and the width of the string. This function call be called recursively to parse the whole InputString.
(Notice: current implementation, it only checks \r,
characters, it deals \r,
,
\r same as \r
.)
InputString | String description for this option. |
OutputString | Buffer to copy the string into, caller is responsible for freeing the buffer. |
OutputStrWidth | The width of OutputString. |
Index | Where in InputString to start the copy process |
EFI_SCREEN_DESCRIPTOR gPopupDimensions |
LIST_ENTRY gUserSelectableOptions |