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