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