]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | This library class defines a set of interfaces to customize Display module\r | |
3 | \r | |
4 | Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials are licensed and made available under \r | |
6 | the terms and conditions of the BSD License that accompanies this distribution. \r | |
7 | The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php. \r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
11 | WITHOUT 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 | |
22 | | Setup Page |\r | |
23 | +------------------------------------------------------------------------------+\r | |
24 | \r | |
25 | Statement\r | |
26 | Statement\r | |
27 | Statement\r | |
28 | \r | |
29 | \r | |
30 | \r | |
31 | \r | |
32 | \r | |
33 | +------------------------------------------------------------------------------+\r | |
34 | | F9=Reset to Defaults F10=Save |\r | |
35 | | ^"=Move Highlight <Spacebar> Toggles Checkbox Esc=Exit |\r | |
36 | +------------------------------------------------------------------------------+\r | |
37 | StatusBar\r | |
38 | **/\r | |
39 | \r | |
40 | /**\r | |
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 | |
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 | |
48 | \r | |
49 | @return Status\r | |
50 | **/\r | |
51 | EFI_STATUS\r | |
52 | EFIAPI\r | |
53 | DisplayPageFrame (\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 | |
61 | VOID\r | |
62 | EFIAPI \r | |
63 | ClearDisplayPage (\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 | |
71 | \r | |
72 | @param[in] FormData Form Data to be shown in Page. FormData has the highlighted statement. \r | |
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 | |
76 | VOID\r | |
77 | EFIAPI\r | |
78 | RefreshKeyHelp (\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 | |
87 | This function updates the status bar on the bottom of menu screen. It just shows StatusBar. \r | |
88 | Original logic in this function should be splitted out.\r | |
89 | \r | |
90 | @param[in] MessageType The type of message to be shown. InputError or Configuration Changed. \r | |
91 | @param[in] State Show or Clear Message.\r | |
92 | **/\r | |
93 | VOID\r | |
94 | EFIAPI\r | |
95 | UpdateStatusBar (\r | |
96 | IN UINTN MessageType,\r | |
97 | IN BOOLEAN State\r | |
98 | );\r | |
99 | \r | |
100 | /**\r | |
101 | Create popup window. \r | |
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 | |
107 | \r | |
108 | **/\r | |
109 | VOID\r | |
110 | EFIAPI\r | |
111 | CreateDialog (\r | |
112 | OUT EFI_INPUT_KEY *Key, OPTIONAL\r | |
113 | ...\r | |
114 | );\r | |
115 | \r | |
116 | /**\r | |
117 | Confirm how to handle the changed data. \r | |
118 | \r | |
119 | @return Action BROWSER_ACTION_SUBMIT, BROWSER_ACTION_DISCARD or other values.\r | |
120 | **/\r | |
121 | UINTN\r | |
122 | EFIAPI\r | |
123 | ConfirmDataChange (\r | |
124 | VOID\r | |
125 | );\r | |
126 | \r | |
127 | /**\r | |
128 | OEM specifies whether Setup exits Page by ESC key.\r | |
129 | \r | |
130 | This function customized the behavior that whether Setup exits Page so that \r | |
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 | |
136 | BOOLEAN\r | |
137 | EFIAPI\r | |
138 | FormExitPolicy (\r | |
139 | VOID\r | |
140 | );\r | |
141 | \r | |
142 | /**\r | |
143 | Set Timeout value for a ceratain Form to get user response. \r | |
144 | \r | |
145 | This function allows to set timeout value on a ceratain form if necessary.\r | |
146 | If timeout is not zero, the form will exit if user has no response in timeout. \r | |
147 | \r | |
148 | @param[in] FormData Form Data to be shown in Page\r | |
149 | \r | |
150 | @return 0 No timeout for this form. \r | |
151 | @return > 0 Timeout value in 100 ns units.\r | |
152 | **/\r | |
153 | UINT64\r | |
154 | EFIAPI\r | |
155 | FormExitTimeout (\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 | |
173 | UINTN\r | |
174 | EFIAPI\r | |
175 | PrintStringAt (\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 | |
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 | |
191 | \r | |
192 | @return Length of string printed to the console\r | |
193 | \r | |
194 | **/\r | |
195 | UINTN\r | |
196 | EFIAPI\r | |
197 | PrintStringAtWithWidth (\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 | |
205 | Prints a chracter to the default console, at\r | |
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 | |
215 | UINTN\r | |
216 | EFIAPI\r | |
217 | PrintCharAt (\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 | |
233 | VOID\r | |
234 | EFIAPI\r | |
235 | ClearLines (\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 | |
251 | UINT8\r | |
252 | EFIAPI\r | |
253 | GetPopupColor (\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 | |
262 | UINT8\r | |
263 | EFIAPI\r | |
264 | GetPopupInverseColor (\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 | |
273 | UINT8\r | |
274 | EFIAPI\r | |
275 | GetPickListColor (\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 | |
284 | UINT8\r | |
285 | EFIAPI\r | |
286 | GetArrowColor (\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 | |
295 | UINT8\r | |
296 | EFIAPI\r | |
297 | GetInfoTextColor (\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 | |
306 | UINT8\r | |
307 | EFIAPI\r | |
308 | GetHelpTextColor (\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 | |
317 | UINT8\r | |
318 | EFIAPI\r | |
319 | GetGrayedTextColor (\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 | |
328 | UINT8\r | |
329 | EFIAPI\r | |
330 | GetHighlightTextColor (\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 | |
339 | UINT8\r | |
340 | EFIAPI\r | |
341 | GetFieldTextColor (\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 | |
350 | UINT8\r | |
351 | EFIAPI\r | |
352 | GetSubTitleTextColor (\r | |
353 | VOID\r | |
354 | );\r | |
355 | \r | |
356 | #endif\r |