]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/SetupBrowserDxe/Ui.h
1) Clean up the INF and add in comment to describe the surface area of modules
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Ui.h
CommitLineData
7936fb6a 1/** @file\r
2Private structure, MACRO and function definitions for User Interface related functionalities.\r
3\r
8d00a0f1 4Copyright (c) 2004 - 2008, Intel Corporation\r
7936fb6a 5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#ifndef _UI_H_\r
16#define _UI_H_\r
17\r
18#include "Setup.h"\r
19\r
20//\r
21// Globals\r
22//\r
23#define REGULAR_NUMERIC 0\r
24#define TIME_NUMERIC 1\r
25#define DATE_NUMERIC 2\r
26\r
27#define SUBTITLE_INDENT 2\r
28\r
40a06b0c 29\r
30//\r
31// It take 23 characters including the NULL to print a 64 bits number with "[" and "]".\r
32// pow(2, 64) = [18446744073709551616]\r
33//\r
34#define MAX_NUMERIC_INPUT_WIDTH 23\r
35\r
7936fb6a 36typedef enum {\r
37 UiNoOperation,\r
38 UiDefault,\r
39 UiSelect,\r
40 UiUp,\r
41 UiDown,\r
42 UiLeft,\r
43 UiRight,\r
44 UiReset,\r
45 UiSave,\r
46 UiPrevious,\r
47 UiPageUp,\r
48 UiPageDown,\r
49 UiMaxOperation\r
50} UI_SCREEN_OPERATION;\r
51\r
52typedef enum {\r
53 CfInitialization,\r
54 CfCheckSelection,\r
55 CfRepaint,\r
56 CfRefreshHighLight,\r
57 CfUpdateHelpString,\r
58 CfPrepareToReadKey,\r
59 CfReadKey,\r
60 CfScreenOperation,\r
61 CfUiPrevious,\r
62 CfUiSelect,\r
63 CfUiReset,\r
64 CfUiLeft,\r
65 CfUiRight,\r
66 CfUiUp,\r
67 CfUiPageUp,\r
68 CfUiPageDown,\r
69 CfUiDown,\r
70 CfUiSave,\r
71 CfUiDefault,\r
72 CfUiNoOperation,\r
73 CfExit,\r
74 CfMaxControlFlag\r
75} UI_CONTROL_FLAG;\r
76\r
77#define UI_ACTION_NONE 0\r
78#define UI_ACTION_REFRESH_FORM 1\r
79#define UI_ACTION_REFRESH_FORMSET 2\r
80#define UI_ACTION_EXIT 3\r
81\r
82typedef struct {\r
83 EFI_HII_HANDLE Handle;\r
84\r
85 //\r
86 // Target formset/form/Question information\r
87 //\r
88 EFI_GUID FormSetGuid;\r
89 UINT16 FormId;\r
90 UINT16 QuestionId;\r
91\r
92 UINTN TopRow;\r
93 UINTN BottomRow;\r
94 UINTN PromptCol;\r
95 UINTN OptionCol;\r
96 UINTN CurrentRow;\r
97\r
98 //\r
99 // Ation for Browser to taken:\r
100 // UI_ACTION_NONE - navigation inside a form\r
101 // UI_ACTION_REFRESH_FORM - re-evaluate expressions and repaint form\r
102 // UI_ACTION_REFRESH_FORMSET - re-parse formset IFR binary\r
103 //\r
104 UINTN Action;\r
105\r
106 //\r
107 // Current selected fomset/form/Question\r
108 //\r
109 FORM_BROWSER_FORMSET *FormSet;\r
110 FORM_BROWSER_FORM *Form;\r
111 FORM_BROWSER_STATEMENT *Statement;\r
112} UI_MENU_SELECTION;\r
113\r
f3f2e05d 114#define UI_MENU_OPTION_SIGNATURE SIGNATURE_32 ('u', 'i', 'm', 'm')\r
115#define UI_MENU_LIST_SIGNATURE SIGNATURE_32 ('u', 'i', 'm', 'l')\r
7936fb6a 116\r
117typedef struct {\r
118 UINTN Signature;\r
119 LIST_ENTRY Link;\r
120\r
121 EFI_HII_HANDLE Handle;\r
122 FORM_BROWSER_STATEMENT *ThisTag;\r
123 UINT16 EntryNumber;\r
124\r
125 UINTN Row;\r
126 UINTN Col;\r
127 UINTN OptCol;\r
128 CHAR16 *Description;\r
129 UINTN Skip; // Number of lines\r
130\r
131 //\r
132 // Display item sequence for date/time\r
133 // Date: Month/Day/Year\r
134 // Sequence: 0 1 2\r
135 //\r
136 // Time: Hour : Minute : Second\r
137 // Sequence: 0 1 2\r
138 //\r
139 //\r
140 UINTN Sequence;\r
141\r
142 BOOLEAN GrayOut;\r
143 BOOLEAN ReadOnly;\r
144} UI_MENU_OPTION;\r
145\r
146#define MENU_OPTION_FROM_LINK(a) CR (a, UI_MENU_OPTION, Link, UI_MENU_OPTION_SIGNATURE)\r
147\r
148typedef struct {\r
149 UINTN Signature;\r
150 LIST_ENTRY MenuLink;\r
151\r
152 UINT16 FormId;\r
153 UINT16 QuestionId;\r
154} UI_MENU_LIST;\r
155\r
156typedef struct _MENU_REFRESH_ENTRY {\r
157 struct _MENU_REFRESH_ENTRY *Next;\r
158 UI_MENU_OPTION *MenuOption; // Describes the entry needing an update\r
159 UI_MENU_SELECTION *Selection;\r
160 UINTN CurrentColumn;\r
161 UINTN CurrentRow;\r
162 UINTN CurrentAttribute;\r
163} MENU_REFRESH_ENTRY;\r
164\r
165typedef struct {\r
166 UINT16 ScanCode;\r
167 UI_SCREEN_OPERATION ScreenOperation;\r
168} SCAN_CODE_TO_SCREEN_OPERATION;\r
169\r
170typedef struct {\r
171 UI_SCREEN_OPERATION ScreenOperation;\r
172 UI_CONTROL_FLAG ControlFlag;\r
173} SCREEN_OPERATION_T0_CONTROL_FLAG;\r
174\r
175\r
176extern LIST_ENTRY gMenuList;\r
177extern MENU_REFRESH_ENTRY *gMenuRefreshHead;\r
178extern UI_MENU_SELECTION *gCurrentSelection;\r
8d00a0f1 179extern BOOLEAN mHiiPackageListUpdated;\r
7936fb6a 180\r
181//\r
182// Global Functions\r
183//\r
184/**\r
185 Initialize Menu option list.\r
186\r
187**/\r
188VOID\r
189UiInitMenu (\r
190 VOID\r
ed66e1bc 191 );\r
7936fb6a 192\r
193/**\r
194 Initialize Menu option list.\r
195\r
196**/\r
197VOID\r
198UiInitMenuList (\r
199 VOID\r
ed66e1bc 200 );\r
7936fb6a 201\r
202/**\r
203 Remove a Menu in list, and return FormId/QuestionId for previous Menu.\r
204\r
205 @param Selection Menu selection.\r
206\r
207**/\r
208VOID\r
209UiRemoveMenuListEntry (\r
210 OUT UI_MENU_SELECTION *Selection\r
ed66e1bc 211 );\r
7936fb6a 212\r
213/**\r
214 Free Menu option linked list.\r
215\r
216**/\r
217VOID\r
218UiFreeMenuList (\r
219 VOID\r
ed66e1bc 220 );\r
7936fb6a 221\r
222/**\r
223 Add one menu entry to the linked lst\r
224\r
225 @param Selection Menu selection.\r
226\r
227**/\r
228VOID\r
229UiAddMenuListEntry (\r
230 IN UI_MENU_SELECTION *Selection\r
ed66e1bc 231 );\r
7936fb6a 232\r
233/**\r
234 Free Menu option linked list.\r
235\r
236**/\r
237VOID\r
238UiFreeMenu (\r
239 VOID\r
ed66e1bc 240 );\r
7936fb6a 241\r
242/**\r
243 Add one menu option by specified description and context.\r
244\r
245 @param String String description for this option.\r
246 @param Handle Hii handle for the package list.\r
247 @param Statement Statement of this Menu Option.\r
248 @param NumberOfLines Display lines for this Menu Option.\r
249 @param MenuItemCount The index for this Option in the Menu.\r
250\r
251**/\r
252VOID\r
253UiAddMenuOption (\r
254 IN CHAR16 *String,\r
255 IN EFI_HII_HANDLE Handle,\r
256 IN FORM_BROWSER_STATEMENT *Statement,\r
257 IN UINT16 NumberOfLines,\r
258 IN UINT16 MenuItemCount\r
ed66e1bc 259 );\r
7936fb6a 260\r
261/**\r
262 Display menu and wait for user to select one menu option, then return it.\r
263 If AutoBoot is enabled, then if user doesn't select any option,\r
264 after period of time, it will automatically return the first menu option.\r
265\r
266 @param Selection Menu selection.\r
267\r
268 @return Return the pointer of the menu which selected,\r
269 @return otherwise return NULL.\r
270\r
271**/\r
272EFI_STATUS\r
273UiDisplayMenu (\r
274 IN OUT UI_MENU_SELECTION *Selection\r
ed66e1bc 275 );\r
7936fb6a 276\r
277/**\r
278 Free up the resource allocated for all strings required\r
279 by Setup Browser.\r
280\r
281**/\r
282VOID\r
283FreeBrowserStrings (\r
284 VOID\r
ed66e1bc 285 );\r
7936fb6a 286\r
287/**\r
288 The worker function that send the displays to the screen. On output,\r
289 the selection made by user is returned.\r
290\r
291 @param Selection On input, Selection tell setup browser the information\r
292 about the Selection, form and formset to be displayed.\r
293 On output, Selection return the screen item that is selected\r
294 by user.\r
295\r
296 @retval EFI_SUCCESS The page is displayed successfully.\r
297 @return Other value if the page failed to be diplayed.\r
298\r
299**/\r
300EFI_STATUS\r
301SetupBrowser (\r
302 IN OUT UI_MENU_SELECTION *Selection\r
ed66e1bc 303 );\r
7936fb6a 304\r
305/**\r
306 VSPrint worker function that prints a Value as a decimal number in Buffer.\r
307\r
308 @param Buffer Location to place ascii decimal number string of Value.\r
309 @param Flags Flags to use in printing decimal string, see file header for\r
310 details.\r
311 @param Value Decimal value to convert to a string in Buffer.\r
312\r
313 @return Number of characters printed.\r
314\r
315**/\r
316VOID\r
317ValueToString (\r
318 IN CHAR16 *Buffer,\r
319 IN BOOLEAN Flags,\r
320 IN INT64 Value\r
ed66e1bc 321 );\r
7936fb6a 322\r
323/**\r
324 Set Buffer to Value for Size bytes.\r
325\r
326 @param Buffer Memory to set.\r
327 @param Size Number of bytes to set\r
328 @param Value Value of the set operation.\r
329\r
330**/\r
331VOID\r
332SetUnicodeMem (\r
333 IN VOID *Buffer,\r
334 IN UINTN Size,\r
335 IN CHAR16 Value\r
ed66e1bc 336 );\r
7936fb6a 337\r
338/**\r
339 Wait for a given event to fire, or for an optional timeout to expire.\r
340\r
341 @param Event The event to wait for\r
342 @param Timeout An optional timeout value in 100 ns units.\r
343 @param RefreshInterval Menu refresh interval (in seconds).\r
344\r
345 @retval EFI_SUCCESS Event fired before Timeout expired.\r
346 @retval EFI_TIME_OUT Timout expired before Event fired.\r
347\r
348**/\r
349EFI_STATUS\r
350UiWaitForSingleEvent (\r
351 IN EFI_EVENT Event,\r
352 IN UINT64 Timeout, OPTIONAL\r
353 IN UINT8 RefreshInterval OPTIONAL\r
ed66e1bc 354 );\r
7936fb6a 355\r
356/**\r
357 Draw a pop up windows based on the dimension, number of lines and\r
358 strings specified.\r
359\r
7064c0a5 360 @param ScreenWidth The width of the pop-up.\r
7936fb6a 361 @param NumberOfLines The number of lines.\r
7936fb6a 362 @param ... A series of text strings that displayed in the pop-up.\r
363\r
364**/\r
365VOID\r
366CreatePopUp (\r
367 IN UINTN ScreenWidth,\r
368 IN UINTN NumberOfLines,\r
7936fb6a 369 ...\r
ed66e1bc 370 );\r
7936fb6a 371\r
372/**\r
373 Get string or password input from user.\r
374\r
375 @param MenuOption Pointer to the current input menu.\r
376 @param Prompt The prompt string shown on popup window.\r
377 @param StringPtr Destination for use input string.\r
378\r
379 @retval EFI_SUCCESS If string input is read successfully\r
380 @retval EFI_DEVICE_ERROR If operation fails\r
381\r
382**/\r
383EFI_STATUS\r
384ReadString (\r
385 IN UI_MENU_OPTION *MenuOption,\r
386 IN CHAR16 *Prompt,\r
387 OUT CHAR16 *StringPtr\r
ed66e1bc 388 );\r
7936fb6a 389\r
390/**\r
391 Get selection for OneOf and OrderedList (Left/Right will be ignored).\r
392\r
393 @param Selection Pointer to current selection.\r
394 @param MenuOption Pointer to the current input menu.\r
395\r
396 @retval EFI_SUCCESS If Option input is processed successfully\r
397 @retval EFI_DEVICE_ERROR If operation fails\r
398\r
399**/\r
400EFI_STATUS\r
401GetSelectionInputPopUp (\r
402 IN UI_MENU_SELECTION *Selection,\r
403 IN UI_MENU_OPTION *MenuOption\r
ed66e1bc 404 );\r
7936fb6a 405\r
406/**\r
407 This routine reads a numeric value from the user input.\r
408\r
409 @param Selection Pointer to current selection.\r
410 @param MenuOption Pointer to the current input menu.\r
411\r
412 @retval EFI_SUCCESS If numerical input is read successfully\r
413 @retval EFI_DEVICE_ERROR If operation fails\r
414\r
415**/\r
416EFI_STATUS\r
417GetNumericInput (\r
418 IN UI_MENU_SELECTION *Selection,\r
419 IN UI_MENU_OPTION *MenuOption\r
ed66e1bc 420 );\r
7936fb6a 421\r
422/**\r
423 Update status bar on the bottom of menu.\r
424\r
425 @param MessageType The type of message to be shown.\r
426 @param Flags The flags in Question header.\r
427 @param State Set or clear.\r
428\r
429**/\r
430VOID\r
431UpdateStatusBar (\r
432 IN UINTN MessageType,\r
433 IN UINT8 Flags,\r
434 IN BOOLEAN State\r
ed66e1bc 435 );\r
7936fb6a 436\r
437/**\r
438 Process Question Config.\r
439\r
440 @param Selection The UI menu selection.\r
441 @param Question The Question to be peocessed.\r
442\r
443 @retval EFI_SUCCESS Question Config process success.\r
444 @retval Other Question Config process fail.\r
445\r
446**/\r
447EFI_STATUS\r
448ProcessQuestionConfig (\r
449 IN UI_MENU_SELECTION *Selection,\r
450 IN FORM_BROWSER_STATEMENT *Question\r
ed66e1bc 451 );\r
7936fb6a 452\r
453/**\r
454 Print Question Value according to it's storage width and display attributes.\r
455\r
456 @param Question The Question to be printed.\r
457 @param FormattedNumber Buffer for output string.\r
458 @param BufferSize The FormattedNumber buffer size in bytes.\r
459\r
460 @retval EFI_SUCCESS Print success.\r
461 @retval EFI_BUFFER_TOO_SMALL Buffer size is not enough for formatted number.\r
462\r
463**/\r
464EFI_STATUS\r
465PrintFormattedNumber (\r
466 IN FORM_BROWSER_STATEMENT *Question,\r
467 IN OUT CHAR16 *FormattedNumber,\r
468 IN UINTN BufferSize\r
ed66e1bc 469 );\r
7936fb6a 470\r
471/**\r
472 Search an Option of a Question by its value.\r
473\r
474 @param Question The Question\r
475 @param OptionValue Value for Option to be searched.\r
476\r
477 @retval Pointer Pointer to the found Option.\r
478 @retval NULL Option not found.\r
479\r
480**/\r
481QUESTION_OPTION *\r
482ValueToOption (\r
483 IN FORM_BROWSER_STATEMENT *Question,\r
484 IN EFI_HII_VALUE *OptionValue\r
ed66e1bc 485 );\r
7936fb6a 486\r
487/**\r
488 Process a Question's Option (whether selected or un-selected).\r
489\r
490 @param Selection Pointer to UI_MENU_SELECTION.\r
491 @param MenuOption The MenuOption for this Question.\r
492 @param Selected TRUE: if Question is selected.\r
493 @param OptionString Pointer of the Option String to be displayed.\r
494\r
495 @retval EFI_SUCCESS Question Option process success.\r
496 @retval Other Question Option process fail.\r
497\r
498**/\r
499EFI_STATUS\r
500ProcessOptions (\r
501 IN UI_MENU_SELECTION *Selection,\r
502 IN UI_MENU_OPTION *MenuOption,\r
503 IN BOOLEAN Selected,\r
504 OUT CHAR16 **OptionString\r
ed66e1bc 505 );\r
7936fb6a 506\r
507/**\r
508 Process the help string: Split StringPtr to several lines of strings stored in\r
509 FormattedString and the glyph width of each line cannot exceed gHelpBlockWidth.\r
510\r
511 @param StringPtr The entire help string.\r
512 @param FormattedString The oupput formatted string.\r
513 @param RowCount TRUE: if Question is selected.\r
514\r
515**/\r
516VOID\r
517ProcessHelpString (\r
518 IN CHAR16 *StringPtr,\r
519 OUT CHAR16 **FormattedString,\r
520 IN UINTN RowCount\r
ed66e1bc 521 );\r
7936fb6a 522\r
523/**\r
524 Update key's help imformation.\r
525\r
526 @param MenuOption The Menu option\r
527 @param Selected Whether or not a tag be selected\r
528\r
529**/\r
530VOID\r
531UpdateKeyHelp (\r
532 IN UI_MENU_OPTION *MenuOption,\r
533 IN BOOLEAN Selected\r
ed66e1bc 534 );\r
7936fb6a 535\r
536/**\r
537 Clear retangle with specified text attribute.\r
538\r
539 @param LeftColumn Left column of retangle.\r
540 @param RightColumn Right column of retangle.\r
541 @param TopRow Start row of retangle.\r
542 @param BottomRow End row of retangle.\r
543 @param TextAttribute The character foreground and background.\r
544\r
545**/\r
546VOID\r
547ClearLines (\r
548 UINTN LeftColumn,\r
549 UINTN RightColumn,\r
550 UINTN TopRow,\r
551 UINTN BottomRow,\r
552 UINTN TextAttribute\r
ed66e1bc 553 );\r
7936fb6a 554\r
555/**\r
556 Count the storage space of a Unicode string.\r
557\r
558 This function handles the Unicode string with NARROW_CHAR\r
559 and WIDE_CHAR control characters. NARROW_HCAR and WIDE_CHAR\r
560 does not count in the resultant output. If a WIDE_CHAR is \r
561 hit, then 2 Unicode character will consume an output storage\r
562 space with size of CHAR16 till a NARROW_CHAR is hit.\r
563\r
564 @param String The input string to be counted.\r
565\r
566 @return Storage space for the input string.\r
567\r
568**/\r
569UINTN\r
570GetStringWidth (\r
571 CHAR16 *String\r
ed66e1bc 572 );\r
7936fb6a 573\r
574/**\r
575 Will copy LineWidth amount of a string in the OutputString buffer and return the\r
576 number of CHAR16 characters that were copied into the OutputString buffer.\r
577\r
578 @param InputString String description for this option.\r
579 @param LineWidth Width of the desired string to extract in CHAR16\r
580 characters\r
581 @param Index Where in InputString to start the copy process\r
582 @param OutputString Buffer to copy the string into\r
583\r
584 @return Returns the number of CHAR16 characters that were copied into the OutputString buffer.\r
585\r
586**/\r
587UINT16\r
588GetLineByWidth (\r
589 IN CHAR16 *InputString,\r
590 IN UINT16 LineWidth,\r
591 IN OUT UINTN *Index,\r
592 OUT CHAR16 **OutputString\r
ed66e1bc 593 );\r
7936fb6a 594\r
595/**\r
596 Get the supported width for a particular op-code\r
597\r
598 @param Statement The FORM_BROWSER_STATEMENT structure passed in.\r
599 @param Handle The handle in the HII database being used\r
600\r
601 @return Returns the number of CHAR16 characters that is support.\r
602\r
603**/\r
604UINT16\r
605GetWidth (\r
606 IN FORM_BROWSER_STATEMENT *Statement,\r
607 IN EFI_HII_HANDLE Handle\r
ed66e1bc 608 );\r
7936fb6a 609\r
610/**\r
611 Concatenate a narrow string to another string.\r
612\r
613 @param Destination The destination string.\r
614 @param Source The source string. The string to be concatenated.\r
615 to the end of Destination.\r
616\r
617**/\r
618VOID\r
619NewStrCat (\r
620 CHAR16 *Destination,\r
621 CHAR16 *Source\r
ed66e1bc 622 );\r
7936fb6a 623\r
624/**\r
625 Wait for a key to be pressed by user.\r
626\r
627 @param Key The key which is pressed by user.\r
628\r
629 @retval EFI_SUCCESS The function always completed successfully.\r
630\r
631**/\r
632EFI_STATUS\r
633WaitForKeyStroke (\r
634 OUT EFI_INPUT_KEY *Key\r
ed66e1bc 635 );\r
7936fb6a 636\r
637/**\r
638 Reset stack pointer to begin of the stack.\r
639\r
640**/\r
641VOID\r
642ResetScopeStack (\r
643 VOID\r
ed66e1bc 644 );\r
7936fb6a 645\r
646/**\r
647 Push an Operand onto the Stack\r
648\r
649 @param Operand Operand to push.\r
650\r
651 @retval EFI_SUCCESS The value was pushed onto the stack.\r
652 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the\r
653 stack.\r
654\r
655**/\r
656EFI_STATUS\r
657PushScope (\r
658 IN UINT8 Operand\r
ed66e1bc 659 );\r
7936fb6a 660\r
661/**\r
662 Pop an Operand from the Stack\r
663\r
664 @param Operand Operand to pop.\r
665\r
666 @retval EFI_SUCCESS The value was pushed onto the stack.\r
667 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the\r
668 stack.\r
669\r
670**/\r
671EFI_STATUS\r
672PopScope (\r
673 OUT UINT8 *Operand\r
ed66e1bc 674 );\r
7936fb6a 675\r
676/**\r
677 Get Form given its FormId.\r
678\r
679 @param FormSet The formset which contains this form.\r
680 @param FormId Id of this form.\r
681\r
682 @retval Pointer The form.\r
683 @retval NULL Specified Form is not found in the formset.\r
684\r
685**/\r
686FORM_BROWSER_FORM *\r
687IdToForm (\r
688 IN FORM_BROWSER_FORMSET *FormSet,\r
689 IN UINT16 FormId\r
ed66e1bc 690 );\r
7936fb6a 691\r
692/**\r
693 Search a Question in Formset scope using its QuestionId.\r
694\r
695 @param FormSet The formset which contains this form.\r
696 @param Form The form which contains this Question.\r
697 @param QuestionId Id of this Question.\r
698\r
699 @retval Pointer The Question.\r
700 @retval NULL Specified Question not found in the form.\r
701\r
702**/\r
703FORM_BROWSER_STATEMENT *\r
704IdToQuestion (\r
705 IN FORM_BROWSER_FORMSET *FormSet,\r
706 IN FORM_BROWSER_FORM *Form,\r
707 IN UINT16 QuestionId\r
ed66e1bc 708 );\r
7936fb6a 709\r
710/**\r
711 Zero extend integer/boolean/date/time to UINT64 for comparing.\r
712\r
713 @param Value HII Value to be converted.\r
714\r
715**/\r
716VOID\r
717ExtendValueToU64 (\r
718 IN EFI_HII_VALUE *Value\r
ed66e1bc 719 );\r
7936fb6a 720\r
721/**\r
722 Compare two Hii value.\r
723\r
724 @param Value1 Expression value to compare on left-hand.\r
725 @param Value2 Expression value to compare on right-hand.\r
726 @param HiiHandle Only required for string compare.\r
727\r
728 @retval EFI_INVALID_PARAMETER Could not perform comparation on two values.\r
729 @retval 0 Two operators equeal.\r
730 @return Positive value if Value1 is greater than Value2.\r
731 @retval Negative value if Value1 is less than Value2.\r
732\r
733**/\r
734INTN\r
735CompareHiiValue (\r
736 IN EFI_HII_VALUE *Value1,\r
737 IN EFI_HII_VALUE *Value2,\r
738 IN EFI_HII_HANDLE HiiHandle OPTIONAL\r
ed66e1bc 739 );\r
7936fb6a 740\r
741/**\r
742 Evaluate the result of a HII expression\r
743\r
3018ca2d 744 If Expression is NULL, then ASSERT.\r
745\r
7936fb6a 746 @param FormSet FormSet associated with this expression.\r
747 @param Form Form associated with this expression.\r
748 @param Expression Expression to be evaluated.\r
749\r
750 @retval EFI_SUCCESS The expression evaluated successfuly\r
751 @retval EFI_NOT_FOUND The Question which referenced by a QuestionId\r
752 could not be found.\r
753 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the\r
754 stack.\r
755 @retval EFI_ACCESS_DENIED The pop operation underflowed the stack\r
756 @retval EFI_INVALID_PARAMETER Syntax error with the Expression\r
757\r
758**/\r
759EFI_STATUS\r
760EvaluateExpression (\r
761 IN FORM_BROWSER_FORMSET *FormSet,\r
762 IN FORM_BROWSER_FORM *Form,\r
763 IN OUT FORM_EXPRESSION *Expression\r
ed66e1bc 764 );\r
7936fb6a 765\r
766#endif // _UI_H\r