diff options
author | raywu <raywu@aaeon.com.tw> | 2018-09-13 16:11:56 +0800 |
---|---|---|
committer | raywu <raywu@aaeon.com.tw> | 2018-09-13 16:11:56 +0800 |
commit | 31bb486c913795c8b67d1c4dbaae2bdec4943fc9 (patch) | |
tree | f0e04ad6fe983d8aa11f0f8a808518e39ab408f1 /EDK/MiniSetup/Ezport | |
parent | 465bdc2f8b32bb4cc1ac2c420086ec79ccbd5f78 (diff) | |
download | zprj-31bb486c913795c8b67d1c4dbaae2bdec4943fc9.tar.xz |
SLP1.0 / SLP2.0 / Default Password / Logo / Fix Boot Order
Diffstat (limited to 'EDK/MiniSetup/Ezport')
-rw-r--r-- | EDK/MiniSetup/Ezport/Ezport.cif | 14 | ||||
-rw-r--r-- | EDK/MiniSetup/Ezport/Ezport.mak | 123 | ||||
-rw-r--r-- | EDK/MiniSetup/Ezport/Ezport.sdl | 1057 | ||||
-rw-r--r-- | EDK/MiniSetup/Ezport/ezport.c | 731 | ||||
-rw-r--r-- | EDK/MiniSetup/Ezport/ezport.h | 134 | ||||
-rw-r--r-- | EDK/MiniSetup/Ezport/style.c | 546 | ||||
-rw-r--r-- | EDK/MiniSetup/Ezport/style.h | 247 | ||||
-rw-r--r-- | EDK/MiniSetup/Ezport/stylecommon.c | 1440 |
8 files changed, 4292 insertions, 0 deletions
diff --git a/EDK/MiniSetup/Ezport/Ezport.cif b/EDK/MiniSetup/Ezport/Ezport.cif new file mode 100644 index 0000000..030984f --- /dev/null +++ b/EDK/MiniSetup/Ezport/Ezport.cif @@ -0,0 +1,14 @@ +<component> + name = "TSE Sources - Style - Ezport" + category = ModulePart + LocalRoot = "EDK\MiniSetup\Ezport" + RefName = "Ezport" +[files] +"Ezport.sdl" +"Ezport.mak" +"ezport.c" +"ezport.h" +"stylecommon.c" +"style.h" +"style.c" +<endComponent> diff --git a/EDK/MiniSetup/Ezport/Ezport.mak b/EDK/MiniSetup/Ezport/Ezport.mak new file mode 100644 index 0000000..54bb85f --- /dev/null +++ b/EDK/MiniSetup/Ezport/Ezport.mak @@ -0,0 +1,123 @@ +##*****************************************************************## +##*****************************************************************## +##*****************************************************************## +##** **## +##** (C)Copyright 1985-2010, American Megatrends, Inc. **## +##** **## +##** All Rights Reserved. **## +##** **## +##** 5555 Oakbrook Pkwy , Norcross, GA 30071 **## +##** **## +##** Phone (770)-246-8600 **## +##** **## +##*****************************************************************## +##*****************************************************************## +##*****************************************************************## +## $Archive: /Alaska/SOURCE/Modules/AMITSE2_0/AMITSE/Ezport/Ezport.mak $ +## +## $Author: Arunsb $ +## +## $Revision: 6 $ +## +## $Date: 10/18/12 6:05a $ +## +##*****************************************************************## +##*****************************************************************## +## Revision History +## ---------------- +## $Log: /Alaska/SOURCE/Modules/AMITSE2_0/AMITSE/Ezport/Ezport.mak $ +# +# 6 10/18/12 6:05a Arunsb +# Updated for 2.16.1235 QA submission +## +## 7 10/10/12 12:42p Arunsb +## Synched the source for v2.16.1232, backup with Aptio +# +# 5 2/19/10 1:02p Madhans +# Updated for TSE 2.01. Refer Changelog.log for File change history. +## +## 5 2/19/10 8:15a Mallikarjunanv +## updated year in copyright message +## +## 4 8/17/09 12:23p Presannar +## Removed Include path to Core directory +## +## 3 6/24/09 6:10p Madhans +## Made TSE_USE_EDK_LIBRARY=OFF to not to refer EDK module. +## +## 2 6/12/09 2:36p Blaines +## Update coding standard +## +## 1 6/04/09 8:05p Madhans +# +# 1 4/28/09 11:15p Madhans +# Tse 2.0 Code complete Checkin. +## +## 3 4/28/09 9:39p Madhans +## Tse 2.0 Code complete Checkin. +## +## 2 4/24/09 9:35p Blaines +## +## 1 12/18/08 7:59p Madhans +## Intial version of TSE Lite sources +## +## +##*****************************************************************## +##*****************************************************************## + +# MAK file for the eModule:TseLite + +TSE_STYLE_INCLUDES = \ + -I $(TSE_STYLE_DIR) \ +!if "$(UEFI_SOURCES_SUPPORT)" == "1" + -I $(UEFISRC_DIR) \ +!endif + -I $(TSESRC_DIR) \ + -I $(TSESRC_DIR)\AMILOGO \ + -I $(TSELITESRC_DIR) \ + -I $(TSEBIN_DIR) \ + -I $(TSEBIN_DIR)\Inc \ +!if "$(TSE_BOARD_SOURCE_SUPPORT)" == "1" + -I $(TSE_BOARD_DIR)\ +!endif + -I $(PROJECT_DIR)\Include\Protocol \ + -I $(PROJECT_DIR) \ + -I $(PROJECT_DIR)\Include \ + -I $(BUILD_DIR) \ + +$(BUILD_DIR)\TseStyle.lib : TseStyleLib + +TseStyleLib : $(BUILD_DIR)\Ezport.mak TseStyleLibBin + +$(BUILD_DIR)\Ezport.mak : $(TSE_STYLE_DIR)\$(@B).cif $(TSE_STYLE_DIR)\$(@B).mak $(BUILD_RULES) + $(CIF2MAK) $(TSE_STYLE_DIR)\$(@B).cif $(CIF2MAK_DEFAULTS) + +!if "$(TSE_USE_EDK_LIBRARY)" == "1" +TSE_DEFAULTS = $(EDK_DEFAULTS) +!else +TSE_DEFAULTS = $(BUILD_DEFAULTS) +!endif + +TseStyleLibBin : + $(MAKE) /$(MAKEFLAGS) $(TSE_DEFAULTS)\ + /f $(BUILD_DIR)\Ezport.mak all\ + "MY_INCLUDES=$(TSE_STYLE_INCLUDES)"\ + "UNI_INCLUDE_PATH=$(TSEBIN_DIR)"\ + TYPE=LIBRARY \ + "EXT_HEADERS=$(BUILD_DIR)\token.h"\ + LIBRARY_NAME=$(BUILD_DIR)\TseStyle.lib\ + "CFLAGS=$(CFLAGS) /DTSE_FOR_APTIO_4_50" + +##*****************************************************************## +##*****************************************************************## +##** **## +##** (C)Copyright 1985-2010, American Megatrends, Inc. **## +##** **## +##** All Rights Reserved. **## +##** **## +##** 5555 Oakbrook Pkwy , Norcross, GA 30071 **## +##** **## +##** Phone (770)-246-8600 **## +##** **## +##*****************************************************************## +##*****************************************************************## diff --git a/EDK/MiniSetup/Ezport/Ezport.sdl b/EDK/MiniSetup/Ezport/Ezport.sdl new file mode 100644 index 0000000..2564578 --- /dev/null +++ b/EDK/MiniSetup/Ezport/Ezport.sdl @@ -0,0 +1,1057 @@ +TOKEN + Name = "TSE_STYLE_EZPORT_SUPPORT" + Value = "1" + Help = "Main switch to enable Ezport Style in TSE" + TokenType = Boolean + TargetEQU = Yes + TargetMAK = Yes + Master = Yes +End + +TOKEN + Name = "SETUP_STYLE_EZPORT" + Value = "1" + Help = "Condition to support Ezport Style Sources" + TokenType = Boolean + TargetH = Yes +End + +TOKEN + Name = "TSE_STYLE_SOURCES_SUPPORT" + Value = "1" + Help = "Don't Edit." + TokenType = Boolean + TargetMAK = Yes + TargetH = Yes +End + +TOKEN + Name = "SETUP_STYLE_FULL_SCREEN" + Value = "1" + Help = "Condition to support full screen layout" + TokenType = Boolean + TargetH = Yes +End + +TOKEN + Name = "STYLE_FULL_MAX_ROWS" + Value = "(UINT8)(31)" + Help = "Maximum rows in full screen mode" + TokenType = Expression + TargetH = Yes +End + +TOKEN + Name = "STYLE_FULL_MAX_COLS" + Value = "(UINT8)(100)" + Help = "Maximum columns in full screen mode" + TokenType = Expression + TargetH = Yes +End + +TOKEN + Name = "STYLE_STD_MAX_ROWS" + Value = "(UINT8)(24)" + Help = "Maximum rows in standard mode" + TokenType = Expression + TargetH = Yes +End + +TOKEN + Name = "STYLE_STD_MAX_COLS" + Value = "(UINT8)(80)" + Help = "Maximum columns in Standard mode" + TokenType = Expression + TargetH = Yes +End + +TOKEN + Name = "PAGEBORDER_FULL_X" + Value = "(UINT8)(0)" + Help = "X-Coordinate position of the Page border. (Default 0)" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "PAGEBORDER_FULL_Y" + Value = "(UINT8)(2)" + Help = "Y-Coordinate position of the Page border. (Default 2)" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "PAGEBORDER_FULL_W" + Value = "(UINT8)(STYLE_FULL_MAX_COLS)" + Help = "Horizontal width of the page border" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "PAGEBORDER_FULL_H" + Value = "(UINT8)(STYLE_FULL_MAX_ROWS - 3)" + Help = "Vertical height of the page border" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "FULL_VERTICAL_MAIN_DIVIDER" + Value = "(UINT8)(STYLE_FULL_MAX_COLS*2/3)" + Help = "Vertical divider (border) position between the MainFrame window and (helper and Navigation) frame windows." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "FULL_HORIZONTAL_HELP_DIVIDER" + Value = "(UINT8)(STYLE_FULL_MAX_ROWS/2)" + Help = "Horizontal divider (border) position between Help and Navigation frame windows." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "TITLE_FULL_X" + Value = "(UINT8)(0)" + Help = "X-Coordinate position of the Title bar frame. (Default 0)" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "TITLE_FULL_Y" + Value = "(UINT8)(0)" + Help = "Y-Coordinate position of the Title bar frame. (Default 0)" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "TITLE_FULL_W" + Value = "(UINT8)(STYLE_FULL_MAX_COLS)" + Help = "Horizontal Width of the Title bar frame. " + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "TITLE_FULL_H" + Value = "(UINT8)(1)" + Help = "Vertical Height of the Title bar frame" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "MENU_FULL_X" + Value = "(UINT8)(0)" + Help = "X-Coordinate position of the Menu bar frame" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "MENU_FULL_Y" + Value = "(UINT8)(1)" + Help = "Y-Coordinate position of the Menu bar frame" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "MENU_FULL_W" + Value = "(UINT8)(STYLE_FULL_MAX_COLS)" + Help = "Horizontal Width of the Menu bar frame" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "MENU_FULL_H" + Value = "1" + Help = "Vertical Height of the Menu bar frame" + TokenType = Integer + TargetH = Yes + +End + +TOKEN + Name = "HELPTITLE_FULL_X" + Value = "0" + Help = "X-Coordinate position of the Help Title frame window" + TokenType = Integer + TargetH = Yes + +End + +TOKEN + Name = "HELPTITLE_FULL_Y" + Value = "(UINT8)(PAGEBORDER_FULL_Y+PAGEBORDER_FULL_H)" + Help = "Y-Coordinate position of the Help Title frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "HELPTITLE_FULL_W" + Value = "(UINT8)(STYLE_FULL_MAX_COLS)" + Help = "Horizontal Width of the Help Title frame window" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "HELPTITLE_FULL_H" + Value = "1" + Help = "Vertical Height of the Help Title frame window" + TokenType = Integer + TargetH = Yes + +End + +TOKEN + Name = "HELP_FULL_X" + Value = "(UINT8)(FULL_VERTICAL_MAIN_DIVIDER+1)" + Help = "X-Coordinate position of the Help frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "HELP_FULL_Y" + Value = "(UINT8)(PAGEBORDER_FULL_Y+1)" + Help = "Y-Coordinate position of the Help frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "HELP_FULL_W" + Value = "(UINT8)(PAGEBORDER_FULL_W - FULL_VERTICAL_MAIN_DIVIDER-2)" + Help = "Horizontal Width of the Help frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "HELP_FULL_H" + Value = "(UINT8)(FULL_HORIZONTAL_HELP_DIVIDER - PAGEBORDER_FULL_Y - 2)" + Help = "Vertical Height of the Help frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "MAIN_FULL_X" + Value = "(UINT8)(PAGEBORDER_FULL_X+1)" + Help = "X-Coordinate position of the Main frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "MAIN_FULL_Y" + Value = "(UINT8)(PAGEBORDER_FULL_Y+1)" + Help = "Y-Coordinate position of the Main frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "MAIN_FULL_W" + Value = "(UINT8)(FULL_VERTICAL_MAIN_DIVIDER - 2)" + Help = "Horizontal Width of the Main frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "MAIN_FULL_H" + Value = "(UINT8)(PAGEBORDER_FULL_H-2)" + Help = "Vertical Height of the Main frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "NAV_FULL_X" + Value = "(UINT8)(FULL_VERTICAL_MAIN_DIVIDER+1)" + Help = "X-Coordinate position of the Navigation frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "NAV_FULL_Y" + Value = "(UINT8)(FULL_HORIZONTAL_HELP_DIVIDER+1)" + Help = "Y-Coordinate position of the Navigation frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "NAV_FULL_W" + Value = "(UINT8)(PAGEBORDER_FULL_W - FULL_VERTICAL_MAIN_DIVIDER-2)" + Help = "Horizontal Width of the Navigation frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "NAV_FULL_H" + Value = "(UINT8)(PAGEBORDER_FULL_H - FULL_HORIZONTAL_HELP_DIVIDER)" + Help = "Vertical Height of the Navigation frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "PAGEBORDER_X" + Value = "0" + Help = "X-Coordinate position of the Page border. (Default 0)" + TokenType = Integer + TargetH = Yes + +End + +TOKEN + Name = "PAGEBORDER_Y" + Value = "2" + Help = "Y-Coordinate position of the Page border. (Default 2)" + TokenType = Integer + TargetH = Yes + +End + +TOKEN + Name = "PAGEBORDER_W" + Value = "(UINT8)(STYLE_STD_MAX_COLS)" + Help = "Horizontal width of the page border" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "PAGEBORDER_H" + Value = "(UINT8)(STYLE_STD_MAX_ROWS - 3)" + Help = "Vertical height of the page border." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "VERTICAL_MAIN_DIVIDER" + Value = "(UINT8)(STYLE_STD_MAX_COLS*2/3)" + Help = "Vertical divider (border) position between the MainFrame window and (helper and Navigation) frame windows." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "HORIZONTAL_HELP_DIVIDER" + Value = "(UINT8)(STYLE_STD_MAX_ROWS/2)" + Help = "Horizontal divider (border) position between Help and Navigation frame windows." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "TITLE_X" + Value = "(UINT8)(0)" + Help = "X-Coordinate position of the Title bar frame. (Default 0)" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "TITLE_Y" + Value = "(UINT8)(0)" + Help = "Y-Coordinate position of the Title bar frame. (Default 0)" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "TITLE_W" + Value = "(UINT8)(STYLE_STD_MAX_COLS)" + Help = "Horizontal Width of the Title bar frame" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "TITLE_H" + Value = "(UINT8)(1)" + Help = "Vertical Height of the Title bar frame" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "MENU_X" + Value = "(UINT8)(0)" + Help = "X-Coordinate position of the Menu bar frame" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "MENU_Y" + Value = "(UINT8)(1)" + Help = "Y-Coordinate position of the Menu bar frame" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "MENU_W" + Value = "(UINT8)(STYLE_STD_MAX_COLS)" + Help = "Horizontal Width of the Menu bar frame" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "MENU_H" + Value = "1" + Help = "Vertical Height of the Menu bar frame" + TokenType = Integer + TargetH = Yes + +End + +TOKEN + Name = "HELPTITLE_X" + Value = "0" + Help = "X-Coordinate position of the Help Title frame window" + TokenType = Integer + TargetH = Yes + +End + +TOKEN + Name = "HELPTITLE_Y" + Value = "(UINT8)(PAGEBORDER_Y+PAGEBORDER_H)" + Help = "Y-Coordinate position of the Help Title frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "HELPTITLE_W" + Value = "(UINT8)(STYLE_STD_MAX_COLS)" + Help = "Horizontal Width of the Help Title frame window" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "HELPTITLE_H" + Value = "1" + Help = "Vertical Height of the Help Title frame window" + TokenType = Integer + TargetH = Yes + +End + +TOKEN + Name = "HELP_X" + Value = "(UINT8)(VERTICAL_MAIN_DIVIDER+1)" + Help = "X-Coordinate position of the Help frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "HELP_Y" + Value = "(UINT8)(PAGEBORDER_Y+1)" + Help = "Y-Coordinate position of the Help frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "HELP_W" + Value = "(UINT8)(PAGEBORDER_W - VERTICAL_MAIN_DIVIDER-2)" + Help = "Horizontal Width of the Help frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "HELP_H" + Value = "(UINT8)(HORIZONTAL_HELP_DIVIDER - PAGEBORDER_Y - 1)" + Help = "Vertical Height of the Help frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "MAIN_X" + Value = "(UINT8)(PAGEBORDER_X+1)" + Help = "X-Coordinate position of the Main frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "MAIN_Y" + Value = "(UINT8)(PAGEBORDER_Y+1)" + Help = "Y-Coordinate position of the Main frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "MAIN_W" + Value = "(UINT8)(VERTICAL_MAIN_DIVIDER - 2)" + Help = "Horizontal Width of the Main frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "MAIN_H" + Value = "(UINT8)(PAGEBORDER_H-1)" + Help = "Vertical Height of the Main frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "NAV_X" + Value = "(UINT8)(VERTICAL_MAIN_DIVIDER+1)" + Help = "X-Coordinate position of the Navigation frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "NAV_Y" + Value = "(UINT8)(HORIZONTAL_HELP_DIVIDER+1)" + Help = "Y-Coordinate position of the Navigation frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "NAV_W" + Value = "(UINT8)(PAGEBORDER_W - VERTICAL_MAIN_DIVIDER-2)" + Help = "Horizontal Width of the Navigation frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "NAV_H" + Value = "(UINT8)(PAGEBORDER_H - HORIZONTAL_HELP_DIVIDER)" + Help = "Vertical Height of the Navigation frame window." + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "PAGE_BGCOLOR" + Value = "(UINT8)(EFI_BACKGROUND_LIGHTGRAY)" + Help = "Background Color of the main area (Main, Help, and Navigation Frames) in a page." + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "PAGE_FGCOLOR" + Value = "(UINT8)(EFI_BLUE)" + Help = "Foreground and Border Color of main area in a page (Default EFI_BLUE)" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "MAIN_BGCOLOR" + Value = "(UINT8)(PAGE_BGCOLOR)" + Help = "Background Color of the Main frame." + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "MAIN_FGCOLOR" + Value = "(UINT8)(PAGE_FGCOLOR)" + Help = "Foreground Color of the Main frame." + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "TITLE_BGCOLOR" + Value = "(UINT8)(EFI_BACKGROUND_BLUE)" + Help = "Background Color of the Title bar frame." + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "TITLE_FGCOLOR" + Value = "(UINT8)(EFI_WHITE)" + Help = "Foreground Color of the Title bar frame" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "MENU_BGCOLOR" + Value = "(UINT8)(EFI_BACKGROUND_BLUE)" + Help = "Background color of the Menu bar frame" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "MENU_FGCOLOR" + Value = "(UINT8)(EFI_LIGHTGRAY)" + Help = "Foreground Color of the Menu bar frame" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "SELECTED_MENU_BGCOLOR" + Value = "(UINT8)(EFI_BACKGROUND_LIGHTGRAY)" + Help = "Background color of the Selected Menu in the Menu bar frame" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "SELECTED_MENU_FGCOLOR" + Value = "(UINT8)(EFI_BLUE)" + Help = "Foreground Color of the Selected Menu in the Menu bar frame" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "HELP_BGCOLOR" + Value = "(UINT8)(PAGE_BGCOLOR)" + Help = "Background color of the Help Frame (Default PAGE_BGCOLOR)" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "HELP_FGCOLOR" + Value = "(UINT8)(PAGE_FGCOLOR)" + Help = "Foreground Color of the Help Frame (Default PAGE_FGCOLOR)" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "HELPTITLE_BGCOLOR" + Value = "(UINT8)(EFI_BACKGROUND_BLUE)" + Help = "Background color of the Help Title Frame" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "HELPTITLE_FGCOLOR" + Value = "(UINT8)(EFI_LIGHTGRAY)" + Help = "Foreground Color of the Help Title Frame" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "NAV_BGCOLOR" + Value = "(UINT8)(PAGE_BGCOLOR)" + Help = "Background color of the Navigation Frame" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "NAV_FGCOLOR" + Value = "(UINT8)(PAGE_FGCOLOR)" + Help = "Foreground Color of the Navigation Frame" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "SCROLLBAR_BGCOLOR" + Value = "(UINT8)(PAGE_BGCOLOR)" + Help = "Background color of the Scroll bar (Default PAGE_BGCOLOR)" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "SCROLLBAR_FGCOLOR" + Value = "(UINT8)(PAGE_FGCOLOR)" + Help = "Foreground Color of the Scroll bar (Default PAGE_FGCOLOR)" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "SCROLLBAR_UPARROW_BGCOLOR" + Value = "(UINT8)(PAGE_BGCOLOR)" + Help = "Background color of the Scroll bar Up-Arrow (Default PAGE_BGCOLOR)" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "SCROLLBAR_UPARROW_FGCOLOR" + Value = "(UINT8)(PAGE_FGCOLOR)" + Help = "Foreground Color of the Scroll bar Up-Arrow (Default PAGE_FGCOLOR)" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "SCROLLBAR_DOWNARROW_BGCOLOR" + Value = "(UINT8)(PAGE_BGCOLOR)" + Help = "Background color of the Scroll bar Down-Arrow (Default PAGE_BGCOLOR)" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "SCROLLBAR_DOWNARROW_FGCOLOR" + Value = "(UINT8)(PAGE_FGCOLOR)" + Help = "Foreground Color of the Scroll bar Down-Arrow (Default PAGE_FGCOLOR)" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "POPUP_BGCOLOR" + Value = "(UINT8)(EFI_BACKGROUND_BLUE)" + Help = "Background Color of Popup Windows, and Message Boxes (Default EFI_BACKGROUND_BLUE)" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "POPUP_FGCOLOR" + Value = "(UINT8)(EFI_WHITE)" + Help = "Foreground Color of Popup Windows, and Message Boxes (Default EFI_WHITE)" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "FOCUS_COLOR" + Value = "(UINT8)(EFI_WHITE)" + Help = "Focused label and control text color (Default EFI_WHITE)" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "LABEL_FOCUS_COLOR" + Value = "(UINT8)(FOCUS_COLOR)" + Help = "Focused label text color (Default same as FOCUS_COLOR)" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "CONTROL_FOCUS_COLOR" + Value = "(UINT8)(FOCUS_COLOR)" + Help = "Focused control text color (Default same as FOCUS_COLOR)" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "NON_FOCUS_COLOR" + Value = "(UINT8)(PAGE_FGCOLOR)" + Help = "Non Focused label and control text color (Default PAGE_FGCOLOR)" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "LABEL_NON_FOCUS_COLOR" + Value = "(UINT8)(NON_FOCUS_COLOR)" + Help = "Non Focused label text color (Default same as NON_FOCUS_COLOR)" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "CONTROL_NON_FOCUS_COLOR" + Value = "(UINT8)(NON_FOCUS_COLOR)" + Help = "Non Focused control text color (Default same as NON_FOCUS_COLOR)" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "PAGE_LINK_COLOR" + Value = "(UINT8)(PAGE_FGCOLOR)" + Help = "Submenu text color (Default PAGE_FGCOLOR)" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "EDIT_BGCOLOR" + Value = "(UINT8)(EFI_BACKGROUND_BLUE)" + Help = "Background color of focused edit controls" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "EDIT_FGCOLOR" + Value = "(UINT8)(EFI_WHITE)" + Help = "Foreground color of focused edit controls" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "TEXT_COLOR" + Value = "(UINT8)(EFI_DARKGRAY)" + Help = "Foreround color of text controls" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "MEMO_COLOR" + Value = "(UINT8)(EFI_BLACK)" + Help = "Foreground color of Memo controls" + TokenType = Expression + TargetH = Yes + Range = "0x0-0x0f" +End + +TOKEN + Name = "FULL_STYLE_CONTROL_LEFT_MARGIN" + Value = "37" + Help = "Control column left margin in full screen mode" + TokenType = Integer + TargetH = Yes +End + +TOKEN + Name = "FULL_STYLE_CONTROL_LEFT_PAD" + Value = "2" + Help = "Control left padding in full screen mode" + TokenType = Integer + TargetH = Yes + +End + +TOKEN + Name = "FULL_STYLE_CONTROL_RIGHT_AREA_WIDTH" + Value = "((UINT8)FULL_VERTICAL_MAIN_DIVIDER - FULL_STYLE_CONTROL_LEFT_MARGIN - FULL_STYLE_CONTROL_LEFT_PAD)" + Help = "Control column width in full screen mode" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "STYLE_CONTROL_LEFT_MARGIN" + Value = "24" + Help = "Control column left margin" + TokenType = Integer + TargetH = Yes + +End + +TOKEN + Name = "STYLE_CONTROL_LEFT_PAD" + Value = "2" + Help = "Control left padding" + TokenType = Integer + TargetH = Yes + +End + +TOKEN + Name = "STYLE_CONTROL_RIGHT_AREA_WIDTH" + Value = "((UINT8)VERTICAL_MAIN_DIVIDER - STYLE_CONTROL_LEFT_MARGIN - STYLE_CONTROL_LEFT_PAD)" + Help = "Control column width" + TokenType = Expression + TargetH = Yes +End + +TOKEN + Name = "FULL_STYLE_LABEL_LEFT_MARGIN" + Value = "2" + Help = "Label column left margin in full screen mode" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "STYLE_LABEL_LEFT_MARGIN" + Value = "2" + Help = "Label column left margin in normal screen mode" + TokenType = Expression + TargetH = Yes + +End + +TOKEN + Name = "STYLE_SCROLLBAR_ROLLOVER" + Value = "1" + Help = "Support rollover when the scroll limit has been reached" + TokenType = Boolean + TargetH = Yes +End + +TOKEN + Name = "STYLE_PAGE_FIRSTITEM_FOCUS" + Value = "0" + Help = "Reset focus to the first item when navigating to a new page. (Default 0 => Set focus to previously selected item)" + TokenType = Boolean + TargetH = Yes +End + +TOKEN + Name = "STYLE_SUBPAGE_FIRSTITEM_FOCUS" + Value = "0" + Help = "Reset focus to the first item when navigating back from submenu. (Default 0 => Set focus to previously selected item)" + TokenType = Boolean + TargetH = Yes +End + +TOKEN + Name = "STYLE_HOTKEY_FAILSAFE" + Value = "SCAN_F6" + Help = " Hot Key to load fail safe values" + TokenType = Expression + TargetH = Yes +End + +TOKEN + Name = "STYLE_SHADOW_SUPPORT" + Value = "1" + Help = " To enable/disable shadow support" + TokenType = Boolean + TargetH = Yes +End + +TOKEN + Name = "STYLE_SPACEKEY_INCREMENT" + Value = "1" + Help = " < need to add help >" + TokenType = Integer + TargetH = Yes +End + + +PATH + Name = "TSE_STYLE_DIR" +End + +MODULE + Help = "Includes Ezport.mak to Project" + File = "Ezport.mak" +End + +ELINK + Name = "$(BUILD_DIR)\TSEStyle.lib" + Parent = "$(TSE_STYLE_DIR)\TSEStyle$(ARCH).lib" + InvokeOrder = ReplaceParent +End + + diff --git a/EDK/MiniSetup/Ezport/ezport.c b/EDK/MiniSetup/Ezport/ezport.c new file mode 100644 index 0000000..3755b71 --- /dev/null +++ b/EDK/MiniSetup/Ezport/ezport.c @@ -0,0 +1,731 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 1985-2011, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy , Norcross, GA 30071 **// +//** **// +//** Phone: (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +// $Archive: /Alaska/SOURCE/Modules/AMITSE2_0/AMITSE/Ezport/ezport.c $ +// +// $Author: Premkumara $ +// +// $Revision: 16 $ +// +// $Date: 11/26/13 12:07a $ +// +//*****************************************************************// +//*****************************************************************// +// Revision History +// ---------------- +// $Log: /Alaska/SOURCE/Modules/AMITSE2_0/AMITSE/Ezport/ezport.c $ +// +// 16 11/26/13 12:07a Premkumara +// [TAG] EIP123006 +// [Category] Bug Fix +// [Severity] Normal +// [Symptom] When switch language between English to Japanese will have +// display japanese character in exit page +// [RootCause] While drawing the frame gFlushBuffer is not flushed +// properly +// [Solution] Before drawing frames gFlushBuffer is reset with empty +// characters to clear the screen properly +// [Files] Ezport.c +// +// 15 2/11/13 5:57a Premkumara +// [TAG] EIP112628 +// [Category] Bug Fix +// [Severity] Important +// [Symptom] (JP000E)SETUP_GO_TO_EXIT_PAGE_ON_EXIT_KEY does not work on +// 4.6.2_TSE_2_15_1234 +// [RootCause] The Exit FormID value will change if any form is +// generated before Exit page +// [Solution] Handled Exit FormID from Binary and handling Exit FormID +// from binary +// [Files] Ezport.c, Ezport.sdl, Legacy.c, Legacy.sdl, EzportPlus.c, +// EzportPlus.sdl +// +// 14 1/22/13 12:15a Rajashakerg +// [TAG] EIP103449 +// [Category] Bug Fix +// [Severity] Important +// [Symptom] In Setup click\Touch from navigation window, option are not +// displayed properly +// [RootCause] Latest mouse driver providing LEFT_DOWN when we hold the +// mouse left down button. +// [Solution] Provided fix resolves the issue. +// [Files] ezport.c, PopupEdit.c, ListBox.c, MessageBox.c +// +// 13 10/18/12 6:05a Arunsb +// Updated for 2.16.1235 QA submission +// +// 14 10/10/12 12:42p Arunsb +// Synched the source for v2.16.1232, backup with Aptio +// +// 12 5/24/12 7:29a Rajashakerg +// [TAG] EIP88811 +// [Category] Bug Fix +// [Severity] Normal +// [Symptom] When pop-up window is invoked in setup and Click on ESC +// icon or ESC/Right Click, it will respond as two times ESC is clicked +// [RootCause] ESC functionality provided for left click on the ESC +// sting navigation frame . +// [Solution] Now providing the ESC sequence for left down and double +// click +// [Files] ezport.c, numeric.c, MessageBox.c +// +// 11 11/20/11 7:26a Rajashakerg +// [TAG] EIP62763 +// [Category] Improvement +// [Description] Utilize the Improvements done from mouse driver in +// AMITSE +// [Files] HookAnchor.h, TseCommon.h, AMITSE.sdl, CommonHelper.c, +// commonoem.c, commonoem.h, buffer.c, globals.c, HookAnchor.c, +// minisetup.h, notify.c, postmgmt.c, protocol.c, ezport.c, stylecommon.c, +// Mouse.c, Action.c, Date.c, frame.c, MessageBox.c, minisetupext.c, +// minisetupext.h, numeric.c, numeric.h, page.c, PopupEdit.c, PopupEdit.h, +// PopupPassword.c, postmgmtext.c, time.c. +// +// 10 6/29/11 12:26p Rajashakerg +// [TAG] EIP47086, 62098 +// [Category] New Feature +// [Description] Right clicking from the Main page is not exiting from +// BIOS setup and the Mouse hotclicks. +// [Files] minisetup.h, Ezport\style.h,Ezport\EzportBin.sdl, +// Ezport\EzportBin.mak, Ezport\ezport.c, Ezport\EzportBin.cif, +// EzportPlus\style.h, EzportPlus\EzportPlusBin.sdl, EzportPlusBin.mak, +// EzportPlus\EzportPlusBin.cif, EzportPlus\ezportplus.c, Legacy\style.h, +// Legacy\EzportPlusBin.sdl, Legacy\LegacyBin.mak, Legacy\LegacyBin.cif, +// Legacy\legacy.c, TseLiteBin.sdl, TseLite.cif, Memo.c, frame.c, +// application.h, application.c, commonoem.h, CommonHelper.c +// +// 9 3/28/11 5:13p Rajashakerg +// [TAG] EIP56413 +// [Category] Improvement +// [Description] TSE: Support for EFI_IFR_RESET_BUTTON opcode +// [Files] ezport.c, minisetupext.h, ResetButton.c, ResetButton.h, +// Hii.c, TseUefiHii.h, Uefi21Wapper.c, hii.h, Uefi20Wapper.c +// +// 8 6/17/10 2:59p Madhans +// Dynamic parsing support in TSE. +// +// 7 4/16/10 5:13p Madhans +// Changes for Tse 2.02. Please see Changelog.log for more details. +// +// 6 2/19/10 1:02p Madhans +// Updated for TSE 2.01. Refer Changelog.log for File change history. +// +// 10 2/19/10 8:15a Mallikarjunanv +// updated year in copyright message +// +// 9 2/15/10 10:12p Madhans +// To avoid warnings +// +// 8 1/09/10 6:11a Mallikarjunanv +// Updated TSE2.01 Release sources with coding standards +// +// 7 8/24/09 5:15p Blaines +// Fix issue setting title and helptitle background color after clear +// screen +// +// 6 8/13/09 1:22p Blaines +// Support BgColor for MAIN_FRAME, NAV_FRAME, and HELP_FRAME +// +// 5 8/04/09 6:57p Blaines +// Add Support for Exit Page SDL tokens +// +// 3 6/23/09 6:54p Blaines +// Coding standard update, +// Remove spaces from file header to allow proper chm function list +// creation. +// +// 2 6/12/09 2:36p Blaines +// Update coding standard +// +// 1 6/04/09 8:05p Madhans +// +// 3 5/07/09 10:35a Madhans +// Changes after Bin module +// +// 9 5/05/09 3:20p Blaines +// +// 8 5/04/09 6:52p Blaines +// Support customizable Help and Nav frame text Foreground color +// +// 7 5/01/09 9:25p Blaines +// +// 6 4/30/09 9:54p Blaines +// +// 4 4/28/09 9:39p Madhans +// Tse 2.0 Code complete Checkin. +// +// 3 4/24/09 9:35p Blaines +// +// 1 12/18/08 7:59p Madhans +// Intial version of TSE Lite sources +//*****************************************************************// +//*****************************************************************// +//<AMI_FHDR_START> +// +// Name: ezport.c +// +// Description: Main file for ezport style module. +// +//<AMI_FHDR_END> +//********************************************************************** +#include "minisetup.h" +#include "ezport.h" + +extern STYLECOLORS Colors ; +extern AMI_IFR_MENU gMenuData ; + +extern UINTN gLabelLeftMargin ; +extern UINTN gControlLeftMargin ; +extern UINTN gControlLeftPad ; +extern UINTN gControlRightAreaWidth ; +static CALLBACK_SUBMENU gMenuCallbackData = { { CALLBACK_TYPE_MENU, sizeof(CALLBACK_MENU) }, 0 }; +static CALLBACK_SUBMENU gSubmenuCallbackData = { { CALLBACK_TYPE_SUBMENU, sizeof(CALLBACK_SUBMENU) }, 0 }; +static CALLBACK_VARIABLE gVariableCallbackData = { { CALLBACK_TYPE_VARIABLE, sizeof(CALLBACK_VARIABLE) }, 0, 0, 0, NULL }; +static CALLBACK_PASSWORD gPasswordCallbackData = { { CALLBACK_TYPE_PASSWORD, sizeof(CALLBACK_PASSWORD) }, 0, 0, 0, NULL, TRUE }; + +VOID _FrameSubmenuCallback( FRAME_DATA *frame, SUBMENU_DATA *submenu, VOID *cookie ); +VOID _FrameMenuCallback( FRAME_DATA *frame, MENU_DATA *menu, VOID *cookie ); +VOID HotclickESCaction(VOID); +BOOLEAN gotoExitOnEscKey(EFI_GUID *exitFormGuid, UINT16 *pageClass, UINT16 *pageSubclass, UINT16 *pageFormID); //EIP-112628 + +#if SETUP_STYLE_EZPORT + +#if SETUP_STYLE_FULL_SCREEN +static FRAME_INFO _gStyleFullSubFrames[] = +{ +// { FrameType Drawable Border, BorderType, Width, Height, Top, Left, FGColor, BGColor } + { TITLE_FRAME, TRUE, FALSE, 0, TITLE_FULL_W, TITLE_FULL_H, TITLE_FULL_Y, TITLE_FULL_X, TITLE_FGCOLOR, TITLE_BGCOLOR },// TITLE + { SUBTITLE_FRAME, TRUE, FALSE, 0, MENU_FULL_W, MENU_FULL_H, MENU_FULL_Y, MENU_FULL_X, MENU_FGCOLOR, MENU_BGCOLOR },// SUBTITLE (MENU) + { MAIN_FRAME, TRUE, FALSE, 0, MAIN_FULL_W, MAIN_FULL_H, MAIN_FULL_Y, MAIN_FULL_X, PAGE_FGCOLOR, MAIN_BGCOLOR },// Main + { HELP_FRAME, TRUE, FALSE, 0, HELP_FULL_W, HELP_FULL_H, HELP_FULL_Y, HELP_FULL_X, HELP_FGCOLOR, HELP_BGCOLOR },// HELP + { NAV_FRAME, TRUE, FALSE, 0, NAV_FULL_W, NAV_FULL_H, NAV_FULL_Y, NAV_FULL_X, NAV_FGCOLOR, NAV_BGCOLOR },// NAVIGATION + { HELPTITLE_FRAME, TRUE, FALSE, 0, HELPTITLE_FULL_W, HELPTITLE_FULL_H, HELPTITLE_FULL_Y, HELPTITLE_FULL_X, HELPTITLE_FGCOLOR, HELPTITLE_BGCOLOR } // HELP TITLE (Copyright) +}; +#endif + +static FRAME_INFO _gStyleStandardSubFrames[] = +{ +// { FrameType Drawable Border, BorderType, Width, Height, Top, Left, FGColor, BGColor } + { TITLE_FRAME, TRUE, FALSE, 0, TITLE_W, TITLE_H, TITLE_Y, TITLE_X, TITLE_FGCOLOR, TITLE_BGCOLOR },// TITLE + { SUBTITLE_FRAME, TRUE, FALSE, 0, MENU_W, MENU_H, MENU_Y, MENU_X, MENU_FGCOLOR, MENU_BGCOLOR },// SUBTITLE (MENU) + { MAIN_FRAME, TRUE, FALSE, 0, MAIN_W, MAIN_H, MAIN_Y, MAIN_X, PAGE_FGCOLOR, MAIN_BGCOLOR },// Main + { HELP_FRAME, TRUE, FALSE, 0, HELP_W, HELP_H, HELP_Y, HELP_X, HELP_FGCOLOR, HELP_BGCOLOR },// HELP + { NAV_FRAME, TRUE, FALSE, 0, NAV_W, NAV_H, NAV_Y, NAV_X, NAV_FGCOLOR, NAV_BGCOLOR },// NAVIGATION + { HELPTITLE_FRAME, TRUE, FALSE, 0, HELPTITLE_W, HELPTITLE_H, HELPTITLE_Y, HELPTITLE_X, HELPTITLE_FGCOLOR, HELPTITLE_BGCOLOR } // HELP TITLE (Copyright) +}; + +AMITSE_CONTROL_MAP gTseControlMap[] = +{ +// ControlType ControlMethods CallbackSuppored CallbackFunction CallbackContext + { CONTROL_TYPE_MENU, (CONTROL_METHODS*)&gMenu, TRUE, (VOID*)(UINTN)&_FrameMenuCallback, (VOID*)(UINTN)&gMenuCallbackData}, + { CONTROL_TYPE_SUBMENU, (CONTROL_METHODS*)&gSubMenu,TRUE, (VOID*)(UINTN)&_FrameSubmenuCallback, (VOID*) &gSubmenuCallbackData}, + { CONTROL_TYPE_LABEL, (CONTROL_METHODS*)&gLabel, TRUE, (VOID*)(UINTN)&StyleLabelCallback, (VOID*) NULL}, + { CONTROL_TYPE_TEXT, (CONTROL_METHODS*)&gText, FALSE,(VOID*)NULL, (VOID*) NULL}, + { CONTROL_TYPE_POPUP_STRING, (CONTROL_METHODS*)&gPopupString, TRUE, (VOID*)(UINTN)&_FrameVariableCallback, (VOID*) &gVariableCallbackData}, + { CONTROL_TYPE_DATE, (CONTROL_METHODS*)&gDate, FALSE, (VOID*)NULL, (VOID*) NULL}, + { CONTROL_TYPE_TIME, (CONTROL_METHODS*)&gTime, FALSE, (VOID*)NULL, (VOID*) NULL}, + { CONTROL_TYPE_POPUPSEL, (CONTROL_METHODS*)&gPopupSel, TRUE, (VOID*)(UINTN)&_FrameVariableCallback, (VOID*) &gVariableCallbackData}, + // Checkbox is just popup sel + { CONTROL_TYPE_CHECKBOX, (CONTROL_METHODS*)&gPopupSel, TRUE, (VOID*)(UINTN)&_FrameVariableCallback, (VOID*) &gVariableCallbackData}, + { CONTROL_TYPE_MEMO, (CONTROL_METHODS*)&gMemo, FALSE, (VOID*)NULL, (VOID*)NULL}, + { CONTROL_TYPE_NUMERIC, (CONTROL_METHODS*)&gNumeric, TRUE, (VOID*)(UINTN)&_FrameVariableCallback, (VOID*) &gVariableCallbackData}, + { CONTROL_TYPE_ORDERED_LIST, (CONTROL_METHODS*)&gOrdListBox, TRUE, (VOID*)(UINTN)&_FrameVariableCallback, (VOID*) &gVariableCallbackData}, + { CONTROL_TYPE_PASSWORD, (CONTROL_METHODS*)&gPopupPassword, TRUE, (VOID*)(UINTN)&_FramePasswordCallback, (VOID*)&gPasswordCallbackData}, + { CONTROL_TYPE_ACTION, (CONTROL_METHODS*)&gUefiAction, TRUE, (VOID*)(UINTN) &StyleLabelCallback, (VOID*) NULL}, + { CONTROL_TYPE_RESET, (CONTROL_METHODS*)&gResetButton, TRUE, (VOID*)(UINTN) &StyleLabelCallback, (VOID*) NULL},//EIP:56413 Updated the Reset Button Control information + // CONTROL_TYPE_NULL need to be last member + { CONTROL_TYPE_NULL, (CONTROL_METHODS*)NULL, FALSE, (VOID*)NULL, (VOID*) NULL} +}; + +static FRAME_INFO *_gStyleSubFrames = _gStyleStandardSubFrames ; + +UINT8 gVerticalMainDivider = VERTICAL_MAIN_DIVIDER ; +UINT8 gHorizontalHelpDivider = HORIZONTAL_HELP_DIVIDER ; + +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: OverRideStyleInit +// +// Description: Function to initialize style +// +// Input: VOID +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID OverRideStyleInit( VOID ) +{ + + gLabelLeftMargin = STYLE_LABEL_LEFT_MARGIN ; + gControlLeftMargin = STYLE_CONTROL_LEFT_MARGIN ; + gControlLeftPad = STYLE_CONTROL_LEFT_PAD ; + gControlRightAreaWidth = STYLE_CONTROL_RIGHT_AREA_WIDTH ; + + +#if SETUP_STYLE_FULL_SCREEN + if ( gMaxCols == STYLE_FULL_MAX_COLS ) + { + _gStyleSubFrames = _gStyleFullSubFrames; + + gVerticalMainDivider = FULL_VERTICAL_MAIN_DIVIDER ; + gHorizontalHelpDivider = FULL_HORIZONTAL_HELP_DIVIDER ; + + gLabelLeftMargin = FULL_STYLE_LABEL_LEFT_MARGIN ; + gControlLeftMargin = FULL_STYLE_CONTROL_LEFT_MARGIN ; + gControlLeftPad = FULL_STYLE_CONTROL_LEFT_PAD ; + gControlRightAreaWidth = FULL_STYLE_CONTROL_RIGHT_AREA_WIDTH ; + } +#endif + + if(gLabelLeftMargin < 2) + gLabelLeftMargin = 2 ; + +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleFrameIndexOf +// +// Description: Function to get frame index +// +// Input: UINT32 frameType +// +// Output: UINT32 index +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +UINT32 StyleFrameIndexOf( UINT32 frameType ) +{ + UINT32 FrameCount ; + UINT32 i; + + FrameCount = sizeof(_gStyleStandardSubFrames) / sizeof(FRAME_INFO); + + + for ( i = 0; i < FrameCount; i++ ) + { + if( _gStyleSubFrames[i].FrameType == frameType ){ + return i ; + break ; + } + } + + return i ; + +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleGetPageFrames +// +// Description: Function to number of frames +// +// Input: UINT32 page +// +// Output: UINT32 number of frames +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +UINT32 StyleGetPageFrames( UINT32 page ) +{ + return sizeof(_gStyleStandardSubFrames) / sizeof(FRAME_INFO); +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: OverRideStyleDrawPageBorder +// +// Description: Function to draw page border +// +// Input: UINT32 page +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID OverRideStyleDrawPageBorder( UINT32 page ) +{ + PAGE_DATA *Page ; + FRAME_DATA *fTitle, *fMenu, *fHelptitle, *fMain; + + CHAR16 *line; + UINT8 lineNumber; + UINT8 start, end, col; + UINT8 pbx,pby,pbw,pbh; + UINT8 vertDivider = VERTICAL_MAIN_DIVIDER ; + UINT8 horzDivider = HORIZONTAL_HELP_DIVIDER; + + Page = gApp->PageList[page]; + + fTitle = Page->FrameList[StyleFrameIndexOf(TITLE_FRAME)]; + fHelptitle = Page->FrameList[StyleFrameIndexOf(HELPTITLE_FRAME)]; + fMenu = Page->FrameList[StyleFrameIndexOf(SUBTITLE_FRAME)]; + fMain = Page->FrameList[StyleFrameIndexOf(MAIN_FRAME)];//EIP-123006 + + pbx = PAGEBORDER_X; + pby = PAGEBORDER_Y; + pbw = PAGEBORDER_W; + pbh = PAGEBORDER_H; + + if ( gMaxCols == STYLE_FULL_MAX_COLS ) + { + vertDivider = FULL_VERTICAL_MAIN_DIVIDER ; + horzDivider = FULL_HORIZONTAL_HELP_DIVIDER; + pbx = PAGEBORDER_FULL_X; + pby = PAGEBORDER_FULL_Y; + pbw = PAGEBORDER_FULL_W; + pbh = PAGEBORDER_FULL_H; + } + + + line = EfiLibAllocateZeroPool( (gMaxCols + 1) * sizeof(CHAR16) ); + if ( line == NULL ) + return; + + ClearLinesWithoutFlush( fTitle->FrameData.Top, fTitle->FrameData.Height, fTitle->FrameData.BGColor | fTitle->FrameData.FGColor ); + ClearLinesWithoutFlush( fHelptitle->FrameData.Top, fHelptitle->FrameData.Height, fHelptitle->FrameData.BGColor | fHelptitle->FrameData.FGColor ); + ClearLinesWithoutFlush( fMenu->FrameData.Top, fMenu->FrameData.Height, fMenu->FrameData.BGColor | fMenu->FrameData.FGColor ); + + //EIP-123006 Clearing gFlushBuffer with attribute(0) and chars(' ') + MemSet( &(gFlushBuffer->Attribs[fMain->FrameData.Top*gMaxCols]), fMain->FrameData.Height*gMaxCols, 0 ); + MemFillUINT16Buffer( &(gFlushBuffer->Chars[fMain->FrameData.Top*gMaxCols]), fMain->FrameData.Height*gMaxCols, (UINT16)L' ' ); + + ClearLinesWithoutFlush( pby, pbh, PAGE_BGCOLOR | PAGE_FGCOLOR ); + + + DrawWindow( pbx, pby, pbw, pbh, PAGE_BGCOLOR| PAGE_FGCOLOR, TRUE, FALSE ); + + + + MemFillUINT16Buffer( &line[1], gMaxCols - 1, BOXDRAW_HORIZONTAL ); + + line[0] = BOXDRAW_DOWN_HORIZONTAL; + line[1] = L'\0'; + DrawString( vertDivider, pby, line ); + + line[0] = BOXDRAW_UP_HORIZONTAL; + DrawString( vertDivider, pby+pbh-1, line ); + + // center divider + line[0] = BOXDRAW_VERTICAL; + + col = vertDivider ; + start = pby+1; + end = pby+pbh-1 ; + + for ( lineNumber = start; lineNumber < end ; lineNumber++ ) + DrawString( col, lineNumber, line ); + + // Horizontal Help divider + MemFillUINT16Buffer( &line[1], gMaxCols - 1, BOXDRAW_HORIZONTAL ); + line[0] = BOXDRAW_VERTICAL; + //line[1] = BOXDRAW_HORIZONTAL; + line[gMaxCols - vertDivider-1] = L'\0'; + DrawString(col, horzDivider, line ); + + FlushLines( 0, end-1 ); + + gBS->FreePool( line ); + +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: OverRideStyleGetFrameInitData +// +// Description: Function to get frame initialization data +// +// Input: UINT32 page, UINT32 frame +// +// Output: VOID* +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID *OverRideStyleGetFrameInitData( UINT32 page, UINT32 frame ) +{ + return &_gStyleSubFrames[frame]; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleFrameAddTitle +// +// Description: Function to add frame title +// +// Input: FRAME_DATA *frame, UINT32 frameType, CONTROL_INFO * dummy +// +// Output: EFI_STATUS +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +EFI_STATUS StyleFrameAddTitle( FRAME_DATA *frame, UINT32 frameType,CONTROL_INFO * dummy ) +{ + return EFI_UNSUPPORTED; +} + +#endif /* SETUP_STYLE_EZPORT */ + +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: HandleEscKey +// +// Description: Function to handle ESC Hotkey action +// +// Input: APPLICATION_DATA *app, HOTKEY_DATA *hotkey, VOID *cookie +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID HandleEscKey( APPLICATION_DATA *app, HOTKEY_DATA *hotkey, VOID *cookie ) +{ + UINT16 pageClass = 0, pageSubclass = 0, pageFormID = 0; + EFI_GUID ExitPageGuid; + + + if(FormBrowserHandleValid()) + app->Quit = TRUE; + + else if ( gotoExitOnEscKey (&ExitPageGuid, &pageClass, &pageSubclass, &pageFormID) )//EIP-112628 + { + UINT32 i=0; + PAGE_INFO *pageInfo; + + for ( i = 0; i < gPages->PageCount; i++ ) + { + pageInfo = (PAGE_INFO *)((UINTN)gApplicationData + gPages->PageList[i]); + if ( + ( EfiCompareGuid(&ExitPageGuid,&(gPageIdInfo[pageInfo->PageIdIndex].PageGuid)) ) && + ( pageClass == gPageIdInfo[pageInfo->PageIdIndex].PageClass ) && + ( pageSubclass == gPageIdInfo[pageInfo->PageIdIndex].PageSubClass ) && + ( pageFormID == pageInfo->PageFormID ) + ) + { + gApp->CurrentPage = i; // Page found go to exit page + gApp->CompleteRedraw = TRUE; + gApp->Fixed = FALSE; + break; + } + } + if(i >= gPages->PageCount) //Page not found exit application + app->Quit = ExitApplication(); + } + + else + app->Quit = ExitApplication(); +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: HandleSaveExitKey +// +// Description: Function to handle Save and Exit Hotkey action +// +// Input: APPLICATION_DATA *app, HOTKEY_DATA *hotkey, VOID *cookie +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID HandleSaveExitKey( APPLICATION_DATA *app, HOTKEY_DATA *hotkey, VOID *cookie ) +{ + app->Quit = SaveAndExit(); +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: HandlePrevValuesKey +// +// Description: Function to handle Load Previous value Hotkey action +// +// Input: APPLICATION_DATA *app, HOTKEY_DATA *hotkey, VOID *cookie +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID HandlePrevValuesKey( APPLICATION_DATA *app, HOTKEY_DATA *hotkey, VOID *cookie ) +{ + if ( app->CurrentPage != 0 ) + LoadPreviousValues( TRUE ); +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: HandleFailsafeKey +// +// Description: Function to handle Load Failsafe values Hotkey action +// +// Input: APPLICATION_DATA *app, HOTKEY_DATA *hotkey, VOID *cookie +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID HandleFailsafeKey( APPLICATION_DATA *app, HOTKEY_DATA *hotkey, VOID *cookie ) +{ + if ( app->CurrentPage != 0 ) + LoadFailsafeDefaults(); +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: HandleOptimalKey +// +// Description: Function to handle Load Optimal values Hotkey action +// +// Input: APPLICATION_DATA *app, HOTKEY_DATA *hotkey, VOID *cookie +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID HandleOptimalKey( APPLICATION_DATA *app, HOTKEY_DATA *hotkey, VOID *cookie ) +{ + if ( app->CurrentPage != 0 ) + LoadOptimalDefaults(); +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: HandleHelpKey +// +// Description: Function to handle Help Hotkey action +// +// Input: APPLICATION_DATA *app, HOTKEY_DATA *hotkey, VOID *cookie +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID HandleHelpKey( APPLICATION_DATA *app, HOTKEY_DATA *hotkey, VOID *cookie ) +{ + if ( app->CurrentPage != 0 ) + ShowHelpMessageBox(); +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: HandlePrnScrnKey +// +// Description: Function to handle print screen Hotkey action +// +// Input: APPLICATION_DATA *app, HOTKEY_DATA *hotkey, VOID *cookie +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID HandlePrnScrnKey( APPLICATION_DATA *app, HOTKEY_DATA *hotkey, VOID *cookie ) +{ + TseHotkeyPrintScreenSupport(); +} +//EIP:47086 - Right clicking from the Main page is not exiting from BIOS setup. +//EIP:47086 START +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: MainFrameHandlewithMouse +// +// Description: Function to handle Main Frame with Mouse +// +// Input: APPLICATION_DATA *app, HOTCLICK_DATA *hotkey, VOID *cookie +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID MainFrameHandlewithMouse( APPLICATION_DATA *app, HOTCLICK_DATA *hotclick, VOID *cookie ) +{ + NumericSoftKbdExit(); + if(app->Action->Input.Data.MouseInfo.ButtonStatus == TSEMOUSE_RIGHT_CLICK) + app->Quit = ExitApplication(); +} + +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: HelpFrameHandlewithMouse +// +// Description: Function to handle Help Frame with Mouse +// +// Input: APPLICATION_DATA *app, HOTCLICK_DATA *hotkey, VOID *cookie +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID HelpFrameHandlewithMouse( APPLICATION_DATA *app, HOTCLICK_DATA *hotclick, VOID *cookie ) +{ + NumericSoftKbdExit(); + +} + +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: NavFrameHandlewithMouse +// +// Description: Function to handle Navigation Frame with Mouse +// +// Input: APPLICATION_DATA *app, HOTCLICK_DATA *hotkey, VOID *cookie +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID NavFrameHandlewithMouse( APPLICATION_DATA *app, HOTCLICK_DATA *hotclick, VOID *cookie ) +{ + + UINT32 Action; +// EIP :62098 -Handling mouse hot click operations + NumericSoftKbdExit(); + Action = MapControlMouseActionHook(&app->Action->Input.Data.MouseInfo); +//EIP 88811 : When pop-up window is invoked in setup and Click on ESC icon or ESC/Right Click, it will respond as two times ESC is clicked + if(( ControlActionChoose == Action )||( ControlActionSelect == Action ))//EIP 103449 : In Setup click\Touch from navigation window, option are not displayed properly + { + if(app->Action->Input.Data.MouseInfo.Top == hotclick->HotClickData.Yo + 4) + if ( app->CurrentPage != 0 ) + { + ShowHelpMessageBox(); + return; + } + + if(app->Action->Input.Data.MouseInfo.Top == hotclick->HotClickData.Yo + 5) + if ( app->CurrentPage != 0 ) + { + LoadPreviousValues( TRUE ); + return; + } + if(app->Action->Input.Data.MouseInfo.Top == hotclick->HotClickData.Yo + 6) + if ( app->CurrentPage != 0 ) + { + LoadOptimalDefaults(); + return; + } + if(app->Action->Input.Data.MouseInfo.Top == hotclick->HotClickData.Yo + 7) + { + app->Quit = SaveAndExit(); + return; + } + + if(app->Action->Input.Data.MouseInfo.Top == hotclick->HotClickData.Yo + 8) + HotclickESCaction(); + //app->Quit = ExitApplication(); + + } +} +//EIP:47086 END + +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 1985-2011, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy , Norcross, GA 30071 **// +//** **// +//** Phone: (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// diff --git a/EDK/MiniSetup/Ezport/ezport.h b/EDK/MiniSetup/Ezport/ezport.h new file mode 100644 index 0000000..2281a45 --- /dev/null +++ b/EDK/MiniSetup/Ezport/ezport.h @@ -0,0 +1,134 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 1985-2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy , Norcross, GA 30071 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +// $Archive: /Alaska/SOURCE/Modules/AMITSE2_0/AMITSE/Ezport/ezport.h $ +// +// $Author: Arunsb $ +// +// $Revision: 6 $ +// +// $Date: 10/18/12 6:05a $ +// +//*****************************************************************// +//*****************************************************************// +// Revision History +// ---------------- +// $Log: /Alaska/SOURCE/Modules/AMITSE2_0/AMITSE/Ezport/ezport.h $ +// +// 6 10/18/12 6:05a Arunsb +// Updated for 2.16.1235 QA submission +// +// 8 10/10/12 12:42p Arunsb +// Synched the source for v2.16.1232, backup with Aptio +// +// 5 2/19/10 1:02p Madhans +// Updated for TSE 2.01. Refer Changelog.log for File change history. +// +// 6 2/19/10 8:15a Mallikarjunanv +// updated year in copyright message +// +// 5 1/09/10 6:12a Mallikarjunanv +// Updated TSE2.01 Release sources with coding standards +// +// 4 8/24/09 5:15p Blaines +// Fix issue setting title and helptitle background color after clear +// screen +// +// 3 8/18/09 6:34p Blaines +// Support additional date styles +// +// 2 6/12/09 2:36p Blaines +// Update coding standard +// +// 1 6/04/09 8:05p Madhans +// +// 3 5/07/09 10:35a Madhans +// Changes after Bin module +// +// 2 4/29/09 9:02p Madhans +// Bug Fixes after unit Testing.. +// +// 1 4/28/09 11:14p Madhans +// Tse 2.0 Code complete Checkin. +// +// 3 4/28/09 9:39p Madhans +// Tse 2.0 Code complete Checkin. +// +// 2 4/24/09 9:35p Blaines +// +// 1 12/18/08 7:59p Madhans +// Intial version of TSE Lite sources +//*****************************************************************// +//*****************************************************************// +//<AMI_FHDR_START> +// +// Name: ezport.h +// +// Description: Main header file for ezport style module. +// +//<AMI_FHDR_END> +//********************************************************************** +#ifndef _EZPORT_H_ +#define _EZPORT_H_ + +#if SETUP_STYLE_EZPORT + +VOID OverRideStyleInit( VOID ); +VOID OverRideStyleDrawPageBorder( UINT32 page ); +VOID *OverRideStyleGetFrameInitData( UINT32 page, UINT32 frame ); + +#if SETUP_STYLE_FULL_SCREEN + #define STYLE_MAX_COLS STYLE_FULL_MAX_COLS + #define STYLE_MAX_ROWS STYLE_FULL_MAX_ROWS +#else + #define STYLE_MAX_COLS STYLE_STD_MAX_COLS + #define STYLE_MAX_ROWS STYLE_STD_MAX_ROWS +#endif + +#define EFI_BACKGROUND_WHITE (EFI_WHITE << 4) +#define STYLE_CLEAR_SCREEN_COLOR (HELPTITLE_BGCOLOR | EFI_WHITE) + + +// Style Overrides... +#define STYLE_OVERRIDE_INIT +#define STYLE_OVERRIDE_PAGE_BORDER +#define STYLE_OVERRIDE_FRAME_INIT_DATA +#define STYLE_OVERRIDE_CONTROL_OVERFLOW +#define STYLE_OVERRIDE_INITIALIZE_FRAME +#define STYLE_OVERRIDE_INITIALIZE_OEM_FRAME +#define STYLE_OVERRIDE_NAV_TOKEN +#define STYLE_OVERRIDE_ADD_CONTROLS +#define STYLE_OVERRIDE_FIRST_PAGE +#define STYLE_OVERRIDE_VERSION_STRING +#define STYLE_OVERRIDE_FRAME_DRAWABLE + +#define MENU_COMPLETE_REDRAW 1 +#define SUBMENU_COMPLETE_REDRAW 2 +#endif /* SETUP_STYLE_EZPORT */ + +#endif /* _EZPORT_H_ */ +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 1985-2010, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy , Norcross, GA 30071 **// +//** **// +//** Phone: (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// diff --git a/EDK/MiniSetup/Ezport/style.c b/EDK/MiniSetup/Ezport/style.c new file mode 100644 index 0000000..e5c7ab6 --- /dev/null +++ b/EDK/MiniSetup/Ezport/style.c @@ -0,0 +1,546 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 1985-2011, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy , Norcross, GA 30071 **// +//** **// +//** Phone: (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +// $Archive: /Alaska/SOURCE/Modules/AMITSE2_0/AMITSE/Ezport/style.c $ +// +// $Author: Premkumara $ +// +// $Revision: 7 $ +// +// $Date: 5/02/14 4:02a $ +// +//*****************************************************************// +//*****************************************************************// +// Revision History +// ---------------- +// $Log: /Alaska/SOURCE/Modules/AMITSE2_0/AMITSE/Ezport/style.c $ +// +// 7 5/02/14 4:02a Premkumara +// [TAG] EIP151966 +// [Category] Improvement +// [Description] Added the implementation for getting the BIOS build +// year dynamically +// from TimeStamp.h file and updated the Build year in copyright message +// in both Setup and POST. +// [Files] style.c,style.c,style.c,notify.c,minisetupext.c,CommonHelper +// .c, +// AmiTSEStr.uni,AMITSE.mak +// +// 6 10/18/12 6:05a Arunsb +// Updated for 2.16.1235 QA submission +// +// 8 10/10/12 12:42p Arunsb +// Synched the source for v2.16.1232, backup with Aptio +// +// 5 6/23/11 5:42a Rajashakerg +// [TAG] EIP63073 +// [Category] New Feature +// [Description] Source modules in TSE should get the version details +// from binary in run time not at build time +// [Files] CommonHelper.c, minisetupext.c, notify.c, Ezport\style.c, +// EzportPlus\style.c, Legacy\style.c +// +// 4 2/19/10 1:02p Madhans +// Updated for TSE 2.01. Refer Changelog.log for File change history. +// +// 6 2/19/10 8:15a Mallikarjunanv +// updated year in copyright message +// +// 5 2/04/10 11:16p Madhans +// Navgation help for Mouse Added +// +// 4 1/09/10 6:13a Mallikarjunanv +// Updated TSE2.01 Release sources with coding standards +// +// 3 6/23/09 6:54p Blaines +// Coding standard update, +// Remove spaces from file header to allow proper chm function list +// creation. +// +// 2 6/12/09 2:36p Blaines +// Update coding standard +// +// 1 6/04/09 8:05p Madhans +// +// 3 5/07/09 10:35a Madhans +// Changes after Bin module +// +// 2 4/29/09 9:02p Madhans +// Bug Fixes after unit Testing.. +// +// 1 4/28/09 11:15p Madhans +// Tse 2.0 Code complete Checkin. +// +// 1 4/28/09 9:39p Madhans +// Tse 2.0 Code complete Checkin. +// +// 1 12/18/08 7:59p Madhans +// Intial version of TSE Lite sources +//*****************************************************************// +//*****************************************************************// +//<AMI_FHDR_START> +// +// Name: style.c +// +// Description: Contains style override functions. +// +//<AMI_FHDR_END> +//********************************************************************** +#include "minisetup.h" + +extern UINT8 gVerticalMainDivider ; +extern UINT8 gHorizontalHelpDivider ; +extern UINT16 gStrNavToken; + +VOID _StyleAddSpacing( FRAME_DATA *frame ); +VOID GetTseBuildVersion(UINTN *TseMajor, UINTN *TseMinor, UINTN *TseBuild); +VOID GetTseBuildYear(UINT16 *TseBuildYear);//EIP 151966 : Use BIOS build year for copyright message + +#if SETUP_STYLE_EZPORT + + + +STYLECOLORS Colors = +{ + TEXT_COLOR, //EFI_WHITE, //FGColor + PAGE_BGCOLOR, //BGColor + NON_FOCUS_COLOR, //EFI_BLUE, //secondary FGcolor + PAGE_BGCOLOR, //secondary BGColor + CONTROL_FOCUS_COLOR, //EFI_WHITE, //SelFGColor + PAGE_BGCOLOR, //SelBGColor + CONTROL_NON_FOCUS_COLOR, //EFI_BLUE, //NSelFGColor + PAGE_BGCOLOR, //NSelBGColor + PAGE_BGCOLOR, //LabelBGColor + LABEL_FOCUS_COLOR, //EFI_WHITE, //LabelFGColor + LABEL_NON_FOCUS_COLOR, //EFI_BLUE, //NSelLabelFGColor + EDIT_BGCOLOR, //EditBGColor + EDIT_FGCOLOR, //EFI_WHITE, //EditFGColor + POPUP_FGCOLOR, //popupFGColor + POPUP_BGCOLOR //popupBGColor +}; +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: OverRideStyleHandleControlOverflow +// +// Description: Function to handle contro overflow +// +// Input: FRAME_DATA *frame, CONTROL_DATA *control, UINT16 count +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +EFI_STATUS OverRideStyleHandleControlOverflow( FRAME_DATA *frame, CONTROL_DATA *control, UINT16 count ) +{ + EFI_STATUS Status = EFI_UNSUPPORTED; + CONTROL_DATA *tempcontrol; + UINT16 i=0,Height=0; + UINT8 BORDER=(frame->FrameData.Border==TRUE)?1:0 ; + + // show scrollbar if neccessary + frame->UseScrollbar = FALSE; + + for(i = 0; i < count; i++) + { + tempcontrol = (CONTROL_DATA*)(frame->ControlList[i]); + if( (Height + tempcontrol->Height ) <= frame->FrameData.Height-2*BORDER ) + { + Height = Height + tempcontrol->Height; + frame->LastVisibleCtrl = i; + } + else + { + Status = EFI_SUCCESS; + break; + } + } + + return Status; +} + +static AMI_IFR_MENU gMenuData = {CONTROL_TYPE_MENU,2}; +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: OverRideStyleInitializeFrame +// +// Description: Function to initialize frame +// +// Input: FRAME_DATA *frame, UINT32 frameType, PAGE_INFO *data +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +EFI_STATUS OverRideStyleInitializeFrame( FRAME_DATA *frame, UINT32 frameType, PAGE_INFO *data ) +{ + EFI_STATUS Status = EFI_INVALID_PARAMETER; + UINT8 justify = JUSTIFY_LEFT /*, BORDER=(frame->FrameData.Border==TRUE)?1:0*/ ; + STYLECOLORS saveColors ; + + CONTROL_INFO dummy; + + UINT32 FrameType = frame->FrameData.FrameType ; + + saveColors = Colors ; + + //Allows controls to match the Background Color of the Frame + Colors.BGColor = frame->FrameData.BGColor ; + Colors.SecBGColor = frame->FrameData.BGColor ; + Colors.SelBGColor = frame->FrameData.BGColor ; + Colors.NSelBGColor = frame->FrameData.BGColor ; + Colors.LabelBGColor = frame->FrameData.BGColor ; + Colors.PopupBGColor = frame->FrameData.BGColor ; + + switch ( FrameType ) + { + case MAIN_FRAME: + if(LABEL_FOCUS_COLOR != FOCUS_COLOR) + Colors.LabelFGColor = LABEL_FOCUS_COLOR ; + + if(CONTROL_FOCUS_COLOR != FOCUS_COLOR) + Colors.SelFGColor = CONTROL_FOCUS_COLOR; + + if(LABEL_NON_FOCUS_COLOR != NON_FOCUS_COLOR) + Colors.NSelLabelFGColor = LABEL_NON_FOCUS_COLOR ; + + if(CONTROL_NON_FOCUS_COLOR != NON_FOCUS_COLOR) + Colors.NSelFGColor = CONTROL_NON_FOCUS_COLOR ; + + + Status = _FrameAddControls( frame, data ); + break; + + case SUBTITLE_FRAME: + Colors.SecBGColor = SELECTED_MENU_BGCOLOR ; + Colors.SecFGColor = SELECTED_MENU_FGCOLOR ; + Colors.PopupBGColor = MENU_BGCOLOR ; + Colors.PopupFGColor = MENU_FGCOLOR ; + + MemSet( &dummy, sizeof(dummy), 0 ); + dummy.ControlHandle = gHiiHandle; + dummy.ControlType = CONTROL_TYPE_MENU; + dummy.ControlPtr = (VOID*)&gMenuData; + dummy.ControlPageID = data->PageID; + dummy.ControlFlags.ControlVisible = TRUE; + Status=gFrame.AddControl(frame,&dummy); + break; + + case TITLE_FRAME: + + case HELPTITLE_FRAME: + + justify = JUSTIFY_CENTER; + case HELP_FRAME: + + case NAV_FRAME: + Status = _FrameAddTitle( frame, FrameType, data ); + if ( ! EFI_ERROR( Status ) ) + { + MEMO_DATA *memo = (MEMO_DATA *)frame->ControlList[0]; + + if(FrameType == HELPTITLE_FRAME ) + { + memo->ControlData.ControlPtr= (VOID*) UefiCreateSubTitleTemplate(STRING_TOKEN(STR_MAIN_COPYRIGHT)); + + } + + gMemo.SetJustify( memo, justify ); + } + break; + + case SCROLLBAR_FRAME: + // not implemented at this time + Status = EFI_SUCCESS; + break; + + default: + //Status = StyleInitializeOemFrame( frame, frame->FrameData.FrameType, data ) ; + break; + } + + + Colors = saveColors; + + // initialize frame scroll colors + frame->FrameData.ScrlFGColor = SCROLLBAR_FGCOLOR ; + frame->FrameData.ScrlBGColor = SCROLLBAR_BGCOLOR ; + frame->FrameData.ScrlUpFGColor = SCROLLBAR_UPARROW_FGCOLOR ; + frame->FrameData.ScrlUpBGColor = SCROLLBAR_UPARROW_BGCOLOR ; + frame->FrameData.ScrlDnFGColor = SCROLLBAR_DOWNARROW_FGCOLOR ; + frame->FrameData.ScrlDnBGColor = SCROLLBAR_DOWNARROW_BGCOLOR ; + + return Status; + +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: OverRideStyleGetNavToken +// +// Description: Function to get navigation frame token +// +// Input: UINT32 page number +// +// Output: UINT16 token +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +UINT16 OverRideStyleGetNavToken( UINT32 page ) +{ + return gStrNavToken; +} + + + +static AMI_IFR_LABEL gFailSafeLabel = { 0, 0, STRING_TOKEN(STR_LOAD_FAILSAFE), STRING_TOKEN(STR_LOAD_FAILSAFE_HELP) }; +static AMI_IFR_LABEL gOptimalLabel = { 0, 0, STRING_TOKEN(STR_LOAD_OPTIMAL), STRING_TOKEN(STR_LOAD_OPTIMAL_HELP) }; +static AMI_IFR_LABEL gSaveExitLabel = { 0, 0, STRING_TOKEN(STR_SAVE_EXIT), STRING_TOKEN(STR_SAVE_EXIT_HELP) }; +static AMI_IFR_LABEL gExitLabel = { 0, 0, STRING_TOKEN(STR_EXIT), STRING_TOKEN(STR_EXIT_HELP) }; +static AMI_IFR_LABEL gSaveResetLabel = { 0, 0, STRING_TOKEN(STR_SAVE_RESET), STRING_TOKEN(STR_SAVE_RESET_HELP) }; +static AMI_IFR_LABEL gResetLabel = { 0, 0, STRING_TOKEN(STR_RESET), STRING_TOKEN(STR_RESET_HELP) }; + +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: OverRideStyleAddAdditionalControls +// +// Description: Function to add additional controls +// +// Input: FRAME_DATA *frame, UINT32 controlNumber, BOOLEAN focus +// +// Output: EFI_STATUS +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +EFI_STATUS OverRideStyleAddAdditionalControls( FRAME_DATA *frame, UINT32 controlNumber, BOOLEAN focus ) +{ + EFI_STATUS Status = EFI_SUCCESS; + CONTROL_DATA **control; + UINT32 i; + + if ( frame->PageID != 0 ) + return Status; + + control = frame->ControlList; + + for ( i = 0; i < frame->ControlCount; i++, control++ ) + { + (*control)->Methods->Destroy( *control, TRUE ); + } + + // initialize counter of control in frame and set focus to false (at this point the are no controls in the frame) + frame->ControlCount =0; + frame->NullCount=0; + focus=0; + controlNumber=0; + + // add controls for boot manager, language, failsafe, optimal, save & exit, exit without saving +/* Status = _StyleAddControl( frame, CONTROL_TYPE_SUBMENU, &gBootManagerRef, &controlNumber, &focus ); + if ( EFI_ERROR( Status ) ) + return Status; + + Status = _StyleAddControl( frame, CONTROL_TYPE_SUBMENU, &gLanguageRef, &controlNumber, &focus ); + if ( EFI_ERROR( Status ) ) + return Status; +*/ + Status = _StyleAddControl( frame, CONTROL_TYPE_LABEL, &gFailSafeLabel, &controlNumber, &focus ); + if ( EFI_ERROR( Status ) ) + return Status; + + Status = _StyleAddControl( frame, CONTROL_TYPE_LABEL, &gOptimalLabel, &controlNumber, &focus ); + if ( EFI_ERROR( Status ) ) + return Status; + + Status = _StyleAddControl( frame, CONTROL_TYPE_LABEL, &gSaveExitLabel, &controlNumber, &focus ); + if ( EFI_ERROR( Status ) ) + return Status; + + Status = _StyleAddControl( frame, CONTROL_TYPE_LABEL, &gExitLabel, &controlNumber, &focus ); + + Status = _StyleAddControl( frame, CONTROL_TYPE_LABEL, &gSaveResetLabel, &controlNumber, &focus ); + if ( EFI_ERROR( Status ) ) + return Status; + + Status = _StyleAddControl( frame, CONTROL_TYPE_LABEL, &gResetLabel, &controlNumber, &focus ); + + return Status; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: OverRideStyleSelectFirstDisplayPage +// +// Description: Function to set first page display +// +// Input: VOID +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID OverRideStyleSelectFirstDisplayPage( VOID ) +{ + gApp->CurrentPage = 1; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: OverRideStyleUpdateVersionString +// +// Description: Function to update version string +// +// Input: VOID +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID OverRideStyleUpdateVersionString( VOID ) +{ + CHAR16 *string = NULL, *newString = NULL; + UINTN length, TseMajor,TseMinor, TseBuild; + UINT16 TseBuildYear=0; + UINTN i; + + for ( i = 0; i < gLangCount; i++ ) + { + string = HiiGetStringLanguage( gHiiHandle, STRING_TOKEN(STR_MAIN_COPYRIGHT), gLanguages[i].Unicode ); + if ( string == NULL ) + return; + + length = EfiStrLen(string) + 10; + newString = EfiLibAllocateZeroPool( length * sizeof(CHAR16) ); + if ( newString != NULL ) + { + //EIP 63073 : Source modules in TSE should get the version details from binary in run time not at build time + GetTseBuildVersion(&TseMajor,&TseMinor,&TseBuild); + //EIP 151966 : Use BIOS build year for copyright message + GetTseBuildYear(&TseBuildYear); + SPrint( newString, length * sizeof(CHAR16), string, TseMajor, TseMinor, TseBuild,TseBuildYear ); + HiiChangeStringLanguage( gHiiHandle, STRING_TOKEN(STR_MAIN_COPYRIGHT), gLanguages[i].Unicode, newString ); + } + + MemFreePointer( (VOID **)&newString ); + MemFreePointer( (VOID **)&string ); + //EIP 151966 : Use BIOS build year for copyright message + string = HiiGetStringLanguage( gHiiHandle, STRING_TOKEN(STR_MAIN_TITLE), gLanguages[i].Unicode ); + if ( string == NULL ) + return; + length = EfiStrLen(string) + 10; + newString = EfiLibAllocateZeroPool( length * sizeof(CHAR16) ); + if ( newString != NULL ) + { + //EIP 151966 : Use BIOS build year for copyright message + GetTseBuildYear(&TseBuildYear); + SPrint( newString, length * sizeof(CHAR16), string, TseBuildYear ); + HiiChangeStringLanguage( gHiiHandle, STRING_TOKEN(STR_MAIN_TITLE), gLanguages[i].Unicode, newString ); + } + MemFreePointer( (VOID **)&newString ); + MemFreePointer( (VOID **)&string ); + } +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: OverRideStyleFrameDrawable +// +// Description: Function to determine if frame is drawable +// +// Input: FRAME_DATA *frame +// +// Output: EFI_STATUS +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +EFI_STATUS OverRideStyleFrameDrawable( FRAME_DATA *frame ) +{ + EFI_STATUS Status = EFI_SUCCESS; + + if(!frame->FrameData.Drawable){ + Status = EFI_UNSUPPORTED; + } + return Status ; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: _StyleAddSpacing +// +// Description: Function to add spacing +// +// Input: FRAME_DATA *frame +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID _StyleAddSpacing( FRAME_DATA *frame ) +{ + _StyleAddControl( frame, CONTROL_TYPE_NULL, NULL, NULL, NULL ); + if ( frame->ControlCount == 7 ) + _StyleAddControl( frame, CONTROL_TYPE_NULL, NULL, NULL, NULL ); +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: _StyleAddControl +// +// Description: Function to add controls +// +// Input: FRAME_DATA *frame, UINT16 type, VOID *data, UINT32 *controlNumber, BOOLEAN *focus +// +// Output: EFI_STATUS +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +EFI_STATUS _StyleAddControl( FRAME_DATA *frame, UINT16 type, VOID *data, UINT32 *controlNumber, BOOLEAN *focus ) +{ + EFI_STATUS Status; + CONTROL_INFO dummy; + + MemSet( &dummy, sizeof(dummy), 0 ); + dummy.ControlHandle = (VOID*)(UINTN)INVALID_HANDLE; + + dummy.ControlType = type; + dummy.ControlPtr = (VOID*)data; + dummy.ControlFlags.ControlVisible = TRUE; + + Status = gFrame.AddControl( frame, &dummy ); + if ( EFI_ERROR( Status ) ) + return Status; + + if ( type != CONTROL_TYPE_NULL ) + { + if ( ! *focus ) + { + if ( _FrameSetControlFocus( frame, *controlNumber ) ) + { + frame->CurrentControl = *controlNumber; + *focus = TRUE; + } + } + + (*controlNumber)++; + } + + return Status; +} +#endif +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 1985-2011, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy , Norcross, GA 30071 **// +//** **// +//** Phone: (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// diff --git a/EDK/MiniSetup/Ezport/style.h b/EDK/MiniSetup/Ezport/style.h new file mode 100644 index 0000000..5f8139a --- /dev/null +++ b/EDK/MiniSetup/Ezport/style.h @@ -0,0 +1,247 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 1985-2011, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy , Norcross, GA 30071 **// +//** **// +//** Phone (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +// $Archive: /Alaska/SOURCE/Modules/AMITSE2_0/AMITSE/Ezport/style.h $ +// +// $Author: Arunsb $ +// +// $Revision: 10 $ +// +// $Date: 10/18/12 6:05a $ +// +//*****************************************************************// +//*****************************************************************// +// Revision History +// ---------------- +// $Log: /Alaska/SOURCE/Modules/AMITSE2_0/AMITSE/Ezport/style.h $ +// +// 10 10/18/12 6:05a Arunsb +// Updated for 2.16.1235 QA submission +// +// 13 10/10/12 12:42p Arunsb +// Synched the source for v2.16.1232, backup with Aptio +// +// 9 6/29/11 12:24p Rajashakerg +// [TAG] EIP47086, 62098 +// [Category] New Feature +// [Description] Right clicking from the Main page is not exiting from +// BIOS setup and the Mouse hotclicks. +// [Files] minisetup.h, Ezport\style.h,Ezport\EzportBin.sdl, +// Ezport\EzportBin.mak, Ezport\ezport.c, Ezport\EzportBin.cif, +// EzportPlus\style.h, EzportPlus\EzportPlusBin.sdl, EzportPlusBin.mak, +// EzportPlus\EzportPlusBin.cif, EzportPlus\ezportplus.c, Legacy\style.h, +// Legacy\EzportPlusBin.sdl, Legacy\LegacyBin.mak, Legacy\LegacyBin.cif, +// Legacy\legacy.c, TseLiteBin.sdl, TseLite.cif, Memo.c, frame.c, +// application.h, application.c, commonoem.h, CommonHelper.c +// +// 8 11/18/10 6:38p Blaines +// [TAG] - EIP 45374 +// [Category]- Function Request +// [Synopsis]- Need method to configure Post Menu programmatically, Items +// requested +// - Exit Keys +// - Font Colors +// - Background Colors. +// [Solution] +// - Create hook to set window color, +// - Add AMI_POSTMENU_ATTRIB_EXIT_KEY attribute to POSTMENU_TEMPLATE to +// configure exit keys. +// [Files] - stylecommon.c, style.h, listbox.c, minisetupext.c, +// AMIPostMgr.h +// +// 7 4/16/10 5:13p Madhans +// Changes for Tse 2.02. Please see Changelog.log for more details. +// +// 6 2/26/10 8:53p Madhans +// For TSE 2.01.1024. refer changelog.log for file checkin history . +// +// 8 2/26/10 1:30p Madhans +// To avoid build issues with EDK. +// +// 7 2/19/10 8:15a Mallikarjunanv +// updated year in copyright message +// +// 6 2/05/10 6:04p Madhans +// Mouse action override from Style Module. +// +// 5 8/19/09 11:13a Blaines +// Update OEM Override prototypes +// +// 4 8/18/09 6:35p Blaines +// Support additional date styles +// +// 3 8/17/09 12:23p Presannar +// Removed References to Tiano.h +// +// 2 6/12/09 2:36p Blaines +// Update coding standard +// +// 1 6/04/09 8:05p Madhans +// +// 4 5/20/09 3:37p Blaines +// Add functions to access date format and Scroll behavior +// +// 3 5/18/09 12:18p Blaines +// Fix Help Frame text scroll +// Add OEM Style override prototype declarations +// +// 2 5/07/09 10:35a Madhans +// Changes after Bin module +// +// 1 4/28/09 11:15p Madhans +// Tse 2.0 Code complete Checkin. +// +// 3 4/24/09 9:35p Blaines +// +// 1 12/18/08 7:58p Madhans +// Intial version of TSE Lite sources +//*****************************************************************// +//*****************************************************************// +//<AMI_FHDR_START> +// +// Name: style.h +// +// Description: Style override prototypes. +// +//<AMI_FHDR_END> +//********************************************************************** +//#define SETUP_STYLE_FULL_SCREEN 1 +//#define SETUP_GO_TO_EXIT_PAGE_ON_EXIT_KEY 0 + +#ifndef _STYLE_H_ +#define _STYLE_H_ + +#if TSE_USE_EDK_LIBRARY +#include "Tiano.h" +#else +#include "Efi.h" +#endif + +//#define SETUP_STYLE_EZPORT 1 +#include "ezport.h" +#include "page.h" +#include "frame.h" + +INTN GetWindowLevel( UINT16 PageID); +EFI_STATUS StyleGetWindowColor(UINT8 *Color, INTN Level, UINT8 WindowType) ; +EFI_STATUS StyleGetMessageboxColor( UINT8 MessageBoxType, UINT8 *Color); +EFI_STATUS StyleControlColor(FRAME_DATA *frame, STYLECOLORS *Colors); +EFI_STATUS OverRideControlColor(FRAME_DATA *frame, STYLECOLORS *Colors); +VOID StyleInit( VOID ); +VOID StyleExit( VOID ); +VOID StyleDrawPageBorder( UINT32 page ); +UINT32 StyleGetPageFrames( UINT32 page ); +UINT32 StyleFrameIndexOf( UINT32 frameType ); +VOID StyleBeforeFrame( FRAME_DATA *frame ) ; +EFI_STATUS StyleFrameDrawable( FRAME_DATA *frame ); +VOID StyleUpdateFrameStrings(PAGE_DATA *page); +VOID * StyleGetFrameInitData( UINT32 page, UINT32 frame ); + +EFI_STATUS StyleFrameHandleMouse( FRAME_DATA *frame, MOUSE_INFO MouseInfo); +EFI_STATUS StyleFrameHandleTimer( FRAME_DATA *frame, ACTION_DATA *action ); +EFI_STATUS StyleFrameHandleKey( FRAME_DATA *frame, EFI_INPUT_KEY Key ); +EFI_STATUS StyleHandleControlOverflow( FRAME_DATA *frame, CONTROL_DATA *control, UINT16 count ); +EFI_STATUS StyleInitializeFrame( FRAME_DATA *frame, UINT32 frameType, PAGE_INFO *data ); +UINT16 StyleGetNavToken( UINT32 page ); +EFI_STATUS StyleAddAdditionalControls( FRAME_DATA *frame, UINT32 controlNumber, BOOLEAN focus ); + +//EFI_STATUS StyleMenuCallback( FRAME_DATA *frame, MENU_DATA *menu, CALLBACK_MENU *data ); +VOID StyleLabelCallback( FRAME_DATA *frame, LABEL_DATA *label, VOID *cookie ); + +EFI_STATUS _StyleAddControl( FRAME_DATA *frame, UINT16 type, VOID *data, UINT32 *number, BOOLEAN *focus ); +UINT16 StyleLanguagePage( SUBMENU_DATA *submenu ); +UINT16 StyleBootManagerPage( SUBMENU_DATA *submenu ); +BOOLEAN StyleHelpAreaScrollable(VOID); +VOID StylePageItemFocus(PAGE_DATA *page, FRAME_DATA *frame ); +VOID StyleSubPageItemFocus(PAGE_DATA *page, FRAME_DATA *frame ); +BOOLEAN StyleGetShadowSupport(VOID); +VOID StyleDrawScrollBar(FRAME_DATA *frame, UINT32 FirstLine, UINT32 LastLine, UINT32 modVal, + UINT32 sizeOfBar, UINT32 numOfBlocks, BOOLEAN bEraseScrollBar); + +VOID StyleDrawHelpScrollBar( MEMO_DATA *memo, UINT16 height); + + +VOID StyleSelectFirstDisplayPage( VOID ); +VOID StyleAddExtraPagesData( VOID ); +EFI_STATUS StyleGetSpecialColor( UINT16 ControlType, UINT8 *Color); +UINTN StyleGetDateFormat(VOID); +BOOLEAN StyleShowDay(VOID); +BOOLEAN StyleGetScrollBehavior(VOID) ; + +VOID StyleFrameSetControlPositions(FRAME_DATA *frame, UINT32 *pOtherEnd); +extern HOTKEY_TEMPLATE gHotKeyInfo[]; +extern HOTCLICK_TEMPLATE gHotClickInfo[];//EIP:47086 - Right clicking from the Main page is not exiting from BIOS setup. +extern UINT32 gHotKeyCount; +extern UINT32 gHotClickCount;//EIP:47086 - Right clicking from the Main page is not exiting from BIOS setup. +//extern UINT8 gLabelLeftMargin ; +//extern UINT8 gControlLeftMargin ; +//extern FRAME_INFO _gStyleStandardSubFrames[] ; +extern UINT32 gSubFrameCount ; +extern EFI_STATUS FrameDrawScrollBar (FRAME_DATA *frame, UINT32 FirstLine, UINT32 LastLine, UINT32 modVal, UINT32 sizeOfBar, UINT32 numOfBlocks, BOOLEAN bEraseScrollBar); +EFI_STATUS StyleFrameAddTitle( FRAME_DATA *frame, UINT32 frameType,CONTROL_INFO * dummy ); + + +//Common Overrides +EFI_STATUS OverRideStyleHandleControlOverflow( FRAME_DATA *frame, CONTROL_DATA *control, UINT16 count ); +EFI_STATUS OverRideStyleInitializeFrame( FRAME_DATA *frame, UINT32 frameType, PAGE_INFO *data ); +UINT16 OverRideStyleGetNavToken( UINT32 page ); +EFI_STATUS OverRideStyleAddAdditionalControls( FRAME_DATA *frame, UINT32 controlNumber, BOOLEAN focus ); +VOID OverRideStyleSelectFirstDisplayPage( VOID ); +VOID OverRideStyleUpdateVersionString( VOID ); +EFI_STATUS OverRideStyleFrameDrawable( FRAME_DATA *frame ); + +//Oem Overrides +UINTN OEMStyleGetDateFormat(VOID); +EFI_STATUS OEMGetSpecialColor(UINT16 ControlType, UINT8 *Color); +VOID OEMStyleBeforeFrame( FRAME_DATA *frame ); +VOID OEMStyleUpdateFrameStrings( PAGE_DATA *page ); +EFI_STATUS OEMStyleFrameDrawable( FRAME_DATA *frame ); +VOID OEMStyleInit( VOID ); +VOID OEMStyleExit( VOID ); +VOID OEMStyleDrawPageBorder( UINT32 page ); +VOID OEMDrawScrollBar(FRAME_DATA *frame, UINT32 FirstLine, UINT32 LastLine, UINT32 modVal, UINT32 sizeOfBar, UINT32 numOfBlocks, BOOLEAN bEraseScrollBar); +VOID OEMDrawHelpScrollBar( MEMO_DATA *memo, UINT16 height); +VOID *OEMStyleGetFrameInitData( UINT32 page, UINT32 frame ); +EFI_STATUS OEMStyleFrameHandleKey( FRAME_DATA *frame, EFI_INPUT_KEY Key ); +EFI_STATUS OEMStyleHandleControlOverflow( FRAME_DATA *frame, CONTROL_DATA *control, UINT16 count ); +EFI_STATUS OEMStyleInitializeFrame( FRAME_DATA *frame, UINT32 frameType, PAGE_INFO *data ); +UINT16 OEMStyleGetNavToken( UINT32 page ); +EFI_STATUS OEMStyleAddAdditionalControls( FRAME_DATA *frame, UINT32 controlNumber, BOOLEAN focus ); +UINT16 OEMStyleLanguagePage( SUBMENU_DATA *submenu ); +UINT16 OEMStyleBootManagerPage( SUBMENU_DATA *submenu ); +VOID OEMStyleLabelCallback( FRAME_DATA *frame, LABEL_DATA *label, VOID *cookie ); +VOID OEMStyleSelectFirstDisplayPage( VOID ); +VOID OEMStyleAddExtraPagesData(VOID); +UINTN OEMStyleGetTextMode( UINTN Rows, UINTN Cols ); +VOID OEMStyleUpdateVersionString( VOID ); +VOID OEMStyleFrameSetControlPositions(FRAME_DATA *frame, UINT32 *pOtherEnd); +VOID OEMOverRideComponent(VOID); +VOID OEMStylePageItemFocus(PAGE_DATA *page, FRAME_DATA *frame ); +VOID OEMStyleSubPageItemFocus(PAGE_DATA *page, FRAME_DATA *frame ); + +#endif /* _STYLE_H_ */ +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 1985-2011, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy , Norcross, GA 30071 **// +//** **// +//** Phone: (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// diff --git a/EDK/MiniSetup/Ezport/stylecommon.c b/EDK/MiniSetup/Ezport/stylecommon.c new file mode 100644 index 0000000..17c1bd2 --- /dev/null +++ b/EDK/MiniSetup/Ezport/stylecommon.c @@ -0,0 +1,1440 @@ +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 1985-2013, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy , Norcross, GA 30071 **// +//** **// +//** Phone: (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// +//*****************************************************************// +// $Archive: /Alaska/SOURCE/Modules/AMITSE2_0/AMITSE/Ezport/stylecommon.c $ +// +// $Author: Rajashakerg $ +// +// $Revision: 20 $ +// +// $Date: 3/16/13 2:21a $ +// +//*****************************************************************// +//*****************************************************************// +// Revision History +// ---------------- +// $Log: /Alaska/SOURCE/Modules/AMITSE2_0/AMITSE/Ezport/stylecommon.c $ +// +// 20 3/16/13 2:21a Rajashakerg +// [TAG] EIP111479 +// [Category] Bug Fix +// [Severity] Normal +// [Symptom] BIOS dialog box is crashed with special +// monitor(160,53,1280*1024) +// [RootCause] DesiredTextMode was not set properly. +// [Solution] Provided proper mode number while setting text mode. +// [Files] postmgmtext.c, Ezport\stylecommon.c, +// EzportPlus\stylecommon.c, Legacy\stylecommon.c +// +// 19 2/10/13 11:53p Rajashakerg +// [TAG] EIP104521 +// [Category] Improvement +// [Description] Customer needs AMITSE modification to popup boxes so +// highlighted choices can be seen via VT100 console redirection +// [Files] AMITSE.sdl, CommonHelper.c, Ezport\stylecommon.c, +// EzportPlus\stylecommon.c, Legacy\stylecommon.c +// +// 18 10/18/12 6:05a Arunsb +// Updated for 2.16.1235 QA submission +// +// 14 10/10/12 12:42p Arunsb +// Synched the source for v2.16.1232, backup with Aptio +// +// 16 9/17/12 6:24a Rajashakerg +// Updated EIP changes for 2.16 release. +// +// 14 8/29/12 4:26p Arunsb +// [TAG] EIP94702 +// [Description] Support for Native Resolution in POST/BOOT +// [Files] amitse.sdl, commonhelper.c, commonoem.c, boot.c, logo.c, +// notify.c, postmgmt.c, tselite\minisetupext.c, ezport/stylecommon.c, +// ezportplus/stylecommon.c andlegacy/stylecommon.c +// +// 13 4/03/12 3:02a Premkumara +// [TAG] EIP84150 +// [Category] Bug Fix +// [Severity] Normal +// [Symptom] All the timers for mouse drivers before exiting from setup +// is not stopped +// [RootCause] MouseDestroy() is not called StopPointingDevice() +// function to stop Mouse device +// [Solution] StopPointingDevice() function is called in MouseDestroy() +// function +// [Files] Mouse.c, Protocol.c, Ezport/StyleCommon.c, +// EzportPlus/StyleCommon.c, Legacy/StyleCommon.c, Minisetupext.c +// +// 12 11/28/11 1:23a Premkumara +// [TAG] EIP75384 +// [Category] Improvement +// [Description] Suppress the warnings from static code analyzer +// [Files] UefiWapper.c, Hii.c, Expression.c, CtrlCond.c, PopupSel.c, +// Minisetupext.c, Menu.c, +// Date.c, Ezport\Stylecommon.c, EzportPlus\StyleCommon.c, +// Legacy\StyleCommon.c +// +// 11 11/20/11 7:28a Rajashakerg +// [TAG] EIP62763 +// [Category] Improvement +// [Description] Utilize the Improvements done from mouse driver in +// AMITSE +// [Files] HookAnchor.h, TseCommon.h, AMITSE.sdl, CommonHelper.c, +// commonoem.c, commonoem.h, buffer.c, globals.c, HookAnchor.c, +// minisetup.h, notify.c, postmgmt.c, protocol.c, ezport.c, stylecommon.c, +// Mouse.c, Action.c, Date.c, frame.c, MessageBox.c, minisetupext.c, +// minisetupext.h, numeric.c, numeric.h, page.c, PopupEdit.c, PopupEdit.h, +// PopupPassword.c, postmgmtext.c, time.c. +// +// 10 11/14/11 6:55p Blaines +// [TAG] - EIP 75486 +// [Category]- Function Request +// [Synopsis]- Support grayout condition for readonly controls. +// [Description] - Display readonly controls as grayout, non-selectable. +// [Files] +// AMITSE.sdl, CommonHelper.c, Minisetupext.h, stylecommon.c, Legacy.c, +// date.c, edit.c, label.c, memo.c, menu.c,, numeric.c, ordlistbox.c, +// PopupPassword.c, +// PopupSel.c, PopupString.c, ResetButton.c, SubMenu.c, Text.c, Time.c, +// UefiAction.c, ctrlcond.c, +// +// 9 11/09/11 10:02a Premkumara +// [TAG] EIP74375 +// [Category] Improvement +// [Description] Control STYLE_HELP_AREA_SCROLLBAR from binary +// [Files] CommonHelper.c, AMITSE.sdl, StyleHook.h, +// Legacy\StyleCommon.c, Legacy.sdl, +// EzportPlus\StyleCommon.c, EzportPlus.sdl, Ezport\StyleCommon.c, +// Ezport.sdl +// +// 8 1/06/11 7:54p Blaines +// [TAG] - EIP 51678 +// [Category]- Enhancment +// [Severity]- Mordarate +// [Symptom]- Style function should allow OEM to override default +// implementation. +// +// [Rootcause] - Style function does not provide override macro. +// [Solution] - Add Macro Overrides to the following functions: +// +// StyleGetClearScreenColor, +// StyleGetPageLinkColor, +// StyleGetScrollBarUpArrowColor , +// StyleGetScrollBarDownArrowColor. +// +// [Files] - stylecommon.c +// +// 7 11/18/10 6:38p Blaines +// [TAG] - EIP 45374 +// [Category]- Function Request +// [Synopsis]- Need method to configure Post Menu programmatically, Items +// requested +// - Exit Keys +// - Font Colors +// - Background Colors. +// [Solution] +// - Create hook to set window color, +// - Add AMI_POSTMENU_ATTRIB_EXIT_KEY attribute to POSTMENU_TEMPLATE to +// configure exit keys. +// [Files] - stylecommon.c, style.h, listbox.c, minisetupext.c, +// AMIPostMgr.h +// +// 6 4/16/10 5:13p Madhans +// Changes for Tse 2.02. Please see Changelog.log for more details. +// +// 5 2/19/10 1:02p Madhans +// Updated for TSE 2.01. Refer Changelog.log for File change history. +// +// 8 2/19/10 8:15a Mallikarjunanv +// updated year in copyright message +// +// 7 2/05/10 6:04p Madhans +// Mouse action override from Style Module. +// +// 6 11/09/09 4:44a Mallikarjunanv +// Eip-30111 : fixed the issue to update the help if +// STYLE_PAGE_FIRSTITEM_FOCUS token enabled. +// +// 5 8/18/09 6:35p Blaines +// Support additional date styles +// +// 4 8/13/09 1:24p Blaines +// EIP #24980 Fix to properly display right area text; +// +// +// 3 6/23/09 6:54p Blaines +// Coding standard update, +// Remove spaces from file header to allow proper chm function list +// creation. +// +// 2 6/12/09 2:36p Blaines +// Update coding standard +// +// 1 6/04/09 8:05p Madhans +// +// 4 5/20/09 3:37p Blaines +// Add functions to access date format and Scroll behavior +// +// 3 5/18/09 12:18p Blaines +// Fix Help Frame text scroll +// Add OEM Style override prototype declarations +// +// 2 5/07/09 10:35a Madhans +// Changes after Bin module +// +// 1 4/28/09 11:15p Madhans +// Tse 2.0 Code complete Checkin. +// +// 4 4/28/09 9:39p Madhans +// Tse 2.0 Code complete Checkin. +// +// 3 4/24/09 9:35p Blaines +// +// 1 12/18/08 7:59p Madhans +// Intial version of TSE Lite sources +//*****************************************************************// +//*****************************************************************// +//<AMI_FHDR_START> +// +// Name: stylecommon.c +// +// Description: Contains generic or default style functions. +// +//<AMI_FHDR_END> +//********************************************************************** +#include "minisetup.h" + +#if SETUP_STYLE_EZPORT + + +VOID _StyleControlSubmenu( CONTROL_INFO *control, UINT16 pageID, VOID *ref ); +VOID UpdatePageFocusedItemHelp(PAGE_DATA *page); +//<AMI_PHDR_START> +//-------------------------------------------------------------------------- +// +// Name: StyleControlColor +// +// Description: Adds controls to the frame +// +// Input: FRAME_DATA *frame - Pointer to the frame data +// STYLECOLORS Colors - Color scheme +// +// Output: EFI_STATUS Status - EFI_SUCCESS if successful, else +// EFI_UNSUPPORTED +// +//-------------------------------------------------------------------------- +//<AMI_PHDR_END> +EFI_STATUS StyleControlColor(FRAME_DATA *frame, STYLECOLORS *Colors) +{ + //Note: Blaines 01/12/09 + //The goal here is to allow controls to match the BGColor of their frame. + //Normally this is handled in StyleInitializeFrame(), before controls are added to the frame. + //But this function is called dynamically during runtime (after pages/frames/controls are styled) + //Since controls derive their colors from [STYLECOLORS Colors], + //we'll temporarly modify it before controls are added to this frame, then restore it. + + EFI_STATUS Status = EFI_SUCCESS; + + #ifdef STYLE_OEM_CONTROL_COLOR + Status = OEMControlColor(frame, Colors); + #else + #ifdef STYLE_CONTROL_COLOR + Status = OverRideControlColor(frame, Colors); + #else + //Temporarly Match the BGColor of the frame + Colors->BGColor = frame->FrameData.BGColor ; + Colors->SecBGColor = frame->FrameData.BGColor ; + Colors->SelBGColor = frame->FrameData.BGColor ; + Colors->NSelBGColor = frame->FrameData.BGColor ; + Colors->LabelBGColor = frame->FrameData.BGColor ; + Colors->PopupBGColor = frame->FrameData.BGColor ; + + #endif + + #endif + + return Status ; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleGetSpecialColor +// +// Description: Function to get control special color +// +// Input: UINT16 ControlType, UINT8 *Color +// +// Output: status +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +EFI_STATUS StyleGetSpecialColor( UINT16 ControlType, UINT8 *Color) +{ + EFI_STATUS Status = EFI_SUCCESS;; + + #ifdef STYLE_OEM_CONTROL_COLOR + Status = OEMGetSpecialColor(ControlType, Color); + #else + + + switch ( ControlType ) + { + case CONTROL_TYPE_MEMO: + if (Color !=NULL) *Color = MEMO_COLOR ; + break; + + case CONTROL_TYPE_TEXT: + if (Color !=NULL) *Color = TEXT_COLOR ; + break; + + default: + Status = EFI_UNSUPPORTED;; + break; + } + #endif + + return Status ; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: GetWindowLevel +// +// Description: Function to get window level +// +// Input: UINT16 PageID +// +// Output: INTN Level +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +INTN GetWindowLevel( UINT16 PageID) +{ + INTN zIndex = 0 ; + UINT16 TempID = PageID ; + + while(gApp->PageList[TempID]->PageData.PageParentID) + { + TempID = gApp->PageList[TempID]->PageData.PageParentID ; + zIndex += 1 ; + } + + return zIndex ; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleGetWindowColor +// +// Description: Function to get window color +// +// Input: UINT8 *Color - Window Color +// INTN Level - Window Level +// UINT8 Type - Window Type (0->Setup, 1->PostMenu) +// +// Output: status +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +EFI_STATUS StyleGetWindowColor(UINT8 *Color, INTN Level, UINT8 WindowType) +{ + return EFI_SUCCESS ; + +} + +VOID GetMessageboxColorHook(UINT8 **Color); +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleGetMessageboxColor +// +// Description: Function to get control Messagebox color +// +// Input: UINT16 ControlType, UINT8 *Color +// +// Output: status +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +EFI_STATUS StyleGetMessageboxColor( UINT8 MessageBoxType, UINT8 *Color) +{ + EFI_STATUS Status = EFI_SUCCESS;; + + if(Color == NULL) + return Status ; + + + switch ( MessageBoxType ) + { + case MSGBOX_EX_CATAGORY_HELP: + *Color = EFI_BACKGROUND_LIGHTGRAY | EFI_BLUE ; + break; + + case MSGBOX_EX_CATAGORY_QUERY: + *Color = EFI_BACKGROUND_BLUE | EFI_WHITE ; + break; + + case MSGBOX_EX_CATAGORY_SUCCESS: + *Color = EFI_BACKGROUND_GREEN | EFI_WHITE ; + break; + + case MSGBOX_EX_CATAGORY_WARNING: + *Color = EFI_BACKGROUND_RED | EFI_WHITE ; + break; + + case MSGBOX_EX_CATAGORY_ERROR: + *Color = EFI_BACKGROUND_RED | EFI_WHITE ; + break; + + case MSGBOX_EX_CATAGORY_PROGRESS: + *Color = EFI_BACKGROUND_LIGHTGRAY | EFI_WHITE ; + break; + + case MSGBOX_EX_CATAGORY_HALT: + *Color = EFI_BACKGROUND_LIGHTGRAY | EFI_WHITE ; + break; + + case MSGBOX_EX_CATAGORY_NORMAL: + + default: + *Color = EFI_BACKGROUND_BLUE | EFI_WHITE ; + + break; + } + + GetMessageboxColorHook(&Color); + + return Status ; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleBeforeFrame +// +// Description: Function to alter frame styling before frame is drawn +// +// Input: FRAME_DATA *frame +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID StyleBeforeFrame( FRAME_DATA *frame ) +{ + #ifdef STYLE_OEM_BEFORE_FRAME + OEMStyleBeforeFrame(frame); + #else + #ifdef STYLE_OVERRIDE_BEFORE_FRAME // from Ezport.h + OverRideStyleBeforeFrame(frame ); // From ezport.c + #endif + + #endif +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleUpdateFrameStrings +// +// Description: Function to update frame strings +// +// Input: PAGE_DATA *page +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID StyleUpdateFrameStrings( PAGE_DATA *page ) +{ + #ifdef STYLE_OEM_FRAME_TOKEN // SDL + OEMStyleUpdateFrameStrings(page); // OEM + #else + #ifdef STYLE_OVERRIDE_FRAME_TOKEN // from Ezport.h + OverRideStyleUpdateFrameStrings(page ); // From ezport.c + #endif + #endif +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleFrameDrawable +// +// Description: Function to determine if frame is drawable +// +// Input: FRAME_DATA *frame +// +// Output: EFI_STATUS +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +EFI_STATUS StyleFrameDrawable( FRAME_DATA *frame ) +{ + EFI_STATUS Status = EFI_SUCCESS; + + #ifdef STYLE_OEM_FRAME_DRAWABLE // SDL + Status = OEMStyleFrameDrawable(frame); // OEM + #else + #ifdef STYLE_OVERRIDE_FRAME_DRAWABLE // from Ezport.h + Status = OverRideStyleFrameDrawable(frame ); // From ezport.c + #endif + #endif + + return Status ; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleInit +// +// Description: Function to initialize style +// +// Input: VOID +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID StyleInit( VOID ) +{ + SetDesiredTextMode(); + OverRideStyleInit(); // From ezport.c + +#ifdef STYLE_OEM_INIT // SDL + OEMStyleInit(); // OEM +#endif + MouseInit(); +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleExit +// +// Description: Function to do style initialization on exit +// +// Input: VOID +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID StyleExit( VOID ) +{ + #ifdef STYLE_OEM_STYLE_EXIT // SDL + OEMStyleExit(); // OEM + #else + #ifdef STYLE_OVERRIDE_EXIT // from Ezport.h + OverRideStyleExit(); // From ezport.c + #endif + #endif + MouseDestroy(); //EIP-84150 +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleDrawPageBorder +// +// Description: Function to draw the page border +// +// Input: UINT32 page number +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID StyleDrawPageBorder( UINT32 page ) +{ + #ifdef STYLE_OEM_PAGE_BORDER // SDL + OEMStyleDrawPageBorder(page); // OEM + #else + #ifdef STYLE_OVERRIDE_PAGE_BORDER // from Ezport.h + OverRideStyleDrawPageBorder(page); // From ezport.c + #else + ClearScreen( EFI_BACKGROUND_BLUE | EFI_WHITE ); + #endif + #endif + +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleDrawScrollBar +// +// Description: Function to draw the frame scrollbar +// +// Input: FRAME_DATA *frame, UINT32 FirstLine, UINT32 LastLine, UINT32 modVal, UINT32 sizeOfBar, UINT32 numOfBlocks, BOOLEAN bEraseScrollBar +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID StyleDrawScrollBar(FRAME_DATA *frame, UINT32 FirstLine, UINT32 LastLine, UINT32 modVal, + UINT32 sizeOfBar, UINT32 numOfBlocks, BOOLEAN bEraseScrollBar) +{ + #ifdef STYLE_OEM_SCROLLBAR + OEMDrawScrollBar(frame, FirstLine, LastLine, modVal, sizeOfBar, numOfBlocks, bEraseScrollBar); + #else + #ifdef STYLE_OVERRIDE_SCROLLBAR + OverRideDrawScrollBar(frame, FirstLine, LastLine, modVal, sizeOfBar, numOfBlocks, bEraseScrollBar); + #else + FrameDrawScrollBar(frame, FirstLine, LastLine, modVal, sizeOfBar, numOfBlocks, bEraseScrollBar); + #endif + #endif + +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleDrawHelpScrollBar +// +// Description: Function to draw the help frame scrollbar +// +// Input: MEMO_DATA *memo, UINT16 height +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID StyleDrawHelpScrollBar( MEMO_DATA *memo, UINT16 height) +{ + #ifdef STYLE_OEM_DRAW_HELP_SCROLLBAR + OEMDrawHelpScrollBar(memo, height); + #else + #ifdef STYLE_OVERRIDE_HELP_SCROLLBAR + OverRideDrawHelpScrollBar(memo, height); + #else + if(IsHelpAreaScrollBarSupport()) + MemoDrawScrollBar(memo, height); + #endif + #endif + +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleGetFrameInitData +// +// Description: Function to get frame initialization data +// +// Input: UINT32 page number, UINT32 frame number +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID *StyleGetFrameInitData( UINT32 page, UINT32 frame ) +{ + #ifdef STYLE_OEM_FRAME_INIT_DATA + return OEMStyleGetFrameInitData(page, frame); + #else + #ifdef STYLE_OVERRIDE_FRAME_INIT_DATA // from Ezport.h + return OverRideStyleGetFrameInitData(page, frame); // From ezport.c + #else + return NULL; + #endif + #endif + +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleFrameHandleKey +// +// Description: Function to handle frame action keys +// +// Input: FRAME_DATA *frame, EFI_INPUT_KEY Key +// +// Output: EFI_STATUS +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +EFI_STATUS StyleFrameHandleKey( FRAME_DATA *frame, EFI_INPUT_KEY Key ) +{ + EFI_STATUS Status = EFI_UNSUPPORTED;; + + #ifdef STYLE_OEM_HANDLE_KEY // SDL + Status = OEMStyleFrameHandleKey(frame, Key); // OEM + #else + #ifdef STYLE_OVERRIDE_HANDLE_KEY // from Ezport.h + Status = OverRideStyleFrameHandleKey(frame, Key); // From ezport.c + #endif + #endif + + return Status ; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleFrameHandleMouse +// +// Description: Function to handle frame using mouse +// +// Input: FRAME_DATA *frame, +// MOUSE_INFO MouseInfo +// +// Output: EFI_STATUS +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +EFI_STATUS StyleFrameHandleMouse( FRAME_DATA *frame, MOUSE_INFO MouseInfo) +{ + EFI_STATUS Status = EFI_UNSUPPORTED;; + + #ifdef STYLE_OEM_HANDLE_MOUSE + Status = OEMStyleFrameHandleMouse(frame, MouseInfo); + #else + #ifdef STYLE_OVERRIDE_HANDLE_MOUSE + Status = OverRideStyleFrameHandleMouse(frame, MouseInfo); + #endif + #endif + + return Status ; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleFrameHandleTimer +// +// Description: Function to handle frame timer action +// +// Input: FRAME_DATA *frame, ACTION_DATA *action +// +// Output: EFI_STATUS +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +EFI_STATUS StyleFrameHandleTimer( FRAME_DATA *frame, ACTION_DATA *action ) +{ + EFI_STATUS Status = EFI_UNSUPPORTED;; + + #ifdef STYLE_OEM_HANDLE_TIMER + Status = OEMStyleFrameHandleTimer(frame, action); + #else + #ifdef STYLE_OVERRIDE_HANDLE_TIMER + Status = OverRideStyleFrameHandleTimer(frame, action); + #endif + #endif + + return Status ; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleHandleControlOverflow +// +// Description: Function to handle control overflow +// +// Input: FRAME_DATA *frame, CONTROL_DATA *control, UINT16 count +// +// Output: EFI_STATUS +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +EFI_STATUS StyleHandleControlOverflow( FRAME_DATA *frame, CONTROL_DATA *control, UINT16 count ) +{ + EFI_STATUS Status = EFI_OUT_OF_RESOURCES; + + #ifdef STYLE_OEM_CONTROL_OVERFLOW + Status = OEMStyleHandleControlOverflow(frame, control, count ); + #else + #ifdef STYLE_OVERRIDE_CONTROL_OVERFLOW + Status = OverRideStyleHandleControlOverflow(frame, control, count ); + #endif + #endif + + return Status ; + +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleInitializeFrame +// +// Description: Function to Initialize frame +// +// Input: FRAME_DATA *frame, UINT32 frameType, PAGE_INFO *data +// +// Output: EFI_STATUS +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +EFI_STATUS StyleInitializeFrame( FRAME_DATA *frame, UINT32 frameType, PAGE_INFO *data ) +{ + EFI_STATUS Status = EFI_SUCCESS;; + + #ifdef STYLE_OEM_INITIALIZE_FRAME + Status = OEMStyleInitializeFrame(frame, frameType, data ); + #else + #ifdef STYLE_OVERRIDE_INITIALIZE_FRAME + Status = OverRideStyleInitializeFrame(frame, frameType, data); //style.c + #endif + #endif + + return Status ; + +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleGetNavToken +// +// Description: Function to get navigation token +// +// Input: UINT32 page +// +// Output: UINT16 token number +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +UINT16 StyleGetNavToken( UINT32 page ) +{ + UINT16 i=0 ; + + #ifdef STYLE_OEM_NAV_TOKEN + i = OEMStyleGetNavToken(page ); + #else + #ifdef STYLE_OVERRIDE_NAV_TOKEN + i = OverRideStyleGetNavToken(page); + #endif + #endif + + return i ; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleAddAdditionalControls +// +// Description: Function to add additinal controls +// +// Input: FRAME_DATA *frame, UINT32 controlNumber, BOOLEAN focus +// +// Output: EFI_STATUS +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +EFI_STATUS StyleAddAdditionalControls( FRAME_DATA *frame, UINT32 controlNumber, BOOLEAN focus ) +{ + EFI_STATUS Status = EFI_SUCCESS; + + #ifdef STYLE_OEM_ADD_CONTROLS + Status = OEMStyleAddAdditionalControls(frame, controlNumber, focus ); + #else + #ifdef STYLE_OVERRIDE_ADD_CONTROLS + Status = OverRideStyleAddAdditionalControls(frame, controlNumber, focus); + #endif + #endif + + return Status ; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleLanguagePage +// +// Description: Function to set Language page +// +// Input: SUBMENU_DATA *submenu +// +// Output: UINT16 page number +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +UINT16 StyleLanguagePage( SUBMENU_DATA *submenu ) +{ + UINT16 i = 0 ; + + #ifdef STYLE_OEM_LANGUAGE_PAGE + i = OEMStyleLanguagePage(submenu ); + #else + #ifdef STYLE_OVERRIDE_LANGUAGE_PAGE + i = OverRideStyleLanguagePage(submenu); + #endif + #endif + + return i ; +} + + + +static UINT16 _gBootManagerPageID = 0; +/*static*/ UINT16 _gHDOrderPageID = 0; +/*static*/ UINT16 _gCDOrderPageID = 0; +/*static*/ UINT16 _gFDOrderPageID = 0; +/*static*/ UINT16 _gNetOrderPageID = 0; +/*static*/ UINT16 _gBevOrderPageID = 0; + +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleBootManagerPage +// +// Description: Function to set boot manager page +// +// Input: SUBMENU_DATA *submenu +// +// Output: UINT16 page number +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +UINT16 StyleBootManagerPage( SUBMENU_DATA *submenu ) +{ + UINT16 i = 0 ; + + #ifdef STYLE_OEM_BM_PAGE + i = OEMStyleBootManagerPage(submenu ); + #else + #ifdef STYLE_OVERRIDE_BM_PAGE + i = OverRideStyleBootManagerPage(submenu); + #endif + #endif + + return i ; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleLabelCallback +// +// Description: Function to set label callback +// +// Input: FRAME_DATA *frame, LABEL_DATA *label, VOID *cookie +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID StyleLabelCallback( FRAME_DATA *frame, LABEL_DATA *label, VOID *cookie ) +{ + #ifdef STYLE_OEM_LABEL_CALLBACK + OEMStyleLabelCallback(frame, label, cookie ); + #else + #ifdef STYLE_OVERRIDE_LABEL_CALLBACK + OverRideStyleLabelCallback(frame, label, cookie ); + #endif + #endif +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleSelectFirstDisplayPage +// +// Description: Function to set the first display page +// +// Input: VOID +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID StyleSelectFirstDisplayPage( VOID ) +{ + #ifdef STYLE_OEM_FIRST_PAGE + OEMStyleSelectFirstDisplayPage(); + #else + #ifdef STYLE_OVERRIDE_FIRST_PAGE + OverRideStyleSelectFirstDisplayPage(); + #endif + #endif +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleAddExtraPagesData +// +// Description: Function to add extra pages +// +// Input: VOID +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID StyleAddExtraPagesData(VOID) +{ + #ifdef STYLE_OEM_ADD_EXTRA_PAGES + OEMStyleAddExtraPagesData(); + #else + #ifdef STYLE_OVERRIDE_ADD_EXTRA_PAGES + OverRideStyleAddExtraPagesData(); + #endif + #endif +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleGetTextMode +// +// Description: Function to get text mode +// +// Input: UINTN Rows, UINTN Cols +// +// Output: UNNTN mode +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +UINTN StyleGetTextMode( UINTN Rows, UINTN Cols ) +{ + EFI_STATUS Status; + INT32 i; + UINTN ModeRows, ModeCols; + + #ifdef STYLE_OEM_GET_TEXT_MODE + i = OEMStyleGetTextMode( Rows, Cols ); + #else + #ifdef STYLE_OVERRIDE_GET_TEXT_MODE + i = OverRideStyleGetTextMode( Rows, Cols); + #else + // Default Implementation + for ( i = 0; i < gST->ConOut->Mode->MaxMode; i++ ) + { + Status = gST->ConOut->QueryMode( gST->ConOut, i, &ModeCols, &ModeRows ); + if ( EFI_ERROR( Status ) ) + continue; + + if ( ( Cols == ModeCols ) && ( Rows == ModeRows ) ) + return i; + } + + // return MaxMode if the mode wasn't found + #endif + #endif + + return i; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleUpdateVersionString +// +// Description: Function to set the version string +// +// Input: VOID +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID StyleUpdateVersionString( VOID ) +{ + #ifdef STYLE_OEM_VERSION_STRING + OEMStyleUpdateVersionString(); + #else + #ifdef STYLE_OVERRIDE_VERSION_STRING + OverRideStyleUpdateVersionString(); + #endif + #endif +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleFrameSetControlPositions +// +// Description: Function to set control positioning in a frame +// +// Input: FRAME_DATA *frame, UINT32 *pOtherEnd +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID StyleFrameSetControlPositions(FRAME_DATA *frame, UINT32 *pOtherEnd) +{ + UINT32 u32Height = 0; + UINT32 i; + CONTROL_DATA *control; + UINT8 u8ChkResult; + + #ifdef STYLE_OEM_FRAME_CONTROL_POSITION + OEMStyleFrameSetControlPositions(frame, pOtherEnd); + #else + #ifdef STYLE_OVERRIDE_FRAME_CONTROL_POSITION + OverRideStyleFrameSetControlPositions(frame, pOtherEnd); + #else + //Move reference end variable based on action + if(pOtherEnd == &(frame->LastVisibleCtrl)) + { + i = frame->FirstVisibleCtrl; + } + else + { + i = frame->LastVisibleCtrl; + } + + //Calculate other end variable + while( (pOtherEnd == &(frame->LastVisibleCtrl)) ? (i < frame->ControlCount) : TRUE ) + { + control = frame->ControlList[i]; + + //EIP 75486 Support grayout condition for readonly controls + u8ChkResult = CheckControlCondition( &(control->ControlData) ); + + if((COND_NONE == u8ChkResult) || (COND_GRAYOUT == u8ChkResult)) + { + if( (u32Height + control->Height) < frame->FrameData.Height ) + { + *pOtherEnd = i; + u32Height += control->Height; + } + else + break; //We cant accommodate + } + else + *pOtherEnd = i; //we can accomodate a suppressed control + + if(pOtherEnd == &(frame->LastVisibleCtrl)) + i++; + else + { + // i>=0 in while loop will result in infinite loop + // break statement should be introduced inside + if (i == 0) + break; + i--; + } + } + + #endif + #endif + +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleOverRideComponent +// +// Description: Function to override component or control functionality +// +// Input: VOID +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID StyleOverRideComponent(VOID) +{ + #ifdef STYLE_OEM_COMPONENT_OVERRIDE // SDL + OEMOverRideComponent(); // OEM + #else + #ifdef STYLE_COMPONENT_OVERRIDE // from Ezport.h + OverRideComponent(); // From ezport.c + #endif + #endif +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: _StyleControlSubmenu +// +// Description: Function to initialize submenu control +// +// Input: CONTROL_INFO control, UINT16 pageID, VOID *ref +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID _StyleControlSubmenu( CONTROL_INFO *control, UINT16 pageID, VOID *ref ) +{ + control->ControlHandle = gHiiHandle; + control->ControlType = CONTROL_TYPE_SUBMENU; + control->ControlFlags.ControlVisible = TRUE; + control->ControlPtr = (VOID*)ref; + control->ControlPageID = pageID; + control->ControlDestPageID = 0; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleHelpAreaScrollable +// +// Description: Function to get Help area scroll support +// +// Input: VOID +// +// Output: BOOLEAN +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +BOOLEAN StyleHelpAreaScrollable(VOID) +{ + if(IsHelpAreaScrollBarSupport()) + return TRUE ; + else + return FALSE; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleGetShadowSupport +// +// Description: Function to get shadow support +// +// Input: VOID +// +// Output: BOOLEAN +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +BOOLEAN StyleGetShadowSupport(VOID) +{ + if(STYLE_SHADOW_SUPPORT) + return TRUE ; + else + return FALSE; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleGetScrollBehavior +// +// Description: Function to get scroll behavior +// +// Input: VOID +// +// Output: BOOLEAN +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +BOOLEAN StyleGetScrollBehavior(VOID) +{ + return STYLE_SCROLLBAR_ROLLOVER ; // 0 - Item Limit, 1 - Rollover + +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleGetDateFormat +// +// Description: Function to get date format +// +// Input: VOID +// +// Output: BOOLEAN +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +UINTN StyleGetDateFormat(VOID) +{ + #ifdef STYLE_OEM_DATE_FOMAT + return OEMStyleGetDateFormat(); + #else + return STYLE_DATE_FORMAT; + #endif +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleShowDay +// +// Description: Function to show day in date format +// +// Input: VOID +// +// Output: BOOLEAN +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +BOOLEAN StyleShowDay(VOID) +{ + return STYLE_SHOW_DAY ; + +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleGetStdMaxRows +// +// Description: Function to max number of columns +// +// Input: VOID +// +// Output: STYLE_STD_MAX_ROWS +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +UINTN StyleGetStdMaxRows(VOID) +{ + return STYLE_STD_MAX_ROWS; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleGetStdMaxCols +// +// Description: Function to get max number of rows +// +// Input: VOID +// +// Output: STYLE_STD_MAX_COLS +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +UINTN StyleGetStdMaxCols(VOID) +{ + return STYLE_STD_MAX_COLS; +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleGetClearScreenColor +// +// Description: Function to Get Clear Screen Color +// +// Input: VOID +// +// Output: STYLE_CLEAR_SCREEN_COLOR +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +UINTN StyleGetClearScreenColor(VOID) +{ + #ifdef STYLE_OVERRIDE_CLEAR_SCREEN_COLOR + return OverRideStyleGetClearScreenColor(); + #else + return STYLE_CLEAR_SCREEN_COLOR; + #endif +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleGetPageLinkColor +// +// Description: Function to PageLink (Submenu) color +// +// Input: VOID +// +// Output: PAGE_LINK_FGCOLOR +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +UINT8 StyleGetPageLinkColor(VOID) +{ + #ifdef STYLE_OVERRIDE_PAGELINK_COLOR + return OverRideStyleGetPageLinkColor(); + #else + return PAGE_LINK_COLOR; + #endif +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleGetScrollBarColor +// +// Description: Function to get scrollbar color +// +// Input: VOID +// +// Output: FGCOLOR|BGCOLOR +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +UINT8 StyleGetScrollBarColor(VOID) +{ + #ifdef STYLE_OVERRIDE_SCROLLBAR_COLOR + return OverRideStyleGetScrollBarColor(); + #else + return (SCROLLBAR_FGCOLOR | SCROLLBAR_BGCOLOR) ; + #endif +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleGetScrollBarUpArrowColor +// +// Description: Function to get scrollbar UpArrow Color +// +// Input: VOID +// +// Output: FGCOLOR|BGCOLOR +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +UINT8 StyleGetScrollBarUpArrowColor(VOID) +{ + #ifdef STYLE_OVERRIDE_SCROLLBAR_UP_ARROW_COLOR + return OverRideStyleGetScrollBarUpArrowColor(); + #else + return (SCROLLBAR_UPARROW_FGCOLOR | SCROLLBAR_UPARROW_BGCOLOR) ; + #endif +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleGetScrollBarDownArrowColor +// +// Description: Function to get scrollbar downarrow color +// +// Input: VOID +// +// Output: FGCOLOR|BGCOLOR +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +UINT8 StyleGetScrollBarDownArrowColor(VOID) +{ + #ifdef STYLE_OVERRIDE_SCROLLBAR_DOWN_ARROW_COLOR + return OverRideStyleGetScrollBarDownArrowColor(); + #else + return (SCROLLBAR_DOWNARROW_FGCOLOR | SCROLLBAR_DOWNARROW_BGCOLOR) ; + #endif +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StylePageItemFocus +// +// Description: This function is called whenever a user navigates to a new page. +// OEMs may use this hook to set item focus. +// The default behavior sets focus to the previously focused page item. +// +// Input: PAGE_DATA *page, FRAME_DATA *frame +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID StylePageItemFocus(PAGE_DATA *page, FRAME_DATA *frame ) +{ + + #ifdef STYLE_OEM_PAGE_ITEM_FOCUS + OEMStylePageItemFocus(page, frame); + #else + #ifdef STYLE_OVERRIDE_PAGE_ITEM_FOCUS + OverRideStylePageItemFocus(page, frame); + #else + if(STYLE_PAGE_FIRSTITEM_FOCUS) + { + UINT32 i; + for ( i = 0; i < frame->ControlCount; i++ ) + { + + if ( _FrameSetControlFocus( frame, i ) ) + { + frame->FirstVisibleCtrl = 0; + break; + } + } + ///Eip:30111 fix - Update the Help based on the Focussed Item + UpdatePageFocusedItemHelp(page); + } + #endif + #endif +} +//<AMI_PHDR_START> +//---------------------------------------------------------------------------- +// Procedure: StyleSubPageItemFocus +// +// Description: This function is called whenever a user returns (or navigates back) +// from a submenu page causing a complete page redraw. OEMs may use this hook to set item focus. +// The default behavior sets focus to the previously focused page item. +// +// Input: PAGE_DATA *page, FRAME_DATA *frame +// +// Output: VOID +// +//---------------------------------------------------------------------------- +//<AMI_PHDR_END> +VOID StyleSubPageItemFocus(PAGE_DATA *page, FRAME_DATA *frame ) +{ + #ifdef STYLE_OEM_SUBPAGE_ITEM_FOCUS // SDL + OEMStyleSubPageItemFocus(page, frame); // OEM + #else + #ifdef STYLE_OVERRIDE_SUBPAGE_ITEM_FOCUS // from Ezport.h + OverRideStyleSubPageItemFocus(page, frame); // From ezport.c + #else + if(STYLE_SUBPAGE_FIRSTITEM_FOCUS) + { + UINT32 i; + + for ( i = 0; i < frame->ControlCount; i++ ) + { + if ( _FrameSetControlFocus( frame, i ) ) + { + frame->FirstVisibleCtrl = 0; + break; + } + } + } + #endif + #endif +} +#endif +//*****************************************************************// +//*****************************************************************// +//** **// +//** (C)Copyright 1985-2013, American Megatrends, Inc. **// +//** **// +//** All Rights Reserved. **// +//** **// +//** 5555 Oakbrook Pkwy , Norcross, GA 30071 **// +//** **// +//** Phone: (770)-246-8600 **// +//** **// +//*****************************************************************// +//*****************************************************************// |