]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Library/CustomizedDisplayLib.h
MdeModulePkg/S3SmmInitDone.h: Fix copyright coding style error.
[mirror_edk2.git] / MdeModulePkg / Include / Library / CustomizedDisplayLib.h
CommitLineData
7c6c064c
ED
1/** @file\r
2 This library class defines a set of interfaces to customize Display module\r
3\r
d1102dba
LG
4Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials are licensed and made available under\r
6the terms and conditions of the BSD License that accompanies this distribution.\r
7c6c064c 7The full text of the license may be found at\r
d1102dba 8http://opensource.org/licenses/bsd-license.php.\r
7c6c064c 9\r
d1102dba 10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
7c6c064c
ED
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#ifndef __CUSTOMIZED_DISPLAY_LIB_H__\r
16#define __CUSTOMIZED_DISPLAY_LIB_H__\r
17\r
18#include <Protocol/DisplayProtocol.h>\r
19\r
20/**\r
21+------------------------------------------------------------------------------+\r
5a9f73bf 22| Setup Page |\r
7c6c064c
ED
23+------------------------------------------------------------------------------+\r
24\r
25Statement\r
26Statement\r
27Statement\r
28\r
29\r
30\r
31\r
32\r
33+------------------------------------------------------------------------------+\r
5a9f73bf
ED
34| F9=Reset to Defaults F10=Save |\r
35| ^"=Move Highlight <Spacebar> Toggles Checkbox Esc=Exit |\r
7c6c064c
ED
36+------------------------------------------------------------------------------+\r
37 StatusBar\r
38**/\r
39\r
40/**\r
d1102dba
LG
41 This funtion defines Page Frame and Backgroud.\r
42\r
43 Based on the above layout, it will be responsible for HeaderHeight, FooterHeight,\r
44 StatusBarHeight and Backgroud. And, it will reserve Screen for Statement.\r
7c6c064c
ED
45\r
46 @param[in] FormData Form Data to be shown in Page.\r
47 @param[out] ScreenForStatement Screen to be used for Statement. (Prompt, Value and Help)\r
d1102dba 48\r
7c6c064c
ED
49 @return Status\r
50**/\r
51EFI_STATUS\r
52EFIAPI\r
53DisplayPageFrame (\r
54 IN FORM_DISPLAY_ENGINE_FORM *FormData,\r
55 OUT EFI_SCREEN_DESCRIPTOR *ScreenForStatement\r
56 );\r
57\r
58/**\r
59 Clear Screen to the initial state.\r
60**/\r
61VOID\r
d1102dba 62EFIAPI\r
7c6c064c
ED
63ClearDisplayPage (\r
64 VOID\r
65 );\r
66\r
67/**\r
68 This function updates customized key panel's help information.\r
69 The library will prepare those Strings for the basic key, ESC, Enter, Up/Down/Left/Right, +/-.\r
70 and arrange them in Footer panel.\r
d1102dba
LG
71\r
72 @param[in] FormData Form Data to be shown in Page. FormData has the highlighted statement.\r
7c6c064c
ED
73 @param[in] Statement The statement current selected.\r
74 @param[in] Selected Whether or not a tag be selected. TRUE means Enter has hit this question.\r
75**/\r
76VOID\r
77EFIAPI\r
78RefreshKeyHelp (\r
79 IN FORM_DISPLAY_ENGINE_FORM *FormData,\r
80 IN FORM_DISPLAY_ENGINE_STATEMENT *Statement,\r
81 IN BOOLEAN Selected\r
82 );\r
83\r
84/**\r
85 Update status bar.\r
86\r
d1102dba 87 This function updates the status bar on the bottom of menu screen. It just shows StatusBar.\r
7c6c064c
ED
88 Original logic in this function should be splitted out.\r
89\r
d1102dba 90 @param[in] MessageType The type of message to be shown. InputError or Configuration Changed.\r
7c6c064c
ED
91 @param[in] State Show or Clear Message.\r
92**/\r
93VOID\r
94EFIAPI\r
95UpdateStatusBar (\r
96 IN UINTN MessageType,\r
97 IN BOOLEAN State\r
98 );\r
99\r
100/**\r
d1102dba 101 Create popup window.\r
7c6c064c
ED
102\r
103 This function draws OEM/Vendor specific pop up windows.\r
104\r
105 @param[out] Key User Input Key\r
106 @param ... String to be shown in Popup. The variable argument list is terminated by a NULL.\r
d1102dba 107\r
7c6c064c
ED
108**/\r
109VOID\r
110EFIAPI\r
111CreateDialog (\r
112 OUT EFI_INPUT_KEY *Key, OPTIONAL\r
113 ...\r
114 );\r
115\r
116/**\r
d1102dba
LG
117 Confirm how to handle the changed data.\r
118\r
6307a8b6 119 @return Action BROWSER_ACTION_SUBMIT, BROWSER_ACTION_DISCARD or other values.\r
7c6c064c
ED
120**/\r
121UINTN\r
122EFIAPI\r
123ConfirmDataChange (\r
124 VOID\r
125 );\r
126\r
127/**\r
128 OEM specifies whether Setup exits Page by ESC key.\r
129\r
d1102dba 130 This function customized the behavior that whether Setup exits Page so that\r
7c6c064c
ED
131 system able to boot when configuration is not changed.\r
132\r
133 @retval TRUE Exits FrontPage\r
134 @retval FALSE Don't exit FrontPage.\r
135**/\r
136BOOLEAN\r
137EFIAPI\r
138FormExitPolicy (\r
139 VOID\r
140 );\r
141\r
142/**\r
d1102dba
LG
143 Set Timeout value for a ceratain Form to get user response.\r
144\r
7c6c064c 145 This function allows to set timeout value on a ceratain form if necessary.\r
d1102dba
LG
146 If timeout is not zero, the form will exit if user has no response in timeout.\r
147\r
7c6c064c
ED
148 @param[in] FormData Form Data to be shown in Page\r
149\r
d1102dba 150 @return 0 No timeout for this form.\r
7c6c064c
ED
151 @return > 0 Timeout value in 100 ns units.\r
152**/\r
153UINT64\r
154EFIAPI\r
155FormExitTimeout (\r
156 IN FORM_DISPLAY_ENGINE_FORM *FormData\r
157 );\r
158\r
159//\r
160// Print Functions\r
161//\r
162/**\r
163 Prints a unicode string to the default console, at\r
164 the supplied cursor position, using L"%s" format.\r
165\r
166 @param Column The cursor position to print the string at. When it is -1, use current Position.\r
167 @param Row The cursor position to print the string at. When it is -1, use current Position.\r
168 @param String String pointer.\r
169\r
170 @return Length of string printed to the console\r
171\r
172**/\r
173UINTN\r
174EFIAPI\r
175PrintStringAt (\r
176 IN UINTN Column,\r
177 IN UINTN Row,\r
178 IN CHAR16 *String\r
179 );\r
180\r
181\r
182/**\r
183 Prints a unicode string with the specified width to the default console, at\r
184 the supplied cursor position, using L"%s" format.\r
185\r
186 @param Column The cursor position to print the string at. When it is -1, use current Position.\r
187 @param Row The cursor position to print the string at. When it is -1, use current Position.\r
188 @param String String pointer.\r
d1102dba
LG
189 @param Width Width for String to be printed. If the print length of String < Width,\r
190 Space char (L' ') will be used to append String.\r
7c6c064c
ED
191\r
192 @return Length of string printed to the console\r
193\r
194**/\r
195UINTN\r
196EFIAPI\r
197PrintStringAtWithWidth (\r
198 IN UINTN Column,\r
199 IN UINTN Row,\r
200 IN CHAR16 *String,\r
201 IN UINTN Width\r
202 );\r
203\r
204/**\r
86ac8fb2 205 Prints a character to the default console, at\r
7c6c064c
ED
206 the supplied cursor position, using L"%c" format.\r
207\r
208 @param Column The cursor position to print the string at. When it is -1, use current Position.\r
209 @param Row The cursor position to print the string at. When it is -1, use current Position.\r
210 @param Character Character to print.\r
211\r
212 @return Length of string printed to the console.\r
213\r
214**/\r
215UINTN\r
216EFIAPI\r
217PrintCharAt (\r
218 IN UINTN Column,\r
219 IN UINTN Row,\r
220 CHAR16 Character\r
221 );\r
222\r
223/**\r
224 Clear retangle with specified text attribute.\r
225\r
226 @param LeftColumn Left column of retangle.\r
227 @param RightColumn Right column of retangle.\r
228 @param TopRow Start row of retangle.\r
229 @param BottomRow End row of retangle.\r
230 @param TextAttribute The character foreground and background.\r
231\r
232**/\r
233VOID\r
234EFIAPI\r
235ClearLines (\r
236 IN UINTN LeftColumn,\r
237 IN UINTN RightColumn,\r
238 IN UINTN TopRow,\r
239 IN UINTN BottomRow,\r
240 IN UINTN TextAttribute\r
241 );\r
242\r
243//\r
244// Color Setting Functions\r
245//\r
246/**\r
247 Get OEM/Vendor specific popup attribute colors.\r
248\r
249 @retval Byte code color setting for popup color.\r
250**/\r
251UINT8\r
252EFIAPI\r
253GetPopupColor (\r
254 VOID\r
255 );\r
256\r
257/**\r
258 Get OEM/Vendor specific popup attribute colors.\r
259\r
260 @retval Byte code color setting for popup inverse color.\r
261**/\r
262UINT8\r
263EFIAPI\r
264GetPopupInverseColor (\r
265 VOID\r
266 );\r
267\r
268/**\r
269 Get OEM/Vendor specific PickList color attribute.\r
270\r
271 @retval Byte code color setting for pick list color.\r
272**/\r
273UINT8\r
274EFIAPI\r
275GetPickListColor (\r
276 VOID\r
277 );\r
278\r
279/**\r
280 Get OEM/Vendor specific arrow color attribute.\r
281\r
282 @retval Byte code color setting for arrow color.\r
283**/\r
284UINT8\r
285EFIAPI\r
286GetArrowColor (\r
287 VOID\r
288 );\r
289\r
290/**\r
291 Get OEM/Vendor specific info text color attribute.\r
292\r
293 @retval Byte code color setting for info text color.\r
294**/\r
295UINT8\r
296EFIAPI\r
297GetInfoTextColor (\r
298 VOID\r
299 );\r
300\r
301/**\r
302 Get OEM/Vendor specific help text color attribute.\r
303\r
304 @retval Byte code color setting for help text color.\r
305**/\r
306UINT8\r
307EFIAPI\r
308GetHelpTextColor (\r
309 VOID\r
310 );\r
311\r
312/**\r
313 Get OEM/Vendor specific grayed out text color attribute.\r
314\r
315 @retval Byte code color setting for grayed out text color.\r
316**/\r
317UINT8\r
318EFIAPI\r
319GetGrayedTextColor (\r
320 VOID\r
321 );\r
322\r
323/**\r
324 Get OEM/Vendor specific highlighted text color attribute.\r
325\r
326 @retval Byte code color setting for highlight text color.\r
327**/\r
328UINT8\r
329EFIAPI\r
330GetHighlightTextColor (\r
331 VOID\r
332 );\r
333\r
334/**\r
335 Get OEM/Vendor specific field text color attribute.\r
336\r
337 @retval Byte code color setting for field text color.\r
338**/\r
339UINT8\r
340EFIAPI\r
341GetFieldTextColor (\r
342 VOID\r
343 );\r
344\r
345/**\r
346 Get OEM/Vendor specific subtitle text color attribute.\r
347\r
348 @retval Byte code color setting for subtitle text color.\r
349**/\r
350UINT8\r
351EFIAPI\r
352GetSubTitleTextColor (\r
353 VOID\r
354 );\r
355\r
356#endif\r