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