summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2011-02-12 01:51:25 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2011-02-12 01:51:25 +0000
commitf0a1bf1155188335aa3240a8e7415e48a2948d78 (patch)
treebaf407369aa75a9dee417f5186fa3409343239f2 /MdeModulePkg
parent9a33a65e58ff64527e552ade7470329ffdcdc7dc (diff)
downloadedk2-platforms-f0a1bf1155188335aa3240a8e7415e48a2948d78.tar.xz
Add four PCDs for the different color settings of Subtitle and Text Filed on Browser.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11309 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/MdeModulePkg.dec72
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Colors.h6
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c6
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c4
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf10
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Ui.c34
6 files changed, 103 insertions, 29 deletions
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index 093eeae180..5bb55ebf38 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -521,6 +521,78 @@
## This PCD specifies whether to reset system when memory type information changes.
gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|TRUE|BOOLEAN|0x00010056
+ ## Specify the foreground color for Subtile text in HII Form Browser. The default value is EFI_BLUE.
+ # Only following values defined in UEFI specification are valid:
+ # 0x00 (EFI_BLACK)
+ # 0x01 (EFI_BLUE)
+ # 0x02 (EFI_GREEN)
+ # 0x03 (EFI_CYAN)
+ # 0x04 (EFI_RED)
+ # 0x05 (EFI_MAGENTA)
+ # 0x06 (EFI_BROWN)
+ # 0x07 (EFI_LIGHTGRAY)
+ # 0x08 (EFI_DARKGRAY)
+ # 0x09 (EFI_LIGHTBLUE)
+ # 0x0A (EFI_LIGHTGREEN)
+ # 0x0B (EFI_LIGHTCYAN)
+ # 0x0C (EFI_LIGHTRED)
+ # 0x0D (EFI_LIGHTMAGENTA)
+ # 0x0E (EFI_YELLOW)
+ # 0x0F (EFI_WHITE)
+ gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserSubtitleTextColor|0x01|UINT8|0x00010057
+
+ ## Specify the foreground color for prompt and Question value text in HII Form Browser. The default value is EFI_BLACK.
+ # Only following values defined in UEFI specification are valid:
+ # 0x00 (EFI_BLACK)
+ # 0x01 (EFI_BLUE)
+ # 0x02 (EFI_GREEN)
+ # 0x03 (EFI_CYAN)
+ # 0x04 (EFI_RED)
+ # 0x05 (EFI_MAGENTA)
+ # 0x06 (EFI_BROWN)
+ # 0x07 (EFI_LIGHTGRAY)
+ # 0x08 (EFI_DARKGRAY)
+ # 0x09 (EFI_LIGHTBLUE)
+ # 0x0A (EFI_LIGHTGREEN)
+ # 0x0B (EFI_LIGHTCYAN)
+ # 0x0C (EFI_LIGHTRED)
+ # 0x0D (EFI_LIGHTMAGENTA)
+ # 0x0E (EFI_YELLOW)
+ # 0x0F (EFI_WHITE)
+ gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldTextColor|0x00|UINT8|0x00010058
+
+ ## Specify the foreground color for highlighted prompt and Question value text in HII Form Browser.
+ # The default value is EFI_LIGHTGRAY. Only following values defined in UEFI specification are valid:
+ # 0x00 (EFI_BLACK)
+ # 0x01 (EFI_BLUE)
+ # 0x02 (EFI_GREEN)
+ # 0x03 (EFI_CYAN)
+ # 0x04 (EFI_RED)
+ # 0x05 (EFI_MAGENTA)
+ # 0x06 (EFI_BROWN)
+ # 0x07 (EFI_LIGHTGRAY)
+ # 0x08 (EFI_DARKGRAY)
+ # 0x09 (EFI_LIGHTBLUE)
+ # 0x0A (EFI_LIGHTGREEN)
+ # 0x0B (EFI_LIGHTCYAN)
+ # 0x0C (EFI_LIGHTRED)
+ # 0x0D (EFI_LIGHTMAGENTA)
+ # 0x0E (EFI_YELLOW)
+ # 0x0F (EFI_WHITE)
+ gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldTextHighlightColor|0x07|UINT8|0x00010059
+
+ ## Specify the background color for highlighted prompt and Question value text in HII Form Browser.
+ # The default value is EFI_BACKGROUND_BLACK. Only following values defined in UEFI specification are valid:
+ # 0x00 (EFI_BACKGROUND_BLACK)
+ # 0x10 (EFI_BACKGROUND_BLUE)
+ # 0x20 (EFI_BACKGROUND_GREEN)
+ # 0x30 (EFI_BACKGROUND_CYAN)
+ # 0x40 (EFI_BACKGROUND_RED)
+ # 0x50 (EFI_BACKGROUND_MAGENTA)
+ # 0x60 (EFI_BACKGROUND_BROWN)
+ # 0x70 (EFI_BACKGROUND_LIGHTGRAY)
+ gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldBackgroundHighlightColor|0x00|UINT8|0x0001005A
+
[PcdsPatchableInModule]
## Specify memory size with page number for PEI code when
# the feature of Loading Module at Fixed Address is enabled
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Colors.h b/MdeModulePkg/Universal/SetupBrowserDxe/Colors.h
index 584b1af0ef..2db8b99614 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Colors.h
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Colors.h
@@ -1,7 +1,7 @@
/** @file
MACRO definitions for color used in Setup Browser.
-Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -26,15 +26,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define TITLE_BACKGROUND EFI_BACKGROUND_BLUE
#define KEYHELP_TEXT EFI_LIGHTGRAY
#define KEYHELP_BACKGROUND EFI_BACKGROUND_BLACK
-#define SUBTITLE_TEXT EFI_BLUE
#define SUBTITLE_BACKGROUND EFI_BACKGROUND_LIGHTGRAY
#define BANNER_TEXT EFI_BLUE
#define BANNER_BACKGROUND EFI_BACKGROUND_LIGHTGRAY
-#define FIELD_TEXT EFI_BLACK
#define FIELD_TEXT_GRAYED EFI_DARKGRAY
#define FIELD_BACKGROUND EFI_BACKGROUND_LIGHTGRAY
-#define FIELD_TEXT_HIGHLIGHT EFI_LIGHTGRAY
-#define FIELD_BACKGROUND_HIGHLIGHT EFI_BACKGROUND_BLACK
#define POPUP_TEXT EFI_LIGHTGRAY
#define POPUP_BACKGROUND EFI_BACKGROUND_BLUE
#define POPUP_INVERSE_TEXT EFI_LIGHTGRAY
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c b/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c
index 0d42beae50..360a6d75ec 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c
@@ -1,7 +1,7 @@
/** @file
Implementation for handling user input from the User Interfaces.
-Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -540,11 +540,11 @@ TheKey2:
PrintFormattedNumber (Question, FormattedNumber, 21 * sizeof (CHAR16));
}
- gST->ConOut->SetAttribute (gST->ConOut, FIELD_TEXT | FIELD_BACKGROUND);
+ gST->ConOut->SetAttribute (gST->ConOut, PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND);
for (Loop = 0; Loop < EraseLen; Loop++) {
PrintAt (MenuOption->OptCol + Loop, MenuOption->Row, L" ");
}
- gST->ConOut->SetAttribute (gST->ConOut, FIELD_TEXT_HIGHLIGHT | FIELD_BACKGROUND_HIGHLIGHT);
+ gST->ConOut->SetAttribute (gST->ConOut, PcdGet8 (PcdBrowserFieldTextHighlightColor) | PcdGet8 (PcdBrowserFieldBackgroundHighlightColor));
if (MenuOption->Sequence == 0) {
PrintCharAt (MenuOption->OptCol, Row, LEFT_NUMERIC_DELIMITER);
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c b/MdeModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c
index e654545bf7..2e77522ca1 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/ProcessOptions.c
@@ -2,7 +2,7 @@
Implementation for handling the User Interface option processing.
-Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -587,7 +587,7 @@ ProcessOptions (
CopyMem (QuestionValue, &OneOfOption->Value, sizeof (EFI_HII_VALUE));
SetQuestionValue (Selection->FormSet, Selection->Form, Question, TRUE);
UpdateStatusBar (NV_UPDATE_REQUIRED, Question->QuestionFlags, TRUE);
- gST->ConOut->SetAttribute (gST->ConOut, FIELD_TEXT | FIELD_BACKGROUND);
+ gST->ConOut->SetAttribute (gST->ConOut, PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND);
break;
}
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf b/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
index 289e668b9e..50387b72ee 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
@@ -1,7 +1,7 @@
## @file
# The DXE driver produces FORM BROWSER protocols defined in UEFI HII 2.1 specificatin.
#
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -75,7 +75,13 @@
gEfiUserManagerProtocolGuid ## SOMETIMES_CONSUMES
[FeaturePcd]
- gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport ## CONSUMES
+
+[Pcd]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserSubtitleTextColor ## CONSUMES
+ gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldTextColor ## CONSUMES
+ gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldTextHighlightColor ## CONSUMES
+ gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldBackgroundHighlightColor ## CONSUMES
[Depex]
gEfiHiiDatabaseProtocolGuid AND gEfiHiiConfigRoutingProtocolGuid
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c
index 736d9e822a..83b13b1932 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Ui.c
@@ -1,7 +1,7 @@
/** @file
Utility functions for User Interface functions.
-Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1011,7 +1011,7 @@ UpdateStatusBar (
);
mInputError = TRUE;
} else {
- gST->ConOut->SetAttribute (gST->ConOut, FIELD_TEXT_HIGHLIGHT);
+ gST->ConOut->SetAttribute (gST->ConOut, PcdGet8 (PcdBrowserFieldTextHighlightColor));
for (Index = 0; Index < (GetStringWidth (InputErrorMessage) - 2) / 2; Index++) {
PrintAt (gScreenDimensions.LeftColumn + gPromptBlockWidth + Index, gScreenDimensions.BottomRow - 1, L" ");
}
@@ -1033,7 +1033,7 @@ UpdateStatusBar (
gNvUpdateRequired = TRUE;
} else {
- gST->ConOut->SetAttribute (gST->ConOut, FIELD_TEXT_HIGHLIGHT);
+ gST->ConOut->SetAttribute (gST->ConOut, PcdGet8 (PcdBrowserFieldTextHighlightColor));
for (Index = 0; Index < (GetStringWidth (NvUpdateMessage) - 2) / 2; Index++) {
PrintAt (
(gScreenDimensions.LeftColumn + gPromptBlockWidth + gOptionBlockWidth + Index),
@@ -1765,7 +1765,7 @@ UiDisplayMenu (
LocalScreen.RightColumn,
TopRow - SCROLL_ARROW_HEIGHT,
BottomRow + SCROLL_ARROW_HEIGHT,
- FIELD_TEXT | FIELD_BACKGROUND
+ PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND
);
UiFreeRefreshList ();
@@ -1786,7 +1786,7 @@ UiDisplayMenu (
gST->ConOut->SetAttribute (gST->ConOut, FIELD_TEXT_GRAYED | FIELD_BACKGROUND);
} else {
if (Statement->Operand == EFI_IFR_SUBTITLE_OP) {
- gST->ConOut->SetAttribute (gST->ConOut, SUBTITLE_TEXT | FIELD_BACKGROUND);
+ gST->ConOut->SetAttribute (gST->ConOut, PcdGet8 (PcdBrowserSubtitleTextColor) | FIELD_BACKGROUND);
}
}
@@ -1874,7 +1874,7 @@ UiDisplayMenu (
MenuRefreshEntry->Selection = Selection;
MenuRefreshEntry->CurrentColumn = MenuOption->OptCol;
MenuRefreshEntry->CurrentRow = MenuOption->Row;
- MenuRefreshEntry->CurrentAttribute = FIELD_TEXT | FIELD_BACKGROUND;
+ MenuRefreshEntry->CurrentAttribute = PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND;
gMenuRefreshHead = MenuRefreshEntry;
} else {
//
@@ -1892,7 +1892,7 @@ UiDisplayMenu (
MenuRefreshEntry->Selection = Selection;
MenuRefreshEntry->CurrentColumn = MenuOption->OptCol;
MenuRefreshEntry->CurrentRow = MenuOption->Row;
- MenuRefreshEntry->CurrentAttribute = FIELD_TEXT | FIELD_BACKGROUND;
+ MenuRefreshEntry->CurrentAttribute = PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND;
}
}
@@ -1974,7 +1974,7 @@ UiDisplayMenu (
Row = OriginalRow;
FreePool (StringPtr);
}
- gST->ConOut->SetAttribute (gST->ConOut, FIELD_TEXT | FIELD_BACKGROUND);
+ gST->ConOut->SetAttribute (gST->ConOut, PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND);
//
// Need to handle the bottom of the display
@@ -2008,7 +2008,7 @@ UiDisplayMenu (
L"%c",
ARROW_UP
);
- gST->ConOut->SetAttribute (gST->ConOut, FIELD_TEXT | FIELD_BACKGROUND);
+ gST->ConOut->SetAttribute (gST->ConOut, PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND);
}
if (DownArrow) {
@@ -2019,7 +2019,7 @@ UiDisplayMenu (
L"%c",
ARROW_DOWN
);
- gST->ConOut->SetAttribute (gST->ConOut, FIELD_TEXT | FIELD_BACKGROUND);
+ gST->ConOut->SetAttribute (gST->ConOut, PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND);
}
MenuOption = NULL;
@@ -2095,7 +2095,7 @@ UiDisplayMenu (
//
gST->ConOut->SetCursorPosition (gST->ConOut, MenuOption->Col, MenuOption->Row);
ProcessOptions (Selection, MenuOption, FALSE, &OptionString);
- gST->ConOut->SetAttribute (gST->ConOut, FIELD_TEXT | FIELD_BACKGROUND);
+ gST->ConOut->SetAttribute (gST->ConOut, PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND);
if (OptionString != NULL) {
if ((MenuOption->ThisTag->Operand == EFI_IFR_DATE_OP) ||
(MenuOption->ThisTag->Operand == EFI_IFR_TIME_OP)
@@ -2139,7 +2139,7 @@ UiDisplayMenu (
if (MenuOption->GrayOut) {
gST->ConOut->SetAttribute (gST->ConOut, FIELD_TEXT_GRAYED | FIELD_BACKGROUND);
} else if (MenuOption->ThisTag->Operand == EFI_IFR_SUBTITLE_OP) {
- gST->ConOut->SetAttribute (gST->ConOut, SUBTITLE_TEXT | FIELD_BACKGROUND);
+ gST->ConOut->SetAttribute (gST->ConOut, PcdGet8 (PcdBrowserSubtitleTextColor) | FIELD_BACKGROUND);
}
OriginalRow = MenuOption->Row;
@@ -2160,7 +2160,7 @@ UiDisplayMenu (
}
MenuOption->Row = OriginalRow;
- gST->ConOut->SetAttribute (gST->ConOut, FIELD_TEXT | FIELD_BACKGROUND);
+ gST->ConOut->SetAttribute (gST->ConOut, PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND);
}
}
}
@@ -2190,7 +2190,7 @@ UiDisplayMenu (
//
// Set reverse attribute
//
- gST->ConOut->SetAttribute (gST->ConOut, FIELD_TEXT_HIGHLIGHT | FIELD_BACKGROUND_HIGHLIGHT);
+ gST->ConOut->SetAttribute (gST->ConOut, PcdGet8 (PcdBrowserFieldTextHighlightColor) | PcdGet8 (PcdBrowserFieldBackgroundHighlightColor));
gST->ConOut->SetCursorPosition (gST->ConOut, MenuOption->Col, MenuOption->Row);
//
@@ -2200,9 +2200,9 @@ UiDisplayMenu (
//
if (gMenuRefreshHead != NULL) {
for (MenuRefreshEntry = gMenuRefreshHead; MenuRefreshEntry != NULL; MenuRefreshEntry = MenuRefreshEntry->Next) {
- MenuRefreshEntry->CurrentAttribute = FIELD_TEXT | FIELD_BACKGROUND;
+ MenuRefreshEntry->CurrentAttribute = PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND;
if (MenuRefreshEntry->MenuOption == MenuOption) {
- MenuRefreshEntry->CurrentAttribute = FIELD_TEXT_HIGHLIGHT | FIELD_BACKGROUND_HIGHLIGHT;
+ MenuRefreshEntry->CurrentAttribute = PcdGet8 (PcdBrowserFieldTextHighlightColor) | PcdGet8 (PcdBrowserFieldBackgroundHighlightColor);
}
}
}
@@ -2274,7 +2274,7 @@ UiDisplayMenu (
//
// Clear reverse attribute
//
- gST->ConOut->SetAttribute (gST->ConOut, FIELD_TEXT | FIELD_BACKGROUND);
+ gST->ConOut->SetAttribute (gST->ConOut, PcdGet8 (PcdBrowserFieldTextColor) | FIELD_BACKGROUND);
}
//
// Repaint flag will be used when process CfUpdateHelpString, so restore its value