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