]>
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 | |
48 | IN FORM_DISPLAY_ENGINE_FORM *FormData,\r | |
49 | OUT EFI_SCREEN_DESCRIPTOR *ScreenForStatement\r | |
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 | |
73 | IN FORM_DISPLAY_ENGINE_FORM *FormData,\r | |
74 | IN FORM_DISPLAY_ENGINE_STATEMENT *Statement,\r | |
75 | IN BOOLEAN Selected\r | |
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 | |
90 | IN UINTN MessageType,\r | |
91 | IN BOOLEAN State\r | |
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 | |
106 | OUT EFI_INPUT_KEY *Key, OPTIONAL\r | |
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 | |
150 | IN FORM_DISPLAY_ENGINE_FORM *FormData\r | |
151 | );\r | |
152 | \r | |
153 | //\r | |
154 | // Print Functions\r | |
155 | //\r | |
156 | /**\r | |
157 | Prints a unicode string to the default console, at\r | |
158 | the supplied cursor position, using L"%s" format.\r | |
159 | \r | |
160 | @param Column The cursor position to print the string at. When it is -1, use current Position.\r | |
161 | @param Row The cursor position to print the string at. When it is -1, use current Position.\r | |
162 | @param String String pointer.\r | |
163 | \r | |
164 | @return Length of string printed to the console\r | |
165 | \r | |
166 | **/\r | |
167 | UINTN\r | |
168 | EFIAPI\r | |
169 | PrintStringAt (\r | |
170 | IN UINTN Column,\r | |
171 | IN UINTN Row,\r | |
172 | IN CHAR16 *String\r | |
173 | );\r | |
174 | \r | |
175 | \r | |
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 | |
192 | IN UINTN Column,\r | |
193 | IN UINTN Row,\r | |
194 | IN CHAR16 *String,\r | |
195 | IN UINTN Width\r | |
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 | |
212 | IN UINTN Column,\r | |
213 | IN UINTN Row,\r | |
214 | CHAR16 Character\r | |
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 | |
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 | |
235 | );\r | |
236 | \r | |
237 | //\r | |
238 | // Color Setting Functions\r | |
239 | //\r | |
240 | /**\r | |
241 | Get OEM/Vendor specific popup attribute colors.\r | |
242 | \r | |
243 | @retval Byte code color setting for popup color.\r | |
244 | **/\r | |
245 | UINT8\r | |
246 | EFIAPI\r | |
247 | GetPopupColor (\r | |
248 | VOID\r | |
249 | );\r | |
250 | \r | |
251 | /**\r | |
252 | Get OEM/Vendor specific popup attribute colors.\r | |
253 | \r | |
254 | @retval Byte code color setting for popup inverse color.\r | |
255 | **/\r | |
256 | UINT8\r | |
257 | EFIAPI\r | |
258 | GetPopupInverseColor (\r | |
259 | VOID\r | |
260 | );\r | |
261 | \r | |
262 | /**\r | |
263 | Get OEM/Vendor specific PickList color attribute.\r | |
264 | \r | |
265 | @retval Byte code color setting for pick list color.\r | |
266 | **/\r | |
267 | UINT8\r | |
268 | EFIAPI\r | |
269 | GetPickListColor (\r | |
270 | VOID\r | |
271 | );\r | |
272 | \r | |
273 | /**\r | |
274 | Get OEM/Vendor specific arrow color attribute.\r | |
275 | \r | |
276 | @retval Byte code color setting for arrow color.\r | |
277 | **/\r | |
278 | UINT8\r | |
279 | EFIAPI\r | |
280 | GetArrowColor (\r | |
281 | VOID\r | |
282 | );\r | |
283 | \r | |
284 | /**\r | |
285 | Get OEM/Vendor specific info text color attribute.\r | |
286 | \r | |
287 | @retval Byte code color setting for info text color.\r | |
288 | **/\r | |
289 | UINT8\r | |
290 | EFIAPI\r | |
291 | GetInfoTextColor (\r | |
292 | VOID\r | |
293 | );\r | |
294 | \r | |
295 | /**\r | |
296 | Get OEM/Vendor specific help text color attribute.\r | |
297 | \r | |
298 | @retval Byte code color setting for help text color.\r | |
299 | **/\r | |
300 | UINT8\r | |
301 | EFIAPI\r | |
302 | GetHelpTextColor (\r | |
303 | VOID\r | |
304 | );\r | |
305 | \r | |
306 | /**\r | |
307 | Get OEM/Vendor specific grayed out text color attribute.\r | |
308 | \r | |
309 | @retval Byte code color setting for grayed out text color.\r | |
310 | **/\r | |
311 | UINT8\r | |
312 | EFIAPI\r | |
313 | GetGrayedTextColor (\r | |
314 | VOID\r | |
315 | );\r | |
316 | \r | |
317 | /**\r | |
318 | Get OEM/Vendor specific highlighted text color attribute.\r | |
319 | \r | |
320 | @retval Byte code color setting for highlight text color.\r | |
321 | **/\r | |
322 | UINT8\r | |
323 | EFIAPI\r | |
324 | GetHighlightTextColor (\r | |
325 | VOID\r | |
326 | );\r | |
327 | \r | |
328 | /**\r | |
329 | Get OEM/Vendor specific field text color attribute.\r | |
330 | \r | |
331 | @retval Byte code color setting for field text color.\r | |
332 | **/\r | |
333 | UINT8\r | |
334 | EFIAPI\r | |
335 | GetFieldTextColor (\r | |
336 | VOID\r | |
337 | );\r | |
338 | \r | |
339 | /**\r | |
340 | Get OEM/Vendor specific subtitle text color attribute.\r | |
341 | \r | |
342 | @retval Byte code color setting for subtitle text color.\r | |
343 | **/\r | |
344 | UINT8\r | |
345 | EFIAPI\r | |
346 | GetSubTitleTextColor (\r | |
347 | VOID\r | |
348 | );\r | |
349 | \r | |
350 | #endif\r |