]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdeModulePkg / Universal / DisplayEngineDxe / FormDisplay.h
CommitLineData
7c6c064c
ED
1/** @file\r
2 FormDiplay protocol to show Form\r
3\r
d1102dba 4Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
9d510e61 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
7c6c064c
ED
6\r
7**/\r
8\r
9#ifndef __FORM_DISPLAY_H__\r
10#define __FORM_DISPLAY_H__\r
11\r
7c6c064c
ED
12#include <Library/UefiBootServicesTableLib.h>\r
13#include <Library/DebugLib.h>\r
14#include <Library/BaseMemoryLib.h>\r
15#include <Library/BaseLib.h>\r
16#include <Library/HiiLib.h>\r
17#include <Library/MemoryAllocationLib.h>\r
18#include <Library/PrintLib.h>\r
19#include <Library/CustomizedDisplayLib.h>\r
20\r
21#include <Protocol/FormBrowserEx2.h>\r
22#include <Protocol/SimpleTextIn.h>\r
23#include <Protocol/DisplayProtocol.h>\r
06aad9a2 24#include <Protocol/HiiPopup.h>\r
7c6c064c
ED
25\r
26#include <Guid/MdeModuleHii.h>\r
27\r
28//\r
29// This is the generated header file which includes whatever needs to be exported (strings + IFR)\r
30//\r
1436aea4
MK
31extern UINT8 DisplayEngineStrings[];\r
32extern EFI_SCREEN_DESCRIPTOR gStatementDimensions;\r
33extern USER_INPUT *gUserInput;\r
34extern FORM_DISPLAY_ENGINE_FORM *gFormData;\r
35extern EFI_HII_HANDLE gHiiHandle;\r
36extern UINT16 gDirection;\r
37extern LIST_ENTRY gMenuOption;\r
38extern CHAR16 *gConfirmOptYes;\r
39extern CHAR16 *gConfirmOptNo;\r
40extern CHAR16 *gConfirmOptOk;\r
41extern CHAR16 *gConfirmOptCancel;\r
42extern CHAR16 *gYesOption;\r
43extern CHAR16 *gNoOption;\r
44extern CHAR16 *gOkOption;\r
45extern CHAR16 *gCancelOption;\r
46extern CHAR16 *gErrorPopup;\r
47extern CHAR16 *gWarningPopup;\r
48extern CHAR16 *gInfoPopup;\r
7c6c064c
ED
49\r
50//\r
51// Browser Global Strings\r
52//\r
1436aea4
MK
53extern CHAR16 *gSaveFailed;\r
54extern CHAR16 *gPromptForData;\r
55extern CHAR16 *gPromptForPassword;\r
56extern CHAR16 *gPromptForNewPassword;\r
57extern CHAR16 *gConfirmPassword;\r
58extern CHAR16 *gConfirmError;\r
59extern CHAR16 *gPassowordInvalid;\r
60extern CHAR16 *gPressEnter;\r
61extern CHAR16 *gEmptyString;\r
62extern CHAR16 *gMiniString;\r
63extern CHAR16 *gOptionMismatch;\r
64extern CHAR16 *gFormSuppress;\r
65extern CHAR16 *gProtocolNotFound;\r
66extern CHAR16 *gPasswordUnsupported;\r
67\r
68extern CHAR16 gPromptBlockWidth;\r
69extern CHAR16 gOptionBlockWidth;\r
70extern CHAR16 gHelpBlockWidth;\r
71extern CHAR16 *mUnknownString;\r
72extern BOOLEAN gMisMatch;\r
7c6c064c
ED
73\r
74//\r
75// Screen definitions\r
76//\r
77\r
1436aea4
MK
78#define LEFT_SKIPPED_COLUMNS 3\r
79#define SCROLL_ARROW_HEIGHT 1\r
80#define POPUP_PAD_SPACE_COUNT 5\r
81#define POPUP_FRAME_WIDTH 2\r
7c6c064c 82\r
1436aea4 83#define UPPER_LOWER_CASE_OFFSET 0x20\r
4d4deaac 84\r
7c6c064c
ED
85//\r
86// Display definitions\r
87//\r
1436aea4
MK
88#define LEFT_ONEOF_DELIMITER L'<'\r
89#define RIGHT_ONEOF_DELIMITER L'>'\r
7c6c064c 90\r
1436aea4
MK
91#define LEFT_NUMERIC_DELIMITER L'['\r
92#define RIGHT_NUMERIC_DELIMITER L']'\r
7c6c064c
ED
93\r
94#define LEFT_CHECKBOX_DELIMITER L'['\r
95#define RIGHT_CHECKBOX_DELIMITER L']'\r
96\r
1436aea4
MK
97#define CHECK_ON L'X'\r
98#define CHECK_OFF L' '\r
7c6c064c 99\r
1436aea4
MK
100#define TIME_SEPARATOR L':'\r
101#define DATE_SEPARATOR L'/'\r
7c6c064c
ED
102\r
103#define SUBTITLE_INDENT 2\r
104\r
105//\r
106// This is the Input Error Message\r
107//\r
1436aea4 108#define INPUT_ERROR 1\r
7c6c064c
ED
109\r
110//\r
111// This is the NV RAM update required Message\r
112//\r
113#define NV_UPDATE_REQUIRED 2\r
114//\r
115// Time definitions\r
116//\r
117#define ONE_SECOND 10000000\r
118\r
119//\r
120// It take 23 characters including the NULL to print a 64 bits number with "[" and "]".\r
121// pow(2, 64) = [18446744073709551616]\r
aee257db 122// with extra '-' flat, set the width to 24.\r
7c6c064c 123//\r
1436aea4 124#define MAX_NUMERIC_INPUT_WIDTH 24\r
7c6c064c 125\r
1436aea4
MK
126#define EFI_HII_EXPRESSION_INCONSISTENT_IF 0\r
127#define EFI_HII_EXPRESSION_NO_SUBMIT_IF 1\r
128#define EFI_HII_EXPRESSION_GRAY_OUT_IF 2\r
129#define EFI_HII_EXPRESSION_SUPPRESS_IF 3\r
130#define EFI_HII_EXPRESSION_DISABLE_IF 4\r
7c6c064c
ED
131\r
132//\r
133// Character definitions\r
134//\r
1436aea4 135#define CHAR_SPACE 0x0020\r
7c6c064c 136\r
1436aea4 137#define FORM_DISPLAY_DRIVER_SIGNATURE SIGNATURE_32 ('F', 'D', 'D', 'V')\r
7c6c064c 138typedef struct {\r
1436aea4 139 UINT32 Signature;\r
7c6c064c 140\r
1436aea4 141 EFI_HANDLE Handle;\r
7c6c064c
ED
142\r
143 //\r
144 // Produced protocol\r
145 //\r
1436aea4
MK
146 EDKII_FORM_DISPLAY_ENGINE_PROTOCOL FromDisplayProt;\r
147 EFI_HII_POPUP_PROTOCOL HiiPopup;\r
7c6c064c
ED
148} FORM_DISPLAY_DRIVER_PRIVATE_DATA;\r
149\r
7c6c064c
ED
150typedef enum {\r
151 UiNoOperation,\r
152 UiSelect,\r
153 UiUp,\r
154 UiDown,\r
155 UiLeft,\r
156 UiRight,\r
157 UiReset,\r
158 UiPrevious,\r
159 UiPageUp,\r
160 UiPageDown,\r
161 UiHotKey,\r
162 UiMaxOperation\r
163} UI_SCREEN_OPERATION;\r
164\r
165typedef enum {\r
166 CfInitialization,\r
167 CfCheckSelection,\r
168 CfRepaint,\r
169 CfRefreshHighLight,\r
170 CfUpdateHelpString,\r
171 CfPrepareToReadKey,\r
172 CfReadKey,\r
173 CfScreenOperation,\r
174 CfUiSelect,\r
175 CfUiReset,\r
176 CfUiLeft,\r
177 CfUiRight,\r
178 CfUiUp,\r
179 CfUiPageUp,\r
180 CfUiPageDown,\r
181 CfUiDown,\r
7c6c064c
ED
182 CfUiNoOperation,\r
183 CfExit,\r
184 CfUiHotKey,\r
185 CfMaxControlFlag\r
186} UI_CONTROL_FLAG;\r
187\r
188typedef enum {\r
189 UIEventNone,\r
190 UIEventKey,\r
191 UIEventTimeOut,\r
192 UIEventDriver\r
193} UI_EVENT_TYPE;\r
194\r
195typedef struct {\r
1436aea4
MK
196 UINT16 ScanCode;\r
197 UI_SCREEN_OPERATION ScreenOperation;\r
7c6c064c
ED
198} SCAN_CODE_TO_SCREEN_OPERATION;\r
199\r
200typedef struct {\r
1436aea4
MK
201 UI_SCREEN_OPERATION ScreenOperation;\r
202 UI_CONTROL_FLAG ControlFlag;\r
7c6c064c
ED
203} SCREEN_OPERATION_T0_CONTROL_FLAG;\r
204\r
205typedef struct {\r
1436aea4
MK
206 EFI_HII_HANDLE HiiHandle;\r
207 UINT16 FormId;\r
d1102dba 208\r
42645c3d
ED
209 //\r
210 // Info for the highlight question.\r
211 // HLT means highlight\r
212 //\r
213 // If one statement has questionid, save questionid info to find the question.\r
d1102dba 214 // If one statement not has questionid info, save the opcode info to find the\r
42645c3d 215 // statement. If more than one statement has same opcode in one form(just like\r
d1102dba 216 // empty subtitle info may has more than one info one form), also use Index\r
42645c3d
ED
217 // info to find the statement.\r
218 //\r
1436aea4
MK
219 EFI_QUESTION_ID HLTQuestionId;\r
220 EFI_IFR_OP_HEADER *HLTOpCode;\r
221 UINTN HLTIndex;\r
222 UINTN HLTSequence;\r
d1102dba 223\r
42645c3d
ED
224 //\r
225 // Info for the top of screen question.\r
226 // TOS means Top Of Screen\r
227 //\r
1436aea4
MK
228 EFI_QUESTION_ID TOSQuestionId;\r
229 EFI_IFR_OP_HEADER *TOSOpCode;\r
230 UINTN TOSIndex;\r
42645c3d 231\r
1436aea4 232 UINT16 SkipValue;\r
7c6c064c
ED
233} DISPLAY_HIGHLIGHT_MENU_INFO;\r
234\r
bfae1330 235typedef struct {\r
1436aea4
MK
236 EFI_EVENT SyncEvent;\r
237 UINT8 *TimeOut;\r
238 CHAR16 *ErrorInfo;\r
bfae1330
ED
239} WARNING_IF_CONTEXT;\r
240\r
7c6c064c
ED
241#define UI_MENU_OPTION_SIGNATURE SIGNATURE_32 ('u', 'i', 'm', 'm')\r
242\r
243typedef struct {\r
1436aea4
MK
244 UINTN Signature;\r
245 LIST_ENTRY Link;\r
7c6c064c 246\r
1436aea4
MK
247 EFI_HII_HANDLE Handle;\r
248 FORM_DISPLAY_ENGINE_STATEMENT *ThisTag;\r
249 UINT16 EntryNumber;\r
7c6c064c 250\r
1436aea4
MK
251 UINTN Row;\r
252 UINTN Col;\r
253 UINTN OptCol;\r
254 CHAR16 *Description;\r
255 UINTN Skip; // Number of lines\r
7c6c064c
ED
256\r
257 //\r
258 // Display item sequence for date/time\r
259 // Date: Month/Day/Year\r
260 // Sequence: 0 1 2\r
261 //\r
262 // Time: Hour : Minute : Second\r
263 // Sequence: 0 1 2\r
264 //\r
265 //\r
1436aea4 266 UINTN Sequence;\r
7c6c064c 267\r
1436aea4
MK
268 BOOLEAN GrayOut;\r
269 BOOLEAN ReadOnly;\r
7c6c064c
ED
270\r
271 //\r
272 // Whether user could change value of this item\r
273 //\r
1436aea4
MK
274 BOOLEAN IsQuestion;\r
275 BOOLEAN NestInStatement;\r
7c6c064c
ED
276} UI_MENU_OPTION;\r
277\r
278#define MENU_OPTION_FROM_LINK(a) CR (a, UI_MENU_OPTION, Link, UI_MENU_OPTION_SIGNATURE)\r
279\r
1436aea4
MK
280#define USER_SELECTABLE_OPTION_OK_WIDTH StrLen (gOkOption)\r
281#define USER_SELECTABLE_OPTION_OK_CAL_WIDTH (StrLen (gOkOption) + StrLen (gCancelOption))\r
282#define USER_SELECTABLE_OPTION_YES_NO_WIDTH (StrLen (gYesOption) + StrLen (gNoOption))\r
283#define USER_SELECTABLE_OPTION_YES_NO_CAL_WIDTH (StrLen (gYesOption) + StrLen (gNoOption) + StrLen (gCancelOption))\r
06aad9a2
DB
284\r
285#define USER_SELECTABLE_OPTION_SKIP_WIDTH 2\r
286\r
287//\r
288// +-------------------------------------------+ // POPUP_BORDER }\r
289// | ERROR/WARNING/INFO | // POPUP_STYLE_STRING_HEIGHT } POPUP_HEADER_HEIGHT\r
290// |-------------------------------------------| // POPUP_EMPTY_LINE_HEIGHT }\r
291// | popup messages |\r
292// | | // POPUP_EMPTY_LINE_HEIGHT }\r
293// | user selectable options | // POPUP_USER_SELECTABLE_OPTION_HEIGHT } POPUP_FOOTER_HEIGHT\r
294// +-------------------------------------------+ // POPUP_BORDER }\r
295//\r
1436aea4
MK
296#define POPUP_BORDER 1\r
297#define POPUP_EMPTY_LINE_HEIGHT 1\r
298#define POPUP_STYLE_STRING_HEIGHT 1\r
06aad9a2
DB
299#define POPUP_USER_SELECTABLE_OPTION_HEIGHT 1\r
300\r
301#define POPUP_HEADER_HEIGHT (POPUP_BORDER + POPUP_STYLE_STRING_HEIGHT + POPUP_EMPTY_LINE_HEIGHT)\r
302#define POPUP_FOOTER_HEIGHT (POPUP_EMPTY_LINE_HEIGHT + POPUP_USER_SELECTABLE_OPTION_HEIGHT + POPUP_BORDER)\r
303\r
304#define USER_SELECTABLE_OPTION_SIGNATURE SIGNATURE_32 ('u', 's', 's', 'o')\r
305\r
306typedef struct {\r
1436aea4
MK
307 UINTN Signature;\r
308 LIST_ENTRY Link;\r
309 EFI_HII_POPUP_SELECTION OptionType;\r
310 CHAR16 *OptionString;\r
06aad9a2
DB
311 //\r
312 // Display item sequence for user select options\r
313 // Ok: Ok\r
314 // Sequence: 0\r
315 //\r
316 // Ok/Cancel: Ok : Cancel\r
317 // Sequence: 0 1\r
318 //\r
319 // Yes/No: Yes : No\r
320 // Sequence: 0 1\r
321 //\r
322 // Yes/No/Cancel: Yes : No: Cancel\r
323 // Sequence: 0 1 2\r
324 //\r
1436aea4
MK
325 UINTN Sequence;\r
326 UINTN OptionRow;\r
327 UINTN OptionCol;\r
328 UINTN MaxSequence;\r
329 UINTN MinSequence;\r
06aad9a2
DB
330} USER_SELECTABLE_OPTION;\r
331\r
332#define SELECTABLE_OPTION_FROM_LINK(a) CR (a, USER_SELECTABLE_OPTION, Link, USER_SELECTABLE_OPTION_SIGNATURE)\r
333\r
7c6c064c
ED
334/**\r
335 Print Question Value according to it's storage width and display attributes.\r
336\r
337 @param Question The Question to be printed.\r
338 @param FormattedNumber Buffer for output string.\r
339 @param BufferSize The FormattedNumber buffer size in bytes.\r
340\r
341 @retval EFI_SUCCESS Print success.\r
342 @retval EFI_BUFFER_TOO_SMALL Buffer size is not enough for formatted number.\r
343\r
344**/\r
345EFI_STATUS\r
346PrintFormattedNumber (\r
1436aea4
MK
347 IN FORM_DISPLAY_ENGINE_STATEMENT *Question,\r
348 IN OUT CHAR16 *FormattedNumber,\r
349 IN UINTN BufferSize\r
7c6c064c
ED
350 );\r
351\r
352/**\r
353 Set value of a data element in an Array by its Index.\r
354\r
355 @param Array The data array.\r
356 @param Type Type of the data in this array.\r
357 @param Index Zero based index for data in this array.\r
358 @param Value The value to be set.\r
359\r
360**/\r
361VOID\r
362SetArrayData (\r
1436aea4
MK
363 IN VOID *Array,\r
364 IN UINT8 Type,\r
365 IN UINTN Index,\r
366 IN UINT64 Value\r
7c6c064c
ED
367 );\r
368\r
369/**\r
370 Return data element in an Array by its Index.\r
371\r
372 @param Array The data array.\r
373 @param Type Type of the data in this array.\r
374 @param Index Zero based index for data in this array.\r
375\r
376 @retval Value The data to be returned\r
377\r
378**/\r
379UINT64\r
380GetArrayData (\r
1436aea4
MK
381 IN VOID *Array,\r
382 IN UINT8 Type,\r
383 IN UINTN Index\r
7c6c064c 384 );\r
d1102dba 385\r
7c6c064c
ED
386/**\r
387 Search an Option of a Question by its value.\r
388\r
389 @param Question The Question\r
390 @param OptionValue Value for Option to be searched.\r
391\r
392 @retval Pointer Pointer to the found Option.\r
393 @retval NULL Option not found.\r
394\r
395**/\r
396DISPLAY_QUESTION_OPTION *\r
397ValueToOption (\r
1436aea4
MK
398 IN FORM_DISPLAY_ENGINE_STATEMENT *Question,\r
399 IN EFI_HII_VALUE *OptionValue\r
7c6c064c
ED
400 );\r
401\r
402/**\r
403 Compare two Hii value.\r
404\r
405 @param Value1 Expression value to compare on left-hand.\r
406 @param Value2 Expression value to compare on right-hand.\r
407 @param Result Return value after compare.\r
408 retval 0 Two operators equal.\r
409 return Positive value if Value1 is greater than Value2.\r
410 retval Negative value if Value1 is less than Value2.\r
411 @param HiiHandle Only required for string compare.\r
412\r
413 @retval other Could not perform compare on two values.\r
414 @retval EFI_SUCCESS Compare the value success.\r
415\r
416**/\r
417EFI_STATUS\r
418CompareHiiValue (\r
419 IN EFI_HII_VALUE *Value1,\r
420 IN EFI_HII_VALUE *Value2,\r
421 OUT INTN *Result,\r
422 IN EFI_HII_HANDLE HiiHandle OPTIONAL\r
423 );\r
424\r
425/**\r
426 Draw a pop up windows based on the dimension, number of lines and\r
427 strings specified.\r
428\r
429 @param RequestedWidth The width of the pop-up.\r
430 @param NumberOfLines The number of lines.\r
431 @param ... A series of text strings that displayed in the pop-up.\r
432\r
433**/\r
434VOID\r
435EFIAPI\r
436CreateMultiStringPopUp (\r
1436aea4
MK
437 IN UINTN RequestedWidth,\r
438 IN UINTN NumberOfLines,\r
7c6c064c
ED
439 ...\r
440 );\r
441\r
442/**\r
443 Will copy LineWidth amount of a string in the OutputString buffer and return the\r
444 number of CHAR16 characters that were copied into the OutputString buffer.\r
445 The output string format is:\r
446 Glyph Info + String info + '\0'.\r
447\r
448 In the code, it deals \r,\n,\r\n same as \n\r, also it not process the \r or \g.\r
449\r
450 @param InputString String description for this option.\r
451 @param LineWidth Width of the desired string to extract in CHAR16\r
452 characters\r
453 @param GlyphWidth The glyph width of the begin of the char in the string.\r
454 @param Index Where in InputString to start the copy process\r
455 @param OutputString Buffer to copy the string into\r
456\r
d1102dba 457 @return Returns the number of CHAR16 characters that were copied into the OutputString\r
7c6c064c
ED
458 buffer, include extra glyph info and '\0' info.\r
459\r
460**/\r
461UINT16\r
462GetLineByWidth (\r
1436aea4
MK
463 IN CHAR16 *InputString,\r
464 IN UINT16 LineWidth,\r
465 IN OUT UINT16 *GlyphWidth,\r
466 IN OUT UINTN *Index,\r
467 OUT CHAR16 **OutputString\r
7c6c064c
ED
468 );\r
469\r
7c6c064c
ED
470/**\r
471 Get the string based on the StringId and HII Package List Handle.\r
472\r
473 @param Token The String's ID.\r
474 @param HiiHandle The Hii handle for this string package.\r
475\r
476 @return The output string.\r
477\r
478**/\r
479CHAR16 *\r
480GetToken (\r
1436aea4
MK
481 IN EFI_STRING_ID Token,\r
482 IN EFI_HII_HANDLE HiiHandle\r
7c6c064c 483 );\r
d1102dba 484\r
7c6c064c
ED
485/**\r
486 Count the storage space of a Unicode string.\r
487\r
488 This function handles the Unicode string with NARROW_CHAR\r
489 and WIDE_CHAR control characters. NARROW_HCAR and WIDE_CHAR\r
490 does not count in the resultant output. If a WIDE_CHAR is\r
491 hit, then 2 Unicode character will consume an output storage\r
492 space with size of CHAR16 till a NARROW_CHAR is hit.\r
493\r
494 If String is NULL, then ASSERT ().\r
495\r
496 @param String The input string to be counted.\r
497\r
498 @return Storage space for the input string.\r
499\r
500**/\r
501UINTN\r
502GetStringWidth (\r
1436aea4 503 IN CHAR16 *String\r
7c6c064c
ED
504 );\r
505\r
506/**\r
507 This routine reads a numeric value from the user input.\r
508\r
509 @param MenuOption Pointer to the current input menu.\r
510\r
511 @retval EFI_SUCCESS If numerical input is read successfully\r
512 @retval EFI_DEVICE_ERROR If operation fails\r
513\r
514**/\r
515EFI_STATUS\r
516GetNumericInput (\r
1436aea4 517 IN UI_MENU_OPTION *MenuOption\r
7c6c064c
ED
518 );\r
519\r
520/**\r
521 Get string or password input from user.\r
522\r
523 @param MenuOption Pointer to the current input menu.\r
524 @param Prompt The prompt string shown on popup window.\r
525 @param StringPtr Old user input and destination for use input string.\r
526\r
527 @retval EFI_SUCCESS If string input is read successfully\r
528 @retval EFI_DEVICE_ERROR If operation fails\r
529\r
530**/\r
531EFI_STATUS\r
532ReadString (\r
1436aea4
MK
533 IN UI_MENU_OPTION *MenuOption,\r
534 IN CHAR16 *Prompt,\r
535 IN OUT CHAR16 *StringPtr\r
7c6c064c
ED
536 );\r
537\r
538/**\r
539 Draw a pop up windows based on the dimension, number of lines and\r
540 strings specified.\r
541\r
542 @param RequestedWidth The width of the pop-up.\r
543 @param NumberOfLines The number of lines.\r
544 @param Marker The variable argument list for the list of string to be printed.\r
545\r
546**/\r
547VOID\r
548CreateSharedPopUp (\r
1436aea4
MK
549 IN UINTN RequestedWidth,\r
550 IN UINTN NumberOfLines,\r
551 IN VA_LIST Marker\r
7c6c064c 552 );\r
d1102dba 553\r
7c6c064c
ED
554/**\r
555 Wait for a key to be pressed by user.\r
556\r
557 @param Key The key which is pressed by user.\r
558\r
559 @retval EFI_SUCCESS The function always completed successfully.\r
560\r
561**/\r
562EFI_STATUS\r
563WaitForKeyStroke (\r
1436aea4 564 OUT EFI_INPUT_KEY *Key\r
7c6c064c
ED
565 );\r
566\r
567/**\r
568 Get selection for OneOf and OrderedList (Left/Right will be ignored).\r
569\r
570 @param MenuOption Pointer to the current input menu.\r
571\r
572 @retval EFI_SUCCESS If Option input is processed successfully\r
573 @retval EFI_DEVICE_ERROR If operation fails\r
574\r
575**/\r
576EFI_STATUS\r
577GetSelectionInputPopUp (\r
1436aea4 578 IN UI_MENU_OPTION *MenuOption\r
7c6c064c
ED
579 );\r
580\r
581/**\r
582 Process the help string: Split StringPtr to several lines of strings stored in\r
583 FormattedString and the glyph width of each line cannot exceed gHelpBlockWidth.\r
584\r
585 @param StringPtr The entire help string.\r
586 @param FormattedString The oupput formatted string.\r
587 @param EachLineWidth The max string length of each line in the formatted string.\r
588 @param RowCount TRUE: if Question is selected.\r
589\r
590**/\r
591UINTN\r
592ProcessHelpString (\r
593 IN CHAR16 *StringPtr,\r
594 OUT CHAR16 **FormattedString,\r
595 OUT UINT16 *EachLineWidth,\r
596 IN UINTN RowCount\r
597 );\r
598\r
599/**\r
600 Process a Question's Option (whether selected or un-selected).\r
601\r
602 @param MenuOption The MenuOption for this Question.\r
603 @param Selected TRUE: if Question is selected.\r
604 @param OptionString Pointer of the Option String to be displayed.\r
605 @param SkipErrorValue Whether need to return when value without option for it.\r
606\r
607 @retval EFI_SUCCESS Question Option process success.\r
608 @retval Other Question Option process fail.\r
609\r
610**/\r
611EFI_STATUS\r
612ProcessOptions (\r
1436aea4
MK
613 IN UI_MENU_OPTION *MenuOption,\r
614 IN BOOLEAN Selected,\r
615 OUT CHAR16 **OptionString,\r
616 IN BOOLEAN SkipErrorValue\r
7c6c064c
ED
617 );\r
618\r
619/**\r
620 Set Buffer to Value for Size bytes.\r
621\r
622 @param Buffer Memory to set.\r
623 @param Size Number of bytes to set\r
624 @param Value Value of the set operation.\r
625\r
626**/\r
627VOID\r
628SetUnicodeMem (\r
1436aea4
MK
629 IN VOID *Buffer,\r
630 IN UINTN Size,\r
631 IN CHAR16 Value\r
7c6c064c
ED
632 );\r
633\r
634/**\r
635 Display one form, and return user input.\r
d1102dba 636\r
7c6c064c
ED
637 @param FormData Form Data to be shown.\r
638 @param UserInputData User input data.\r
d1102dba 639\r
7c6c064c
ED
640 @retval EFI_SUCCESS Form Data is shown, and user input is got.\r
641**/\r
642EFI_STATUS\r
d1102dba 643EFIAPI\r
7c6c064c
ED
644FormDisplay (\r
645 IN FORM_DISPLAY_ENGINE_FORM *FormData,\r
646 OUT USER_INPUT *UserInputData\r
647 );\r
648\r
5a9f73bf
ED
649/**\r
650 Clear Screen to the initial state.\r
651**/\r
652VOID\r
d1102dba 653EFIAPI\r
5a9f73bf
ED
654DriverClearDisplayPage (\r
655 VOID\r
656 );\r
657\r
7c6c064c
ED
658/**\r
659 Exit Display and Clear Screen to the original state.\r
660\r
661**/\r
662VOID\r
d1102dba 663EFIAPI\r
7c6c064c
ED
664ExitDisplay (\r
665 VOID\r
666 );\r
667\r
668/**\r
bfae1330 669 Process nothing.\r
7c6c064c 670\r
bfae1330
ED
671 @param Event The Event need to be process\r
672 @param Context The context of the event.\r
7c6c064c 673\r
bfae1330
ED
674**/\r
675VOID\r
676EFIAPI\r
677EmptyEventProcess (\r
1436aea4
MK
678 IN EFI_EVENT Event,\r
679 IN VOID *Context\r
bfae1330
ED
680 );\r
681\r
682/**\r
683 Process for the refresh interval statement.\r
684\r
685 @param Event The Event need to be process\r
686 @param Context The context of the event.\r
7c6c064c
ED
687\r
688**/\r
bfae1330
ED
689VOID\r
690EFIAPI\r
691RefreshTimeOutProcess (\r
1436aea4
MK
692 IN EFI_EVENT Event,\r
693 IN VOID *Context\r
7c6c064c
ED
694 );\r
695\r
ab2cf8ea
ED
696/**\r
697 Record the highlight menu and top of screen menu info.\r
698\r
699 @param Highlight The menu opton which is highlight.\r
700 @param TopOfScreen The menu opton which is at the top of the form.\r
701 @param SkipValue The skip line info for the top of screen menu.\r
702\r
703**/\r
704VOID\r
705UpdateHighlightMenuInfo (\r
1436aea4
MK
706 IN LIST_ENTRY *Highlight,\r
707 IN LIST_ENTRY *TopOfScreen,\r
708 IN UINTN SkipValue\r
ab2cf8ea
ED
709 );\r
710\r
06aad9a2
DB
711/**\r
712 Displays a popup window.\r
713\r
714 @param This A pointer to the EFI_HII_POPUP_PROTOCOL instance.\r
715 @param PopupStyle Popup style to use.\r
716 @param PopupType Type of the popup to display.\r
717 @param HiiHandle HII handle of the string pack containing Message\r
718 @param Message A message to display in the popup box.\r
719 @param UserSelection User selection.\r
720\r
721 @retval EFI_SUCCESS The popup box was successfully displayed.\r
722 @retval EFI_INVALID_PARAMETER HiiHandle and Message do not define a valid HII string.\r
723 @retval EFI_INVALID_PARAMETER PopupType is not one of the values defined by this specification.\r
724 @retval EFI_OUT_OF_RESOURCES There are not enough resources available to display the popup box.\r
725\r
726**/\r
727EFI_STATUS\r
728EFIAPI\r
729CreatePopup (\r
1436aea4
MK
730 IN EFI_HII_POPUP_PROTOCOL *This,\r
731 IN EFI_HII_POPUP_STYLE PopupStyle,\r
732 IN EFI_HII_POPUP_TYPE PopupType,\r
733 IN EFI_HII_HANDLE HiiHandle,\r
734 IN EFI_STRING_ID Message,\r
735 OUT EFI_HII_POPUP_SELECTION *UserSelection OPTIONAL\r
06aad9a2
DB
736 );\r
737\r
7c6c064c 738#endif\r