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