]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.h
MdeModulePkg UiApp: change code for easy customization.
[mirror_edk2.git] / MdeModulePkg / Application / UiApp / FrontPageCustomizedUiSupport.h
1 /** @file
2 This library class defines a set of interfaces to be used by 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_CUSTOMIZE_UI_SUPPORT_UI_H__
16 #define __FRONTPAGE_CUSTOMIZE_UI_SUPPORT_UI_H__
17
18 /**
19 Create continue menu in the front page.
20
21 @param[in] HiiHandle The hii handle for the Uiapp driver.
22 @param[in] StartOpCodeHandle The opcode handle to save the new opcode.
23
24 @retval EFI_SUCCESS Search the driver success
25
26 **/
27 VOID
28 UiCreateContinueMenu (
29 IN EFI_HII_HANDLE HiiHandle,
30 IN VOID *StartOpCodeHandle
31 );
32
33 /**
34 Create empty line menu.
35
36 @param HiiHandle The hii handle for the Uiapp driver.
37 @param StartOpCodeHandle The opcode handle to save the new opcode.
38
39 @retval EFI_SUCCESS Search the driver success
40
41 **/
42 VOID
43 UiCreateEmptyLine (
44 IN EFI_HII_HANDLE HiiHandle,
45 IN VOID *StartOpCodeHandle
46 );
47
48 /**
49 Create Select language menu in the front page with oneof opcode.
50
51 @param[in] HiiHandle The hii handle for the Uiapp driver.
52 @param[in] StartOpCodeHandle The opcode handle to save the new opcode.
53
54 @retval EFI_SUCCESS Search the driver success
55
56 **/
57 VOID
58 UiCreateLanguageMenu (
59 IN EFI_HII_HANDLE HiiHandle,
60 IN VOID *StartOpCodeHandle
61 );
62
63 /**
64 Create Reset menu.
65
66 @param[in] HiiHandle The hii handle for the Uiapp driver.
67 @param[in] StartOpCodeHandle The opcode handle to save the new opcode.
68
69 @retval EFI_SUCCESS Search the driver success
70
71 **/
72 VOID
73 UiCreateResetMenu (
74 IN EFI_HII_HANDLE HiiHandle,
75 IN VOID *StartOpCodeHandle
76 );
77
78 /**
79 Rename the driver name if necessary.
80
81 @param DriverName Input the driver name.
82 @param NewDriverName Return the new driver name.
83 @param EmptyLineAfter Whether need to insert empty line.
84
85 @retval New driver name if compared, else NULL.
86
87 **/
88 typedef
89 BOOLEAN
90 (EFIAPI *DRIVER_SPECIAL_HANDLER)(
91 IN CHAR16 *DriverName,
92 OUT CHAR16 **NewName,
93 OUT BOOLEAN *EmptyLineAfter
94 );
95
96 /**
97 Search the drivers in the system which need to show in the front page
98 and insert the menu to the front page.
99
100 @param HiiHandle The hii handle for the Uiapp driver.
101 @param ClassGuid The class guid for the driver which is the target.
102 @param StartOpCodeHandle The opcode handle to save the new opcode.
103 @param SpecialHandler The pointer to the specail handler function, if any.
104
105 @retval EFI_SUCCESS Search the driver success
106
107 **/
108 EFI_STATUS
109 UiListThirdPartyDrivers (
110 IN EFI_HII_HANDLE HiiHandle,
111 IN EFI_GUID *ClassGuid,
112 IN DRIVER_SPECIAL_HANDLER SpecialHandlerFn,
113 IN VOID *StartOpCodeHandle
114 );
115
116 /**
117 This function processes the results of changes in configuration.
118
119
120 @param HiiHandle Points to the hii handle for this formset.
121 @param Action Specifies the type of action taken by the browser.
122 @param QuestionId A unique value which is sent to the original exporting driver
123 so that it can identify the type of data to expect.
124 @param Type The type of value for the question.
125 @param Value A pointer to the data being sent to the original exporting driver.
126 @param ActionRequest On return, points to the action requested by the callback function.
127 @param Status Return the handle status.
128
129 @retval TRUE The callback successfully handled the action.
130 @retval FALSE The callback not supported in this handler.
131
132 **/
133 BOOLEAN
134 UiSupportLibCallbackHandler (
135 IN EFI_HII_HANDLE HiiHandle,
136 IN EFI_BROWSER_ACTION Action,
137 IN EFI_QUESTION_ID QuestionId,
138 IN UINT8 Type,
139 IN EFI_IFR_TYPE_VALUE *Value,
140 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest,
141 OUT EFI_STATUS *Status
142 );
143
144 #endif