TianoCore EDK2 master
Loading...
Searching...
No Matches
FrontPageCustomizedUi.c
Go to the documentation of this file.
1
9#include <Uefi.h>
11#include <Library/BaseLib.h>
13#include "FrontPage.h"
15
16extern FRONT_PAGE_CALLBACK_DATA gFrontPagePrivate;
17
26VOID
28 IN EFI_HII_HANDLE HiiHandle,
29 IN VOID *StartOpCodeHandle
30 )
31{
32 //
33 // Create "Select Language" menu with Oneof opcode.
34 //
35 UiCreateLanguageMenu (HiiHandle, StartOpCodeHandle);
36
37 //
38 // Create empty line.
39 //
40 UiCreateEmptyLine (HiiHandle, StartOpCodeHandle);
41
42 //
43 // Find third party drivers which need to be shown in the front page.
44 //
45 UiListThirdPartyDrivers (HiiHandle, &gEfiIfrFrontPageGuid, NULL, StartOpCodeHandle);
46
47 //
48 // Create empty line.
49 //
50 UiCreateEmptyLine (HiiHandle, StartOpCodeHandle);
51
52 //
53 // Create "Continue" menu.
54 //
55 UiCreateContinueMenu (HiiHandle, StartOpCodeHandle);
56
57 //
58 // Create reset menu.
59 //
60 UiCreateResetMenu (HiiHandle, StartOpCodeHandle);
61}
62
83 IN EFI_HII_HANDLE HiiHandle,
84 IN EFI_BROWSER_ACTION Action,
85 IN EFI_QUESTION_ID QuestionId,
86 IN UINT8 Type,
88 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
89 )
90{
91 EFI_STATUS Status;
92
93 if (UiSupportLibCallbackHandler (HiiHandle, Action, QuestionId, Type, Value, ActionRequest, &Status)) {
94 return Status;
95 }
96
97 return EFI_UNSUPPORTED;
98}
99
122VOID
124 IN UINTN LineIndex,
125 IN BOOLEAN LeftOrRight,
126 IN OUT EFI_STRING *BannerStr
127 )
128{
129 if ((LineIndex == 5) && LeftOrRight) {
130 // Update STR_CUSTOMIZE_BANNER_LINE5_LEFT
131 if (PcdGetBool (PcdTestKeyUsed)) {
132 if (BannerStr != NULL) {
133 FreePool (*BannerStr);
134 }
135
136 *BannerStr = HiiGetString (gFrontPagePrivate.HiiHandle, STRING_TOKEN (STR_TEST_KEY_USED), NULL);
137 }
138 }
139
140 return;
141}
UINT64 UINTN
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID UiCustomizeFrontPageBanner(IN UINTN LineIndex, IN BOOLEAN LeftOrRight, IN OUT EFI_STRING *BannerStr)
EFI_STATUS UiFrontPageCallbackHandler(IN EFI_HII_HANDLE HiiHandle, IN EFI_BROWSER_ACTION Action, IN EFI_QUESTION_ID QuestionId, IN UINT8 Type, IN EFI_IFR_TYPE_VALUE *Value, OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest)
VOID UiCustomizeFrontPage(IN EFI_HII_HANDLE HiiHandle, IN VOID *StartOpCodeHandle)
EFI_STATUS UiListThirdPartyDrivers(IN EFI_HII_HANDLE HiiHandle, IN EFI_GUID *ClassGuid, IN DRIVER_SPECIAL_HANDLER SpecialHandlerFn, IN VOID *StartOpCodeHandle)
VOID UiCreateResetMenu(IN EFI_HII_HANDLE HiiHandle, IN VOID *StartOpCodeHandle)
VOID UiCreateEmptyLine(IN EFI_HII_HANDLE HiiHandle, IN VOID *StartOpCodeHandle)
VOID UiCreateLanguageMenu(IN EFI_HII_HANDLE HiiHandle, IN VOID *StartOpCodeHandle)
BOOLEAN UiSupportLibCallbackHandler(IN EFI_HII_HANDLE HiiHandle, IN EFI_BROWSER_ACTION Action, IN EFI_QUESTION_ID QuestionId, IN UINT8 Type, IN EFI_IFR_TYPE_VALUE *Value, OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest, OUT EFI_STATUS *Status)
VOID UiCreateContinueMenu(IN EFI_HII_HANDLE HiiHandle, IN VOID *StartOpCodeHandle)
EFI_STRING EFIAPI HiiGetString(IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId, IN CONST CHAR8 *Language OPTIONAL)
Definition: HiiString.c:211
#define NULL
Definition: Base.h:319
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define PcdGetBool(TokenName)
Definition: PcdLib.h:401
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
#define STRING_TOKEN(t)
VOID * EFI_HII_HANDLE