1 /** @file
2   This library class defines a set of interfaces to customize Ui module
3 
4 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6 
7 **/
8 
9 #ifndef __FRONTPAGE_CUSTOMIZED_UI_H__
10 #define __FRONTPAGE_CUSTOMIZED_UI_H__
11 
12 /**
13   Update the banner string in the front page.
14 
15   Current layout for the banner string like below:
16   PS: Totally only 5 lines of banner supported.
17 
18   Line 1: Left BannerStr                           RightBannerStr
19   Line 2: Left BannerStr                           RightBannerStr
20   Line 3: Left BannerStr                           RightBannerStr
21   Line 4: Left BannerStr                           RightBannerStr
22   Line 5: Left BannerStr                           RightBannerStr
23   <EmptyLine>
24   First menu in front page.
25   ...
26 
27   @param  LineIndex         The line index of the banner need to check.
28   @param  LeftOrRight       The left or right banner need to check.
29   @param  BannerStr         Banner string need to update.
30                             Input the current string and user can update
31                             it and return the new string.
32 
33 **/
34 VOID
35 UiCustomizeFrontPageBanner (
36   IN     UINTN          LineIndex,
37   IN     BOOLEAN        LeftOrRight,
38   IN OUT EFI_STRING     *BannerStr
39   );
40 
41 /**
42   Customize menus in the page.
43 
44   @param[in]  HiiHandle             The HII Handle of the form to update.
45   @param[in]  StartOpCodeHandle     The context used to insert opcode.
46 
47 **/
48 VOID
49 UiCustomizeFrontPage (
50   IN EFI_HII_HANDLE  HiiHandle,
51   IN VOID            *StartOpCodeHandle
52   );
53 
54 /**
55   This function processes the results of changes in configuration.
56 
57 
58   @param HiiHandle       Points to the hii handle for this formset.
59   @param Action          Specifies the type of action taken by the browser.
60   @param QuestionId      A unique value which is sent to the original exporting driver
61                          so that it can identify the type of data to expect.
62   @param Type            The type of value for the question.
63   @param Value           A pointer to the data being sent to the original exporting driver.
64   @param ActionRequest   On return, points to the action requested by the callback function.
65 
66   @retval  EFI_SUCCESS           The callback successfully handled the action.
67   @retval  EFI_OUT_OF_RESOURCES  Not enough storage is available to hold the variable and its data.
68   @retval  EFI_DEVICE_ERROR      The variable could not be saved.
69   @retval  EFI_UNSUPPORTED       The specified Action is not supported by the callback.
70 
71 **/
72 EFI_STATUS
73 UiFrontPageCallbackHandler (
74   IN  EFI_HII_HANDLE                         HiiHandle,
75   IN  EFI_BROWSER_ACTION                     Action,
76   IN  EFI_QUESTION_ID                        QuestionId,
77   IN  UINT8                                  Type,
78   IN  EFI_IFR_TYPE_VALUE                     *Value,
79   OUT EFI_BROWSER_ACTION_REQUEST             *ActionRequest
80   );
81 
82 #endif
83