3 This library class defines a set of interfaces to customize Display module
5 Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials are licensed and made available under
7 the terms and conditions of the BSD License that accompanies this distribution.
8 The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #include "CustomizedDisplayLibInternal.h"
17 EFI_GUID gCustomizedDisplayLibGuid
= { 0x99fdc8fd, 0x849b, 0x4eba, { 0xad, 0x13, 0xfb, 0x96, 0x99, 0xc9, 0xa, 0x4d } };
19 EFI_HII_HANDLE mCDLStringPackHandle
;
20 UINT16 gClassOfVfr
; // Formset class information
21 UINT16 gLastClassOfVfr
= 0;
22 BANNER_DATA
*gBannerData
;
27 +------------------------------------------------------------------------------+
29 +------------------------------------------------------------------------------+
39 +------------------------------------------------------------------------------+
40 | F1=Scroll Help F9=Reset to Defaults F10=Save and Exit |
41 | ^"=Move Highlight <Spacebar> Toggles Checkbox Esc=Discard Changes |
42 +------------------------------------------------------------------------------+
47 This funtion defines Page Frame and Backgroud.
49 Based on the above layout, it will be responsible for HeaderHeight, FooterHeight,
50 StatusBarHeight and Backgroud. And, it will reserve Screen for Statement.
52 @param[in] FormData Form Data to be shown in Page.
53 @param[out] ScreenForStatement Screen to be used for Statement. (Prompt, Value and Help)
60 IN FORM_DISPLAY_ENGINE_FORM
*FormData
,
61 OUT EFI_SCREEN_DESCRIPTOR
*ScreenForStatement
66 ASSERT (FormData
!= NULL
&& ScreenForStatement
!= NULL
);
67 if (FormData
== NULL
|| ScreenForStatement
== NULL
) {
68 return EFI_INVALID_PARAMETER
;
71 Status
= ScreenDiemensionInfoValidate (FormData
);
72 if (EFI_ERROR (Status
)) {
76 gClassOfVfr
= FORMSET_CLASS_PLATFORM_SETUP
;
77 if ((FormData
->Attribute
& HII_DISPLAY_MODAL
) != 0) {
78 gClassOfVfr
= FORMSET_CLASS_MODEL_PAGE
;
81 ProcessExternedOpcode(FormData
);
84 // Calculate the ScreenForStatement.
86 ScreenForStatement
->BottomRow
= gScreenDimensions
.BottomRow
- STATUS_BAR_HEIGHT
- gFooterHeight
;
87 if ((gClassOfVfr
& FORMSET_CLASS_FRONT_PAGE
) == FORMSET_CLASS_FRONT_PAGE
) {
88 ScreenForStatement
->TopRow
= gScreenDimensions
.TopRow
+ FRONT_PAGE_HEADER_HEIGHT
;
90 ScreenForStatement
->TopRow
= gScreenDimensions
.TopRow
+ NONE_FRONT_PAGE_HEADER_HEIGHT
;
92 ScreenForStatement
->LeftColumn
= gScreenDimensions
.LeftColumn
;
93 ScreenForStatement
->RightColumn
= gScreenDimensions
.RightColumn
;
96 // If Last Vfr Class is same to current Vfr Class,
97 // they will have the same page frame. So, Page Frame is not required to be repainted.
99 if (gLastClassOfVfr
== gClassOfVfr
) {
100 UpdateStatusBar(NV_UPDATE_REQUIRED
, FormData
->SettingChangedFlag
);
101 PrintFormTitle(FormData
);
106 // Record last ClassOfVfr and Streen Information.
108 gLastClassOfVfr
= gClassOfVfr
;
111 // Ensure we are in Text mode
113 gST
->ConOut
->SetAttribute (gST
->ConOut
, EFI_TEXT_ATTR (EFI_LIGHTGRAY
, EFI_BLACK
));
115 ClearLines (0, gScreenDimensions
.RightColumn
, 0, gScreenDimensions
.BottomRow
, KEYHELP_BACKGROUND
);
117 if ((FormData
->Attribute
& HII_DISPLAY_MODAL
) != 0) {
121 if ((gClassOfVfr
& FORMSET_CLASS_FRONT_PAGE
) == FORMSET_CLASS_FRONT_PAGE
) {
122 PrintBannerInfo (FormData
);
127 UpdateStatusBar(NV_UPDATE_REQUIRED
, FormData
->SettingChangedFlag
);
129 PrintFormTitle(FormData
);
135 This function updates customized key panel's help information.
136 The library will prepare those Strings for the basic key, ESC, Enter, Up/Down/Left/Right, +/-.
137 and arrange them in Footer panel.
139 @param[in] FormData Form Data to be shown in Page. FormData has the highlighted statement.
140 @param[in] Statement The statement current selected.
141 @param[in] Selected Whether or not a tag be selected. TRUE means Enter has hit this question.
146 IN FORM_DISPLAY_ENGINE_FORM
*FormData
,
147 IN FORM_DISPLAY_ENGINE_STATEMENT
*Statement
,
153 UINTN LeftColumnOfHelp
;
154 UINTN RightColumnOfHelp
;
156 UINTN BottomRowOfHelp
;
157 UINTN StartColumnOfHelp
;
158 EFI_IFR_NUMERIC
*NumericOp
;
159 EFI_IFR_DATE
*DateOp
;
160 EFI_IFR_TIME
*TimeOp
;
163 ASSERT (FormData
!= NULL
);
164 if (FormData
== NULL
) {
168 gST
->ConOut
->SetAttribute (gST
->ConOut
, KEYHELP_TEXT
| KEYHELP_BACKGROUND
);
170 if ((FormData
->Attribute
& HII_DISPLAY_MODAL
) != 0) {
174 SecCol
= gScreenDimensions
.LeftColumn
+ (gScreenDimensions
.RightColumn
- gScreenDimensions
.LeftColumn
) / 3;
175 ThdCol
= gScreenDimensions
.LeftColumn
+ (gScreenDimensions
.RightColumn
- gScreenDimensions
.LeftColumn
) / 3 * 2;
177 StartColumnOfHelp
= gScreenDimensions
.LeftColumn
+ 2;
178 LeftColumnOfHelp
= gScreenDimensions
.LeftColumn
+ 1;
179 RightColumnOfHelp
= gScreenDimensions
.RightColumn
- 2;
180 TopRowOfHelp
= gScreenDimensions
.BottomRow
- STATUS_BAR_HEIGHT
- gFooterHeight
+ 1;
181 BottomRowOfHelp
= gScreenDimensions
.BottomRow
- STATUS_BAR_HEIGHT
- 2;
183 ClearLines (LeftColumnOfHelp
, RightColumnOfHelp
, TopRowOfHelp
, BottomRowOfHelp
, KEYHELP_TEXT
| KEYHELP_BACKGROUND
);
184 if (Statement
== NULL
) {
186 // Print Key for Form without showable statement.
188 PrintHotKeyHelpString (FormData
);
189 PrintStringAt (ThdCol
, BottomRowOfHelp
, gEscapeString
);
197 if (Statement
->OpCode
->OpCode
== EFI_IFR_NUMERIC_OP
) {
198 NumericOp
= (EFI_IFR_NUMERIC
*) Statement
->OpCode
;
199 HexDisplay
= (NumericOp
->Flags
& EFI_IFR_DISPLAY_UINT_HEX
) == EFI_IFR_DISPLAY_UINT_HEX
;
200 } else if (Statement
->OpCode
->OpCode
== EFI_IFR_DATE_OP
) {
201 DateOp
= (EFI_IFR_DATE
*) Statement
->OpCode
;
202 HexDisplay
= (DateOp
->Flags
& EFI_IFR_DISPLAY_UINT_HEX
) == EFI_IFR_DISPLAY_UINT_HEX
;
203 } else if (Statement
->OpCode
->OpCode
== EFI_IFR_TIME_OP
) {
204 TimeOp
= (EFI_IFR_TIME
*) Statement
->OpCode
;
205 HexDisplay
= (TimeOp
->Flags
& EFI_IFR_DISPLAY_UINT_HEX
) == EFI_IFR_DISPLAY_UINT_HEX
;
207 switch (Statement
->OpCode
->OpCode
) {
208 case EFI_IFR_ORDERED_LIST_OP
:
209 case EFI_IFR_ONE_OF_OP
:
210 case EFI_IFR_NUMERIC_OP
:
211 case EFI_IFR_TIME_OP
:
212 case EFI_IFR_DATE_OP
:
214 PrintHotKeyHelpString (FormData
);
216 if ((gClassOfVfr
& FORMSET_CLASS_PLATFORM_SETUP
) == FORMSET_CLASS_PLATFORM_SETUP
) {
217 PrintStringAt (ThdCol
, BottomRowOfHelp
, gEscapeString
);
220 if ((Statement
->OpCode
->OpCode
== EFI_IFR_DATE_OP
) ||
221 (Statement
->OpCode
->OpCode
== EFI_IFR_TIME_OP
)) {
233 PrintStringAt (SecCol
, BottomRowOfHelp
, gEnterString
);
234 PrintStringAt (StartColumnOfHelp
, TopRowOfHelp
, gAdjustNumber
);
236 PrintAt (0, StartColumnOfHelp
, BottomRowOfHelp
, L
"%c%c%s", ARROW_UP
, ARROW_DOWN
, gMoveHighlight
);
237 if (Statement
->OpCode
->OpCode
== EFI_IFR_NUMERIC_OP
&& NumericOp
!= NULL
&& LibGetFieldFromNum(Statement
->OpCode
) != 0) {
238 PrintStringAt (StartColumnOfHelp
, TopRowOfHelp
, gAdjustNumber
);
240 PrintStringAt (SecCol
, BottomRowOfHelp
, gEnterString
);
243 PrintStringAt (SecCol
, BottomRowOfHelp
, gEnterCommitString
);
246 // If it is a selected numeric with manual input, display different message
248 if ((Statement
->OpCode
->OpCode
== EFI_IFR_NUMERIC_OP
) ||
249 (Statement
->OpCode
->OpCode
== EFI_IFR_DATE_OP
) ||
250 (Statement
->OpCode
->OpCode
== EFI_IFR_TIME_OP
)) {
254 HexDisplay
? gHexNumericInput
: gDecNumericInput
256 } else if (Statement
->OpCode
->OpCode
!= EFI_IFR_ORDERED_LIST_OP
) {
257 PrintAt (0, StartColumnOfHelp
, BottomRowOfHelp
, L
"%c%c%s", ARROW_UP
, ARROW_DOWN
, gMoveHighlight
);
260 if (Statement
->OpCode
->OpCode
== EFI_IFR_ORDERED_LIST_OP
) {
261 PrintStringAt (StartColumnOfHelp
, TopRowOfHelp
, gPlusString
);
262 PrintStringAt (ThdCol
, TopRowOfHelp
, gMinusString
);
265 PrintStringAt (ThdCol
, BottomRowOfHelp
, gEnterEscapeString
);
269 case EFI_IFR_CHECKBOX_OP
:
270 PrintHotKeyHelpString (FormData
);
272 if ((gClassOfVfr
& FORMSET_CLASS_PLATFORM_SETUP
) == FORMSET_CLASS_PLATFORM_SETUP
) {
273 PrintStringAt (ThdCol
, BottomRowOfHelp
, gEscapeString
);
276 PrintAt (0, StartColumnOfHelp
, BottomRowOfHelp
, L
"%c%c%s", ARROW_UP
, ARROW_DOWN
, gMoveHighlight
);
277 PrintStringAt (SecCol
, BottomRowOfHelp
, gToggleCheckBox
);
281 case EFI_IFR_PASSWORD_OP
:
282 case EFI_IFR_STRING_OP
:
283 case EFI_IFR_TEXT_OP
:
284 case EFI_IFR_ACTION_OP
:
285 case EFI_IFR_RESET_BUTTON_OP
:
286 case EFI_IFR_SUBTITLE_OP
:
288 PrintHotKeyHelpString (FormData
);
290 if ((gClassOfVfr
& FORMSET_CLASS_PLATFORM_SETUP
) == FORMSET_CLASS_PLATFORM_SETUP
) {
291 PrintStringAt (ThdCol
, BottomRowOfHelp
, gEscapeString
);
294 PrintAt (0, StartColumnOfHelp
, BottomRowOfHelp
, L
"%c%c%s", ARROW_UP
, ARROW_DOWN
, gMoveHighlight
);
295 if (Statement
->OpCode
->OpCode
!= EFI_IFR_TEXT_OP
&& Statement
->OpCode
->OpCode
!= EFI_IFR_SUBTITLE_OP
) {
296 PrintStringAt (SecCol
, BottomRowOfHelp
, gEnterString
);
299 if (Statement
->OpCode
->OpCode
!= EFI_IFR_REF_OP
) {
301 (gScreenDimensions
.RightColumn
- LibGetStringWidth (gEnterCommitString
) / 2) / 2,
305 PrintStringAt (ThdCol
, BottomRowOfHelp
, gEnterEscapeString
);
318 This function updates the status bar on the bottom of menu screen. It just shows StatusBar.
319 Original logic in this function should be splitted out.
321 @param[in] MessageType The type of message to be shown. InputError or Configuration Changed.
322 @param[in] State Show or Clear Message.
327 IN UINTN MessageType
,
334 OptionWidth
= (CHAR16
) ((gScreenDimensions
.RightColumn
- gScreenDimensions
.LeftColumn
) / 3);
336 switch (MessageType
) {
339 gST
->ConOut
->SetAttribute (gST
->ConOut
, ERROR_TEXT
);
341 gScreenDimensions
.LeftColumn
+ OptionWidth
,
342 gScreenDimensions
.BottomRow
- 1,
346 gST
->ConOut
->SetAttribute (gST
->ConOut
, KEYHELP_BACKGROUND
);
347 for (Index
= 0; Index
< (LibGetStringWidth (gInputErrorMessage
) - 2) / 2; Index
++) {
348 PrintStringAt (gScreenDimensions
.LeftColumn
+ OptionWidth
+ Index
, gScreenDimensions
.BottomRow
- 1, L
" ");
353 case NV_UPDATE_REQUIRED
:
355 // Global setting support. Show configuration change on every form.
358 gST
->ConOut
->SetAttribute (gST
->ConOut
, INFO_TEXT
);
360 gScreenDimensions
.LeftColumn
+ OptionWidth
* 2,
361 gScreenDimensions
.BottomRow
- 1,
365 gST
->ConOut
->SetAttribute (gST
->ConOut
, KEYHELP_BACKGROUND
);
366 for (Index
= 0; Index
< (LibGetStringWidth (gNvUpdateMessage
) - 2) / 2; Index
++) {
368 (gScreenDimensions
.LeftColumn
+ OptionWidth
* 2 + Index
),
369 gScreenDimensions
.BottomRow
- 1,
382 Create popup window. It will replace CreateDialog().
384 This function draws OEM/Vendor specific pop up windows.
386 @param[out] Key User Input Key
387 @param ... String to be shown in Popup. The variable argument list is terminated by a NULL.
393 OUT EFI_INPUT_KEY
*Key
, OPTIONAL
398 EFI_INPUT_KEY KeyValue
;
410 UINTN DimensionsWidth
;
411 UINTN DimensionsHeight
;
412 UINTN CurrentAttribute
;
415 // If screen dimension info is not ready, get it from console.
417 if (gScreenDimensions
.RightColumn
== 0 || gScreenDimensions
.BottomRow
== 0) {
418 ZeroMem (&gScreenDimensions
, sizeof (EFI_SCREEN_DESCRIPTOR
));
419 gST
->ConOut
->QueryMode (
421 gST
->ConOut
->Mode
->Mode
,
422 &gScreenDimensions
.RightColumn
,
423 &gScreenDimensions
.BottomRow
427 DimensionsWidth
= gScreenDimensions
.RightColumn
- gScreenDimensions
.LeftColumn
;
428 DimensionsHeight
= gScreenDimensions
.BottomRow
- gScreenDimensions
.TopRow
;
432 VA_START (Marker
, Key
);
433 while ((String
= VA_ARG (Marker
, CHAR16
*)) != NULL
) {
436 if ((LibGetStringWidth (String
) / 2) > LargestString
) {
437 LargestString
= (LibGetStringWidth (String
) / 2);
442 if ((LargestString
+ 2) > DimensionsWidth
) {
443 LargestString
= DimensionsWidth
- 2;
446 CurrentAttribute
= gST
->ConOut
->Mode
->Attribute
;
447 gST
->ConOut
->EnableCursor (gST
->ConOut
, FALSE
);
448 gST
->ConOut
->SetAttribute (gST
->ConOut
, GetPopupColor ());
451 // Subtract the PopUp width from total Columns, allow for one space extra on
452 // each end plus a border.
454 Start
= (DimensionsWidth
- LargestString
- 2) / 2 + gScreenDimensions
.LeftColumn
+ 1;
455 End
= Start
+ LargestString
+ 1;
457 Top
= ((DimensionsHeight
- LineNum
- 2) / 2) + gScreenDimensions
.TopRow
- 1;
458 Bottom
= Top
+ LineNum
+ 2;
460 Character
= BOXDRAW_DOWN_RIGHT
;
461 PrintCharAt (Start
, Top
, Character
);
462 Character
= BOXDRAW_HORIZONTAL
;
463 for (Index
= Start
; Index
+ 2 < End
; Index
++) {
464 PrintCharAt ((UINTN
)-1, (UINTN
)-1, Character
);
467 Character
= BOXDRAW_DOWN_LEFT
;
468 PrintCharAt ((UINTN
)-1, (UINTN
)-1, Character
);
469 Character
= BOXDRAW_VERTICAL
;
472 VA_START (Marker
, Key
);
473 for (Index
= Top
; Index
+ 2 < Bottom
; Index
++, Count
++) {
474 String
= VA_ARG (Marker
, CHAR16
*);
476 if (String
[0] == CHAR_NULL
) {
478 // Passing in a NULL results in a blank space
480 ClearLines (Start
, End
, Index
+ 1, Index
+ 1, GetPopupColor ());
481 } else if (String
[0] == L
' ') {
483 // Passing in a space results in the assumption that this is where typing will occur
485 ClearLines (Start
+ 1, End
- 1, Index
+ 1, Index
+ 1, POPUP_INVERSE_TEXT
| POPUP_INVERSE_BACKGROUND
);
487 ((DimensionsWidth
- LibGetStringWidth (String
) / 2) / 2) + gScreenDimensions
.LeftColumn
+ 1,
493 // This will clear the background of the line - we never know who might have been
494 // here before us. This differs from the next clear in that it used the non-reverse
495 // video for normal printing.
497 ClearLines (Start
, End
, Index
+ 1, Index
+ 1, GetPopupColor ());
499 ((DimensionsWidth
- LibGetStringWidth (String
) / 2) / 2) + gScreenDimensions
.LeftColumn
+ 1,
505 gST
->ConOut
->SetAttribute (gST
->ConOut
, GetPopupColor ());
506 PrintCharAt (Start
, Index
+ 1, Character
);
507 PrintCharAt (End
- 1, Index
+ 1, Character
);
511 Character
= BOXDRAW_UP_RIGHT
;
512 PrintCharAt (Start
, Bottom
- 1, Character
);
513 Character
= BOXDRAW_HORIZONTAL
;
514 for (Index
= Start
; Index
+ 2 < End
; Index
++) {
515 PrintCharAt ((UINTN
)-1, (UINTN
) -1, Character
);
518 Character
= BOXDRAW_UP_LEFT
;
519 PrintCharAt ((UINTN
)-1, (UINTN
) -1, Character
);
522 Status
= WaitForKeyStroke (&KeyValue
);
523 ASSERT_EFI_ERROR (Status
);
524 CopyMem (Key
, &KeyValue
, sizeof (EFI_INPUT_KEY
));
527 gST
->ConOut
->SetAttribute (gST
->ConOut
, CurrentAttribute
);
528 gST
->ConOut
->EnableCursor (gST
->ConOut
, TRUE
);
532 Confirm how to handle the changed data.
534 @return Action BROWSER_ACTION_SUBMIT, BROWSER_ACTION_DISCARD or other values.
546 gST
->ConIn
->ReadKeyStroke (gST
->ConIn
, &Key
);
548 YesResponse
= gYesResponse
[0];
549 NoResponse
= gNoResponse
[0];
552 // If NV flag is up, prompt user
555 CreateDialog (&Key
, gLibEmptyString
, gSaveChanges
, gAreYouSure
, gLibEmptyString
, NULL
);
558 (Key
.ScanCode
!= SCAN_ESC
) &&
559 ((Key
.UnicodeChar
| UPPER_LOWER_CASE_OFFSET
) != (NoResponse
| UPPER_LOWER_CASE_OFFSET
)) &&
560 ((Key
.UnicodeChar
| UPPER_LOWER_CASE_OFFSET
) != (YesResponse
| UPPER_LOWER_CASE_OFFSET
))
563 if (Key
.ScanCode
== SCAN_ESC
) {
564 return BROWSER_ACTION_NONE
;
565 } else if ((Key
.UnicodeChar
| UPPER_LOWER_CASE_OFFSET
) == (YesResponse
| UPPER_LOWER_CASE_OFFSET
)) {
566 return BROWSER_ACTION_SUBMIT
;
568 return BROWSER_ACTION_DISCARD
;
573 OEM specifies whether Setup exits Page by ESC key.
575 This function customized the behavior that whether Setup exits Page so that
576 system able to boot when configuration is not changed.
578 @retval TRUE Exits FrontPage
579 @retval FALSE Don't exit FrontPage.
587 return (gClassOfVfr
& FORMSET_CLASS_FRONT_PAGE
) == FORMSET_CLASS_FRONT_PAGE
? FALSE
: TRUE
;
591 Set Timeout value for a ceratain Form to get user response.
593 This function allows to set timeout value on a ceratain form if necessary.
594 If timeout is not zero, the form will exit if user has no response in timeout.
596 @param[in] FormData Form Data to be shown in Page
598 @return 0 No timeout for this form.
599 @return > 0 Timeout value in 100 ns units.
604 IN FORM_DISPLAY_ENGINE_FORM
*FormData
613 Prints a unicode string to the default console, at
614 the supplied cursor position, using L"%s" format.
616 @param Column The cursor position to print the string at. When it is -1, use current Position.
617 @param Row The cursor position to print the string at. When it is -1, use current Position.
618 @param String String pointer.
620 @return Length of string printed to the console
631 return PrintAt (0, Column
, Row
, L
"%s", String
);
635 Prints a unicode string to the default console, at
636 the supplied cursor position, using L"%s" format.
638 @param Column The cursor position to print the string at. When it is -1, use current Position.
639 @param Row The cursor position to print the string at. When it is -1, use current Position.
640 @param String String pointer.
641 @param Width Width for String.
643 @return Length of string printed to the console
648 PrintStringAtWithWidth (
655 return PrintAt (Width
, Column
, Row
, L
"%s", String
);
659 Prints a chracter to the default console, at
660 the supplied cursor position, using L"%c" format.
662 @param Column The cursor position to print the string at. When it is -1, use current Position.
663 @param Row The cursor position to print the string at. When it is -1, use current Position.
664 @param Character Character to print.
666 @return Length of string printed to the console.
677 return PrintAt (0, Column
, Row
, L
"%c", Character
);
681 Clear retangle with specified text attribute.
683 @param LeftColumn Left column of retangle.
684 @param RightColumn Right column of retangle.
685 @param TopRow Start row of retangle.
686 @param BottomRow End row of retangle.
687 @param TextAttribute The character foreground and background.
694 IN UINTN RightColumn
,
697 IN UINTN TextAttribute
704 // For now, allocate an arbitrarily long buffer
706 Buffer
= AllocateZeroPool (0x10000);
707 ASSERT (Buffer
!= NULL
);
710 // Set foreground and background as defined
712 gST
->ConOut
->SetAttribute (gST
->ConOut
, TextAttribute
);
715 // Much faster to buffer the long string instead of print it a character at a time
717 LibSetUnicodeMem (Buffer
, RightColumn
- LeftColumn
, L
' ');
720 // Clear the desired area with the appropriate foreground/background
722 for (Row
= TopRow
; Row
<= BottomRow
; Row
++) {
723 PrintStringAt (LeftColumn
, Row
, Buffer
);
726 gST
->ConOut
->SetCursorPosition (gST
->ConOut
, LeftColumn
, TopRow
);
732 // Color Setting Functions
736 Get OEM/Vendor specific popup attribute colors.
738 @retval Byte code color setting for popup color.
746 return POPUP_TEXT
| POPUP_BACKGROUND
;
750 Get OEM/Vendor specific popup attribute colors.
752 @retval Byte code color setting for popup inverse color.
756 GetPopupInverseColor (
760 return POPUP_INVERSE_TEXT
| POPUP_INVERSE_BACKGROUND
;
764 Get OEM/Vendor specific PickList color attribute.
766 @retval Byte code color setting for pick list color.
774 return PICKLIST_HIGHLIGHT_TEXT
| PICKLIST_HIGHLIGHT_BACKGROUND
;
778 Get OEM/Vendor specific arrow color attribute.
780 @retval Byte code color setting for arrow color.
788 return ARROW_TEXT
| ARROW_BACKGROUND
;
792 Get OEM/Vendor specific info text color attribute.
794 @retval Byte code color setting for info text color.
802 return INFO_TEXT
| FIELD_BACKGROUND
;
806 Get OEM/Vendor specific help text color attribute.
808 @retval Byte code color setting for help text color.
816 return HELP_TEXT
| FIELD_BACKGROUND
;
820 Get OEM/Vendor specific grayed out text color attribute.
822 @retval Byte code color setting for grayed out text color.
830 return FIELD_TEXT_GRAYED
| FIELD_BACKGROUND
;
834 Get OEM/Vendor specific highlighted text color attribute.
836 @retval Byte code color setting for highlight text color.
840 GetHighlightTextColor (
844 return PcdGet8 (PcdBrowserFieldTextHighlightColor
) | PcdGet8 (PcdBrowserFieldBackgroundHighlightColor
);
848 Get OEM/Vendor specific field text color attribute.
850 @retval Byte code color setting for field text color.
858 return PcdGet8 (PcdBrowserFieldTextColor
) | FIELD_BACKGROUND
;
862 Get OEM/Vendor specific subtitle text color attribute.
864 @retval Byte code color setting for subtitle text color.
868 GetSubTitleTextColor (
872 return PcdGet8 (PcdBrowserSubtitleTextColor
) | FIELD_BACKGROUND
;
876 Clear Screen to the initial state.
884 gST
->ConOut
->SetAttribute (gST
->ConOut
, EFI_TEXT_ATTR (EFI_LIGHTGRAY
, EFI_BLACK
));
885 gST
->ConOut
->ClearScreen (gST
->ConOut
);
890 Constructor of Customized Display Library Instance.
892 @param ImageHandle The firmware allocated handle for the EFI image.
893 @param SystemTable A pointer to the EFI System Table.
895 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
900 CustomizedDisplayLibConstructor (
901 IN EFI_HANDLE ImageHandle
,
902 IN EFI_SYSTEM_TABLE
*SystemTable
905 mCDLStringPackHandle
= HiiAddPackages (&gCustomizedDisplayLibGuid
, ImageHandle
, CustomizedDisplayLibStrings
, NULL
);
906 ASSERT (mCDLStringPackHandle
!= NULL
);
908 InitializeLibStrings();
914 Destructor of Customized Display Library Instance.
916 @param ImageHandle The firmware allocated handle for the EFI image.
917 @param SystemTable A pointer to the EFI System Table.
919 @retval EFI_SUCCESS The destructor completed successfully.
920 @retval Other value The destructor did not complete successfully.
925 CustomizedDisplayLibDestructor (
926 IN EFI_HANDLE ImageHandle
,
927 IN EFI_SYSTEM_TABLE
*SystemTable
930 HiiRemovePackages(mCDLStringPackHandle
);