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