• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
9 
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 
13 **/
14 
15 #ifndef __FRONTPAGE_CUSTOMIZED_UI_H__
16 #define __FRONTPAGE_CUSTOMIZED_UI_H__
17 
18 /**
19   Update the banner string in the front page.
20 
21   Current layout for the banner string like below:
22   PS: Totally only 5 lines of banner supported.
23 
24   Line 1: Left BannerStr                           RightBannerStr
25   Line 2: Left BannerStr                           RightBannerStr
26   Line 3: Left BannerStr                           RightBannerStr
27   Line 4: Left BannerStr                           RightBannerStr
28   Line 5: Left BannerStr                           RightBannerStr
29   <EmptyLine>
30   First menu in front page.
31   ...
32 
33   @param  LineIndex         The line index of the banner need to check.
34   @param  LeftOrRight       The left or right banner need to check.
35   @param  BannerStr         Banner string need to update.
36                             Input the current string and user can update
37                             it and return the new string.
38 
39 **/
40 VOID
41 UiCustomizeFrontPageBanner (
42   IN     UINTN          LineIndex,
43   IN     BOOLEAN        LeftOrRight,
44   IN OUT EFI_STRING     *BannerStr
45   );
46 
47 /**
48   Customize menus in the page.
49 
50   @param[in]  HiiHandle             The HII Handle of the form to update.
51   @param[in]  StartOpCodeHandle     The context used to insert opcode.
52 
53 **/
54 VOID
55 UiCustomizeFrontPage (
56   IN EFI_HII_HANDLE  HiiHandle,
57   IN VOID            *StartOpCodeHandle
58   );
59 
60 /**
61   This function processes the results of changes in configuration.
62 
63 
64   @param HiiHandle       Points to the hii handle for this formset.
65   @param Action          Specifies the type of action taken by the browser.
66   @param QuestionId      A unique value which is sent to the original exporting driver
67                          so that it can identify the type of data to expect.
68   @param Type            The type of value for the question.
69   @param Value           A pointer to the data being sent to the original exporting driver.
70   @param ActionRequest   On return, points to the action requested by the callback function.
71 
72   @retval  EFI_SUCCESS           The callback successfully handled the action.
73   @retval  EFI_OUT_OF_RESOURCES  Not enough storage is available to hold the variable and its data.
74   @retval  EFI_DEVICE_ERROR      The variable could not be saved.
75   @retval  EFI_UNSUPPORTED       The specified Action is not supported by the callback.
76 
77 **/
78 EFI_STATUS
79 UiFrontPageCallbackHandler (
80   IN  EFI_HII_HANDLE                         HiiHandle,
81   IN  EFI_BROWSER_ACTION                     Action,
82   IN  EFI_QUESTION_ID                        QuestionId,
83   IN  UINT8                                  Type,
84   IN  EFI_IFR_TYPE_VALUE                     *Value,
85   OUT EFI_BROWSER_ACTION_REQUEST             *ActionRequest
86   );
87 
88 #endif
89