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