]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Library/CustomizedDisplayLib.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Include / Library / CustomizedDisplayLib.h
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 Prints a unicode string to the default console, at
158 the supplied cursor position, using L"%s" format.
159
160 @param Column The cursor position to print the string at. When it is -1, use current Position.
161 @param Row The cursor position to print the string at. When it is -1, use current Position.
162 @param String String pointer.
163
164 @return Length of string printed to the console
165
166 **/
167 UINTN
168 EFIAPI
169 PrintStringAt (
170 IN UINTN Column,
171 IN UINTN Row,
172 IN CHAR16 *String
173 );
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 Get OEM/Vendor specific popup attribute colors.
242
243 @retval Byte code color setting for popup color.
244 **/
245 UINT8
246 EFIAPI
247 GetPopupColor (
248 VOID
249 );
250
251 /**
252 Get OEM/Vendor specific popup attribute colors.
253
254 @retval Byte code color setting for popup inverse color.
255 **/
256 UINT8
257 EFIAPI
258 GetPopupInverseColor (
259 VOID
260 );
261
262 /**
263 Get OEM/Vendor specific PickList color attribute.
264
265 @retval Byte code color setting for pick list color.
266 **/
267 UINT8
268 EFIAPI
269 GetPickListColor (
270 VOID
271 );
272
273 /**
274 Get OEM/Vendor specific arrow color attribute.
275
276 @retval Byte code color setting for arrow color.
277 **/
278 UINT8
279 EFIAPI
280 GetArrowColor (
281 VOID
282 );
283
284 /**
285 Get OEM/Vendor specific info text color attribute.
286
287 @retval Byte code color setting for info text color.
288 **/
289 UINT8
290 EFIAPI
291 GetInfoTextColor (
292 VOID
293 );
294
295 /**
296 Get OEM/Vendor specific help text color attribute.
297
298 @retval Byte code color setting for help text color.
299 **/
300 UINT8
301 EFIAPI
302 GetHelpTextColor (
303 VOID
304 );
305
306 /**
307 Get OEM/Vendor specific grayed out text color attribute.
308
309 @retval Byte code color setting for grayed out text color.
310 **/
311 UINT8
312 EFIAPI
313 GetGrayedTextColor (
314 VOID
315 );
316
317 /**
318 Get OEM/Vendor specific highlighted text color attribute.
319
320 @retval Byte code color setting for highlight text color.
321 **/
322 UINT8
323 EFIAPI
324 GetHighlightTextColor (
325 VOID
326 );
327
328 /**
329 Get OEM/Vendor specific field text color attribute.
330
331 @retval Byte code color setting for field text color.
332 **/
333 UINT8
334 EFIAPI
335 GetFieldTextColor (
336 VOID
337 );
338
339 /**
340 Get OEM/Vendor specific subtitle text color attribute.
341
342 @retval Byte code color setting for subtitle text color.
343 **/
344 UINT8
345 EFIAPI
346 GetSubTitleTextColor (
347 VOID
348 );
349
350 #endif