3 This library class defines a set of interfaces to customize Ui module
5 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials are licensed and made available under
7 the terms and conditions of the BSD License that accompanies this distribution.
8 The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #include <Protocol/HiiConfigAccess.h>
17 #include <Library/BaseLib.h>
18 #include <Library/MemoryAllocationLib.h>
19 #include "FrontPageCustomizedUiSupport.h"
22 Customize menus in the page.
24 @param[in] HiiHandle The HII Handle of the form to update.
25 @param[in] StartOpCodeHandle The context used to insert opcode.
26 @param[in] CustomizePageType The page type need to be customized.
30 UiCustomizeFrontPage (
31 IN EFI_HII_HANDLE HiiHandle
,
32 IN VOID
*StartOpCodeHandle
36 // Create "Select Language" menu with Oneof opcode.
38 UiCreateLanguageMenu (HiiHandle
, StartOpCodeHandle
);
43 UiCreateEmptyLine(HiiHandle
, StartOpCodeHandle
);
46 // Find third party drivers which need to be shown in the front page.
48 UiListThirdPartyDrivers (HiiHandle
, &gEfiIfrFrontPageGuid
, NULL
, StartOpCodeHandle
);
53 UiCreateEmptyLine(HiiHandle
, StartOpCodeHandle
);
56 // Create "Continue" menu.
58 UiCreateContinueMenu(HiiHandle
, StartOpCodeHandle
);
63 UiCreateResetMenu(HiiHandle
, StartOpCodeHandle
);
67 This function processes the results of changes in configuration.
70 @param HiiHandle Points to the hii handle for this formset.
71 @param Action Specifies the type of action taken by the browser.
72 @param QuestionId A unique value which is sent to the original exporting driver
73 so that it can identify the type of data to expect.
74 @param Type The type of value for the question.
75 @param Value A pointer to the data being sent to the original exporting driver.
76 @param ActionRequest On return, points to the action requested by the callback function.
78 @retval EFI_SUCCESS The callback successfully handled the action.
79 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data.
80 @retval EFI_DEVICE_ERROR The variable could not be saved.
81 @retval EFI_UNSUPPORTED The specified Action is not supported by the callback.
85 UiFrontPageCallbackHandler (
86 IN EFI_HII_HANDLE HiiHandle
,
87 IN EFI_BROWSER_ACTION Action
,
88 IN EFI_QUESTION_ID QuestionId
,
90 IN EFI_IFR_TYPE_VALUE
*Value
,
91 OUT EFI_BROWSER_ACTION_REQUEST
*ActionRequest
96 if (UiSupportLibCallbackHandler (HiiHandle
, Action
, QuestionId
, Type
, Value
, ActionRequest
, &Status
)) {
100 return EFI_UNSUPPORTED
;
104 Update the banner string in the front page.
106 Current layout for the banner string like below:
107 PS: Totally only 5 lines of banner supported.
109 Line 1: Left BannerStr RightBannerStr
110 Line 2: Left BannerStr RightBannerStr
111 Line 3: Left BannerStr RightBannerStr
112 Line 4: Left BannerStr RightBannerStr
113 Line 5: Left BannerStr RightBannerStr
115 First menu in front page.
118 @param LineIndex The line index of the banner need to check.
119 @param LeftOrRight The left or right banner need to check.
120 @param BannerStr Banner string need to update.
121 Input the current string and user can update
122 it and return the new string.
126 UiCustomizeFrontPageBanner (
128 IN BOOLEAN LeftOrRight
,
129 IN OUT EFI_STRING
*BannerStr