TianoCore EDK2 master
|
#include "UefiLibInternal.h"
Go to the source code of this file.
Data Structures | |
struct | UNICODE_WIDTH_ENTRY |
Macros | |
#define | NARROW_CHAR 0xFFF0 |
#define | WIDE_CHAR 0xFFF1 |
Functions | |
UINTN EFIAPI | GetGlyphWidth (IN CHAR16 UnicodeChar) |
UINTN EFIAPI | UnicodeStringDisplayLength (IN CONST CHAR16 *String) |
UINTN | UefiLibGetStringWidth (IN CHAR16 *String, IN BOOLEAN LimitLen, IN UINTN MaxWidth, OUT UINTN *Offset) |
VOID EFIAPI | CreatePopUp (IN UINTN Attribute, OUT EFI_INPUT_KEY *Key OPTIONAL,...) |
Variables | |
GLOBAL_REMOVE_IF_UNREFERENCED CONST UNICODE_WIDTH_ENTRY | mUnicodeWidthTable [] |
This module provide help function for displaying unicode string.
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Console.c.
VOID EFIAPI CreatePopUp | ( | IN UINTN | Attribute, |
OUT EFI_INPUT_KEY *Key | OPTIONAL, | ||
... | |||
) |
Draws a dialog box to the console output device specified by ConOut defined in the EFI_SYSTEM_TABLE and waits for a keystroke from the console input device specified by ConIn defined in the EFI_SYSTEM_TABLE.
If there are no strings in the variable argument list, then ASSERT(). If all the strings in the variable argument list are empty, then ASSERT().
[in] | Attribute | Specifies the foreground and background color of the popup. |
[out] | Key | A pointer to the EFI_KEY value of the key that was pressed. This is an optional parameter that may be NULL. If it is NULL then no wait for a keypress will be performed. |
[in] | ... | The variable argument list that contains pointers to Null- terminated Unicode strings to display in the dialog box. The variable argument list is terminated by a NULL. |
Retrieves the width of a Unicode character.
This function computes and returns the width of the Unicode character specified by UnicodeChar.
UnicodeChar | A Unicode character. |
0 | The width if UnicodeChar could not be determined. |
1 | UnicodeChar is a narrow glyph. |
2 | UnicodeChar is a wide glyph. |
UINTN UefiLibGetStringWidth | ( | IN CHAR16 * | String, |
IN BOOLEAN | LimitLen, | ||
IN UINTN | MaxWidth, | ||
OUT UINTN * | Offset | ||
) |
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.
String | The input string to be counted. |
LimitLen | Whether need to limit the string length. |
MaxWidth | The max length this function supported. |
Offset | The max index of the string can be show out. |
Computes the display length of a Null-terminated Unicode String.
This function computes and returns the display length of the Null-terminated Unicode string specified by String. If String is NULL then 0 is returned. If any of the widths of the Unicode characters in String can not be determined, then 0 is returned. The display width of String can be computed by summing the display widths of each Unicode character in String. Unicode characters that are narrow glyphs have a width of 1, and Unicode characters that are width glyphs have a width of 2. If String is not aligned on a 16-bit boundary, then ASSERT().
String | A pointer to a Null-terminated Unicode string. |
GLOBAL_REMOVE_IF_UNREFERENCED CONST UNICODE_WIDTH_ENTRY mUnicodeWidthTable[] |