92 0xE38C1029, 0xE38F, 0x45b9, { 0x8F, 0x0D, 0xE2, 0xE6, 0x0B, 0xC9, 0xB2, 0x62 }
97BOOLEAN mStatementLayoutIsChanged =
TRUE;
104BOOLEAN mIsFirstForm =
TRUE;
110CHAR16 *gReconnectConfirmChanges;
111CHAR16 *gReconnectFail;
112CHAR16 *gReconnectRequired;
114CHAR16 *gFormNotFound;
116CHAR16 *gBrowserError;
118CHAR16 *gNoSubmitIfFailed;
120CHAR16 *gSaveNoSubmitProcess;
121CHAR16 *gDiscardChange;
122CHAR16 *gJumpToFormSet;
124CHAR16 *gPromptForData;
125CHAR16 *gPromptForPassword;
126CHAR16 *gPromptForNewPassword;
127CHAR16 *gConfirmPassword;
128CHAR16 *gConfirmError;
129CHAR16 *gPassowordInvalid;
133CHAR16 *gOptionMismatch;
134CHAR16 *gFormSuppress;
135CHAR16 *gProtocolNotFound;
136CHAR16 *gConfirmDefaultMsg;
137CHAR16 *gConfirmSubmitMsg;
138CHAR16 *gConfirmDiscardMsg;
139CHAR16 *gConfirmResetMsg;
140CHAR16 *gConfirmExitMsg;
141CHAR16 *gConfirmSubmitMsg2nd;
142CHAR16 *gConfirmDefaultMsg2nd;
143CHAR16 *gConfirmResetMsg2nd;
144CHAR16 *gConfirmExitMsg2nd;
146CHAR16 *gConfirmOptYes;
147CHAR16 *gConfirmOptNo;
148CHAR16 *gConfirmOptOk;
149CHAR16 *gConfirmOptCancel;
153CHAR16 *gCancelOption;
155CHAR16 *gWarningPopup;
157CHAR16 *gConfirmMsgConnect;
158CHAR16 *gConfirmMsgEnd;
159CHAR16 *gPasswordUnsupported;
160CHAR16 gModalSkipColumn;
161CHAR16 gPromptBlockWidth;
162CHAR16 gOptionBlockWidth;
163CHAR16 gHelpBlockWidth;
164CHAR16 *mUnknownString;
167 FORM_DISPLAY_DRIVER_SIGNATURE,
175 EFI_HII_POPUP_PROTOCOL_REVISION,
192 IN EFI_STRING_ID Token,
199 if (String ==
NULL) {
201 ASSERT (String !=
NULL);
204 return (CHAR16 *)String;
286 FreePool (gReconnectConfirmChanges);
353 return Header->Prompt;
368 OUT UINT16 *AdjustWidth
377 Statement = MenuOption->ThisTag;
382 if ((gFormData->Attribute & HII_DISPLAY_MODAL) != 0) {
383 if (AdjustWidth !=
NULL) {
384 *AdjustWidth = LEFT_SKIPPED_COLUMNS;
387 return (UINT16)(gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn - 2 * (gModalSkipColumn + LEFT_SKIPPED_COLUMNS));
395 if (Statement->OpCode->OpCode == EFI_IFR_TEXT_OP) {
397 if (TextOp->TextTwo != 0) {
398 String =
GetToken (TextOp->TextTwo, gFormData->HiiHandle);
404 if ((Statement->OpCode->OpCode == EFI_IFR_SUBTITLE_OP) ||
405 (Statement->OpCode->OpCode == EFI_IFR_REF_OP) ||
406 (Statement->OpCode->OpCode == EFI_IFR_PASSWORD_OP) ||
407 (Statement->OpCode->OpCode == EFI_IFR_ACTION_OP) ||
408 (Statement->OpCode->OpCode == EFI_IFR_RESET_BUTTON_OP) ||
412 ((Statement->OpCode->OpCode == EFI_IFR_TEXT_OP) && (Size == 0))
418 if (AdjustWidth !=
NULL) {
425 ReturnWidth = (UINT16)(gPromptBlockWidth + gOptionBlockWidth - 2);
427 if (AdjustWidth !=
NULL) {
431 ReturnWidth = (UINT16)(gPromptBlockWidth - 1);
437 if (MenuOption->NestInStatement) {
438 ReturnWidth -= SUBTITLE_INDENT;
465 IN CHAR16 *InputString,
467 IN OUT UINT16 *GlyphWidth,
469 OUT CHAR16 **OutputString
474 UINT16 OriginalGlyphWidth;
476 UINT16 LastSpaceOffset;
477 UINT16 LastGlyphWidth;
479 if ((InputString ==
NULL) || (Index ==
NULL) || (OutputString ==
NULL)) {
483 if ((LineWidth == 0) || (*GlyphWidth == 0)) {
490 OriginalGlyphWidth = *GlyphWidth;
491 LastGlyphWidth = OriginalGlyphWidth;
499 if ((InputString[*Index] == NARROW_CHAR) && (InputString[*Index + 1] == CHAR_CARRIAGE_RETURN)) {
506 for (StrOffset = 0, GlyphOffset = 0; GlyphOffset <= LineWidth; StrOffset++) {
507 switch (InputString[*Index + StrOffset]) {
516 case CHAR_CARRIAGE_RETURN:
523 GlyphOffset = GlyphOffset + *GlyphWidth;
528 if ((InputString[*Index + StrOffset] == CHAR_SPACE) && (GlyphOffset <= LineWidth)) {
529 LastSpaceOffset = StrOffset;
530 LastGlyphWidth = *GlyphWidth;
544 if (GlyphOffset > LineWidth) {
548 if (LastSpaceOffset != 0) {
549 StrOffset = LastSpaceOffset;
550 *GlyphWidth = LastGlyphWidth;
562 if ((StrOffset == 0) && (InputString[*Index + StrOffset] == CHAR_NULL)) {
570 if (*OutputString ==
NULL) {
577 if (OriginalGlyphWidth == 1) {
578 *(*OutputString) = NARROW_CHAR;
580 *(*OutputString) = WIDE_CHAR;
583 CopyMem ((*OutputString) + 1, &InputString[*Index], StrOffset *
sizeof (CHAR16));
585 if (InputString[*Index + StrOffset] == CHAR_SPACE) {
589 *Index = (UINT16)(*Index + StrOffset + 1);
590 }
else if (InputString[*Index + StrOffset] == CHAR_LINEFEED) {
594 if (InputString[*Index + StrOffset + 1] == CHAR_CARRIAGE_RETURN) {
595 *Index = (UINT16)(*Index + StrOffset + 2);
597 *Index = (UINT16)(*Index + StrOffset + 1);
599 }
else if (InputString[*Index + StrOffset] == CHAR_CARRIAGE_RETURN) {
603 if (InputString[*Index + StrOffset + 1] == CHAR_LINEFEED) {
604 *Index = (UINT16)(*Index + StrOffset + 2);
606 *Index = (UINT16)(*Index + StrOffset + 1);
609 *Index = (UINT16)(*Index + StrOffset);
615 return StrOffset + 2;
629 IN UINT16 *MenuItemCount,
636 UINT16 NumberOfLines;
640 CHAR16 *OutputString;
641 EFI_STRING_ID PromptId;
649 PromptId =
GetPrompt (Statement->OpCode);
650 ASSERT (PromptId != 0);
652 if ((Statement->OpCode->OpCode == EFI_IFR_DATE_OP) || (Statement->OpCode->OpCode == EFI_IFR_TIME_OP)) {
656 for (Index = 0; Index < Count; Index++) {
660 MenuOption->Signature = UI_MENU_OPTION_SIGNATURE;
661 MenuOption->Description =
GetToken (PromptId, gFormData->HiiHandle);
662 MenuOption->Handle = gFormData->HiiHandle;
663 MenuOption->ThisTag = Statement;
664 MenuOption->NestInStatement = NestIn;
665 MenuOption->EntryNumber = *MenuItemCount;
667 MenuOption->Sequence = Index;
669 if ((Statement->Attribute & HII_DISPLAY_GRAYOUT) != 0) {
670 MenuOption->GrayOut =
TRUE;
672 MenuOption->GrayOut =
FALSE;
675 if (((Statement->Attribute & HII_DISPLAY_LOCK) != 0) || ((gFormData->Attribute & HII_DISPLAY_LOCK) != 0)) {
676 MenuOption->GrayOut =
TRUE;
682 if (((gFormData->Attribute & HII_DISPLAY_LOCK) != 0) || ((Statement->Attribute & HII_DISPLAY_LOCK) != 0)) {
683 MenuOption->GrayOut =
TRUE;
686 switch (Statement->OpCode->OpCode) {
687 case EFI_IFR_ORDERED_LIST_OP:
688 case EFI_IFR_ONE_OF_OP:
689 case EFI_IFR_NUMERIC_OP:
690 case EFI_IFR_TIME_OP:
691 case EFI_IFR_DATE_OP:
692 case EFI_IFR_CHECKBOX_OP:
693 case EFI_IFR_PASSWORD_OP:
694 case EFI_IFR_STRING_OP:
698 MenuOption->IsQuestion =
TRUE;
700 case EFI_IFR_TEXT_OP:
706 MenuOption->GrayOut =
TRUE;
711 MenuOption->IsQuestion =
FALSE;
715 if ((Statement->Attribute & HII_DISPLAY_READONLY) != 0) {
716 MenuOption->ReadOnly =
TRUE;
718 MenuOption->GrayOut =
TRUE;
723 (Statement->OpCode->OpCode != EFI_IFR_DATE_OP) &&
724 (Statement->OpCode->OpCode != EFI_IFR_TIME_OP))
727 for ( ;
GetLineByWidth (MenuOption->Description, Width, &GlyphWidth, &ArrayEntry, &OutputString) != 0x0000;) {
731 if (
StrLen (&MenuOption->Description[ArrayEntry]) != 0) {
750 MenuOption->Skip = 1;
752 MenuOption->Skip = NumberOfLines;
770 UINT16 MenuItemCount;
780 while (!
IsNull (&gFormData->StatementListHead, Link)) {
781 Statement = FORM_DISPLAY_ENGINE_STATEMENT_FROM_LINK (Link);
782 Link =
GetNextNode (&gFormData->StatementListHead, Link);
787 if (Statement->OpCode->OpCode == EFI_IFR_GUID_OP) {
796 NestLink =
GetFirstNode (&Statement->NestStatementList);
797 while (!
IsNull (&Statement->NestStatementList, NestLink)) {
798 NestStatement = FORM_DISPLAY_ENGINE_STATEMENT_FROM_LINK (NestLink);
799 NestLink =
GetNextNode (&Statement->NestStatementList, NestLink);
804 if (NestStatement->OpCode->OpCode == EFI_IFR_GUID_OP) {
836 UINTN IncrementValue;
838 ASSERT (String !=
NULL);
839 if (String ==
NULL) {
852 (String[Index] != NARROW_CHAR) && (String[Index] != WIDE_CHAR) && (String[Index] != 0);
853 Index++, Count = Count + IncrementValue
861 if (String[Index] == 0) {
869 if (String[Index] == NARROW_CHAR) {
882 }
while (String[Index] != 0);
889 return Count *
sizeof (CHAR16);
902 IN CHAR16 *OptionString
908 CHAR16 *OutputString;
911 Width = (UINT16)gOptionBlockWidth - 1;
915 for (Index = 0;
GetLineByWidth (OptionString, Width, &GlyphWidth, &Index, &OutputString) != 0x0000;) {
916 if (
StrLen (&OptionString[Index]) != 0) {
923 if ((Row > MenuOption->Skip) &&
924 (MenuOption->ThisTag->OpCode->OpCode != EFI_IFR_DATE_OP) &&
925 (MenuOption->ThisTag->OpCode->OpCode != EFI_IFR_TIME_OP))
927 MenuOption->Skip = Row;
942 CHAR16 *OptionString;
947 if (OptionString !=
NULL) {
953 if ((MenuOption->ThisTag->OpCode->OpCode == EFI_IFR_TEXT_OP) && (((
EFI_IFR_TEXT *)MenuOption->ThisTag->OpCode)->TextTwo != 0)) {
954 OptionString =
GetToken (((
EFI_IFR_TEXT *)MenuOption->ThisTag->OpCode)->TextTwo, gFormData->HiiHandle);
956 if (OptionString !=
NULL) {
983 EFI_STRING OptionString;
987 if (MenuOption->Description[0] !=
'\0') {
992 if (EFI_ERROR (Status)) {
996 if ((OptionString !=
NULL) && (OptionString[0] !=
'\0')) {
1001 if ((MenuOption->ThisTag->OpCode->OpCode == EFI_IFR_TEXT_OP) && (((
EFI_IFR_TEXT *)MenuOption->ThisTag->OpCode)->TextTwo != 0)) {
1002 OptionString =
GetToken (((
EFI_IFR_TEXT *)MenuOption->ThisTag->OpCode)->TextTwo, gFormData->HiiHandle);
1003 ASSERT (OptionString !=
NULL);
1004 if (OptionString[0] !=
'\0') {
1029 if ((MenuOption->ThisTag->OpCode->OpCode == EFI_IFR_SUBTITLE_OP) ||
1030 MenuOption->GrayOut || MenuOption->ReadOnly || !
PrintableMenu (MenuOption))
1063 IN BOOLEAN FindInForm
1072 Pos = *CurrentPosition;
1074 if (Pos == &gMenuOption) {
1078 PreMenuOption = MENU_OPTION_FROM_LINK (Pos);
1081 NextMenuOption = MENU_OPTION_FROM_LINK (Pos);
1086 if (NextMenuOption->Row == 0) {
1094 if ((
UINTN)Distance + NextMenuOption->Skip > GapToTop) {
1096 NextMenuOption = PreMenuOption;
1109 Distance += NextMenuOption->Skip;
1114 if ((GoUp ? Pos->BackLink : Pos->ForwardLink) == &gMenuOption) {
1119 Pos = (GoUp ? Pos->BackLink : Pos->ForwardLink);
1120 PreMenuOption = NextMenuOption;
1123 *CurrentPosition = &NextMenuOption->Link;
1138 CHAR16 *OptionString,
1148 ASSERT (MenuOption !=
NULL && OptionString !=
NULL);
1150 Statement = MenuOption->ThisTag;
1153 if (Statement->OpCode->OpCode == EFI_IFR_DATE_OP) {
1155 }
else if (Statement->OpCode->OpCode == EFI_IFR_TIME_OP) {
1162 for (Index = 0; OptionString[Index] == L
' '; Index++) {
1167 MenuOption->OptCol++;
1171 for (Count = 0; OptionString[Index] != CHAR_NULL; Index++) {
1172 OptionString[Count] = OptionString[Index];
1176 OptionString[Count] = CHAR_NULL;
1181 if (Statement->OpCode->OpCode == EFI_IFR_DATE_OP) {
1187 if ((Date->Flags & EFI_QF_DATE_MONTH_SUPPRESS) && (MenuOption->Sequence == 0)) {
1193 }
else if ((Date->Flags & EFI_QF_DATE_DAY_SUPPRESS) && (MenuOption->Sequence == 1)) {
1199 }
else if ((Date->Flags & EFI_QF_DATE_YEAR_SUPPRESS) && (MenuOption->Sequence == 2)) {
1206 }
else if (Statement->OpCode->OpCode == EFI_IFR_TIME_OP) {
1212 if ((Time->Flags & QF_TIME_HOUR_SUPPRESS) && (MenuOption->Sequence == 0)) {
1218 }
else if ((Time->Flags & QF_TIME_MINUTE_SUPPRESS) && (MenuOption->Sequence == 1)) {
1224 }
else if ((Time->Flags & QF_TIME_SECOND_SUPPRESS) && (MenuOption->Sequence == 2)) {
1253 IN BOOLEAN DirectionUp,
1260 UINTN PadLineNumber;
1263 NewPosition = *CurrentPosition;
1264 MenuOption = MENU_OPTION_FROM_LINK (NewPosition);
1266 if ((MenuOption->ThisTag->OpCode->OpCode == EFI_IFR_DATE_OP) ||
1267 (MenuOption->ThisTag->OpCode->OpCode == EFI_IFR_TIME_OP))
1273 while (MenuOption->Skip == 0) {
1275 NewPosition = NewPosition->ForwardLink;
1276 MenuOption = MENU_OPTION_FROM_LINK (NewPosition);
1280 NewPosition = *CurrentPosition;
1288 while (Count++ < 2) {
1289 NewPosition = NewPosition->BackLink;
1298 while (Count-- > 0) {
1299 NewPosition = NewPosition->ForwardLink;
1303 *CurrentPosition = NewPosition;
1306 return PadLineNumber;
1326 switch (NumericOp->Flags & EFI_IFR_NUMERIC_SIZE) {
1327 case EFI_IFR_NUMERIC_SIZE_1:
1328 Step = NumericOp->data.u8.Step;
1331 case EFI_IFR_NUMERIC_SIZE_2:
1332 Step = NumericOp->data.u16.Step;
1335 case EFI_IFR_NUMERIC_SIZE_4:
1336 Step = NumericOp->data.u32.Step;
1339 case EFI_IFR_NUMERIC_SIZE_8:
1340 Step = NumericOp->data.u64.Step;
1368 while (!
IsNull (&gFormData->HotKeyListHead, Link)) {
1369 HotKey = BROWSER_HOT_KEY_FROM_LINK (Link);
1371 if (HotKey->KeyData->ScanCode == KeyData->ScanCode) {
1375 Link =
GetNextNode (&gFormData->HotKeyListHead, Link);
1395 IN BOOLEAN Direction,
1401 Temp = Direction ? CurrentPos->BackLink : CurrentPos->ForwardLink;
1403 if (Temp == &gMenuOption) {
1429 UI_EVENT_TYPE EventType;
1435 Status =
gBS->CreateEvent (EVT_TIMER, 0,
NULL,
NULL, &TimerEvent);
1447 WaitList[0] = Event;
1449 if (gFormData->FormRefreshEvent !=
NULL) {
1450 WaitList[EventNum] = gFormData->FormRefreshEvent;
1455 WaitList[EventNum] = TimerEvent;
1459 Status =
gBS->WaitForEvent (EventNum, WaitList, &Index);
1464 EventType = UIEventKey;
1468 if (gFormData->FormRefreshEvent !=
NULL) {
1469 EventType = UIEventDriver;
1471 ASSERT (Timeout != 0 && EventNum == 2);
1472 EventType = UIEventTimeOut;
1478 ASSERT (Index == 2 && EventNum == 3);
1479 EventType = UIEventTimeOut;
1484 gBS->CloseEvent (TimerEvent);
1511 return QuestionHeader->QuestionId;
1536 PreviousMenuOption =
NULL;
1538 while (Link->BackLink != &gMenuOption) {
1539 Link = Link->BackLink;
1540 PreviousMenuOption = MENU_OPTION_FROM_LINK (Link);
1541 if (PreviousMenuOption->Row == 0) {
1545 if (Rows <= PreviousMenuOption->Skip) {
1549 Rows = Rows - PreviousMenuOption->Skip;
1552 if (Link->BackLink == &gMenuOption) {
1553 TopOfScreen = gMenuOption.ForwardLink;
1554 if ((PreviousMenuOption !=
NULL) && (Rows < PreviousMenuOption->Skip)) {
1555 *SkipValue = PreviousMenuOption->Skip - Rows;
1561 *SkipValue = PreviousMenuOption->Skip - Rows;
1584 NewPos = gMenuOption.ForwardLink;
1587 for (NewPos = gMenuOption.ForwardLink; NewPos != &gMenuOption; NewPos = NewPos->ForwardLink) {
1588 MenuOption = MENU_OPTION_FROM_LINK (NewPos);
1590 if (
CompareMem (MenuOption->ThisTag->OpCode, OpCode, OpCode->Length) == 0) {
1591 if (MenuOption->ThisTag->OpCode == OpCode) {
1616 if ((gFormData->HiiHandle == gHighligthMenuInfo.HiiHandle) &&
1617 (gFormData->FormId == gHighligthMenuInfo.FormId))
1619 if (gHighligthMenuInfo.HLTQuestionId != 0) {
1620 return (BOOLEAN)(gHighligthMenuInfo.HLTQuestionId ==
GetQuestionIdInfo (HighLightedStatement->OpCode));
1622 if (
CompareMem (gHighligthMenuInfo.HLTOpCode, HighLightedStatement->OpCode, gHighligthMenuInfo.HLTOpCode->Length) == 0) {
1623 if ((gHighligthMenuInfo.HLTIndex == 0) || (gHighligthMenuInfo.HLTIndex ==
GetIndexInfoForOpcode (HighLightedStatement->OpCode))) {
1649 if (gHighligthMenuInfo.HLTQuestionId != 0) {
1650 if (
GetQuestionIdInfo (MenuOption->ThisTag->OpCode) == gHighligthMenuInfo.HLTQuestionId) {
1651 return (BOOLEAN)(MenuOption->Sequence == gHighligthMenuInfo.HLTSequence);
1654 if (
CompareMem (gHighligthMenuInfo.HLTOpCode, MenuOption->ThisTag->OpCode, gHighligthMenuInfo.HLTOpCode->Length) == 0) {
1655 if ((gHighligthMenuInfo.HLTIndex == 0) || (gHighligthMenuInfo.HLTIndex ==
GetIndexInfoForOpcode (MenuOption->ThisTag->OpCode))) {
1656 return (BOOLEAN)(MenuOption->Sequence == gHighligthMenuInfo.HLTSequence);
1685 NewPos = gMenuOption.ForwardLink;
1686 MenuOption = MENU_OPTION_FROM_LINK (NewPos);
1688 if (HighLightedStatement !=
NULL) {
1689 while (MenuOption->ThisTag != HighLightedStatement) {
1690 NewPos = NewPos->ForwardLink;
1691 if (NewPos == &gMenuOption) {
1698 MenuOption = MENU_OPTION_FROM_LINK (NewPos);
1704 ASSERT (NewPos != &gMenuOption);
1707 NewPos = NewPos->ForwardLink;
1708 if (NewPos == &gMenuOption) {
1715 MenuOption = MENU_OPTION_FROM_LINK (NewPos);
1721 if (NewPos == &gMenuOption) {
1743 if (gHighligthMenuInfo.TOSQuestionId != 0) {
1744 return (BOOLEAN)(
GetQuestionIdInfo (MenuOption->ThisTag->OpCode) == gHighligthMenuInfo.TOSQuestionId);
1747 if (
CompareMem (gHighligthMenuInfo.TOSOpCode, MenuOption->ThisTag->OpCode, gHighligthMenuInfo.TOSOpCode->Length) == 0) {
1748 if ((gHighligthMenuInfo.TOSIndex == 0) || (gHighligthMenuInfo.TOSIndex ==
GetIndexInfoForOpcode (MenuOption->ThisTag->OpCode))) {
1778 while (Link != EndMenu) {
1779 MenuOption = MENU_OPTION_FROM_LINK (Link);
1780 if (MenuOption->Row == 0) {
1784 Distance += MenuOption->Skip;
1785 Link = Link->BackLink;
1809 TopRow = gStatementDimensions.TopRow + SCROLL_ARROW_HEIGHT;
1810 BottomRow = gStatementDimensions.BottomRow - SCROLL_ARROW_HEIGHT;
1812 NewPos = gMenuOption.ForwardLink;
1813 MenuOption = MENU_OPTION_FROM_LINK (NewPos);
1816 NewPos = NewPos->ForwardLink;
1817 if (NewPos == &gMenuOption) {
1824 MenuOption = MENU_OPTION_FROM_LINK (NewPos);
1830 if (NewPos == &gMenuOption) {
1869 TopRow = gStatementDimensions.TopRow + SCROLL_ARROW_HEIGHT;
1870 BottomRow = gStatementDimensions.BottomRow - SCROLL_ARROW_HEIGHT;
1875 if (gMisMatch && (gFormData->HiiHandle == gHighligthMenuInfo.HiiHandle) && (gFormData->FormId == gHighligthMenuInfo.FormId)) {
1882 if (*HighlightMenu !=
NULL) {
1886 MenuOption = MENU_OPTION_FROM_LINK (*HighlightMenu);
1893 if (*TopOfScreen !=
NULL) {
1898 MenuOption = MENU_OPTION_FROM_LINK (*TopOfScreen);
1901 *SkipValue = gHighligthMenuInfo.SkipValue;
1909 if (MenuOption->Skip >= BottomRow - TopRow) {
1910 *TopOfScreen = *HighlightMenu;
1913 *TopOfScreen =
FindTopOfScreenMenu (*HighlightMenu, BottomRow - TopRow - MenuOption->Skip, &TmpValue);
1916 *SkipValue = TmpValue;
1922 *HighlightMenu = gMenuOption.ForwardLink;
1927 *TopOfScreen = gMenuOption.ForwardLink;
1930 }
else if (FormData->HighLightedStatement !=
NULL) {
1937 ASSERT (*HighlightMenu !=
NULL);
1942 MenuOption = MENU_OPTION_FROM_LINK (*HighlightMenu);
1946 if (*TopOfScreen ==
NULL) {
1953 if (MenuOption->Skip >= BottomRow - TopRow) {
1954 *TopOfScreen = *HighlightMenu;
1957 *TopOfScreen =
FindTopOfScreenMenu (*HighlightMenu, BottomRow - TopRow - MenuOption->Skip, &TmpValue);
1960 *SkipValue = TmpValue;
1963 MenuOption = MENU_OPTION_FROM_LINK (*TopOfScreen);
1966 *SkipValue = gHighligthMenuInfo.SkipValue;
1975 MenuOption = MENU_OPTION_FROM_LINK (*HighlightMenu);
1982 if (MenuOption->Skip >= BottomRow - TopRow) {
1983 *TopOfScreen = *HighlightMenu;
1986 *TopOfScreen =
FindTopOfScreenMenu (*HighlightMenu, BottomRow - TopRow - MenuOption->Skip, &TmpValue);
1989 *SkipValue = TmpValue;
1997 *TopOfScreen = gMenuOption.ForwardLink;
1998 *HighlightMenu = gMenuOption.ForwardLink;
2032 gHighligthMenuInfo.HiiHandle = gFormData->HiiHandle;
2033 gHighligthMenuInfo.FormId = gFormData->FormId;
2034 gHighligthMenuInfo.SkipValue = (UINT16)SkipValue;
2037 MenuOption = MENU_OPTION_FROM_LINK (Highlight);
2038 Statement = MenuOption->ThisTag;
2040 gUserInput->SelectedStatement = Statement;
2042 gHighligthMenuInfo.HLTSequence = MenuOption->Sequence;
2044 if (gHighligthMenuInfo.HLTQuestionId == 0) {
2048 if (gHighligthMenuInfo.HLTOpCode !=
NULL) {
2049 FreePool (gHighligthMenuInfo.HLTOpCode);
2052 gHighligthMenuInfo.HLTOpCode =
AllocateCopyPool (Statement->OpCode->Length, Statement->OpCode);
2053 ASSERT (gHighligthMenuInfo.HLTOpCode !=
NULL);
2058 MenuOption = MENU_OPTION_FROM_LINK (TopOfScreen);
2059 Statement = MenuOption->ThisTag;
2062 if (gHighligthMenuInfo.TOSQuestionId == 0) {
2066 if (gHighligthMenuInfo.TOSOpCode !=
NULL) {
2067 FreePool (gHighligthMenuInfo.TOSOpCode);
2070 gHighligthMenuInfo.TOSOpCode =
AllocateCopyPool (Statement->OpCode->Length, Statement->OpCode);
2071 ASSERT (gHighligthMenuInfo.TOSOpCode !=
NULL);
2076 gUserInput->SelectedStatement =
NULL;
2078 gHighligthMenuInfo.HLTSequence = 0;
2079 gHighligthMenuInfo.HLTQuestionId = 0;
2080 if (gHighligthMenuInfo.HLTOpCode !=
NULL) {
2081 FreePool (gHighligthMenuInfo.HLTOpCode);
2084 gHighligthMenuInfo.HLTOpCode =
NULL;
2085 gHighligthMenuInfo.HLTIndex = 0;
2087 gHighligthMenuInfo.TOSQuestionId = 0;
2088 if (gHighligthMenuInfo.TOSOpCode !=
NULL) {
2089 FreePool (gHighligthMenuInfo.TOSOpCode);
2092 gHighligthMenuInfo.TOSOpCode =
NULL;
2093 gHighligthMenuInfo.TOSIndex = 0;
2107 IN BOOLEAN Highlight
2112 Statement = MenuOption->ThisTag;
2119 if (MenuOption->GrayOut) {
2122 if (Statement->OpCode->OpCode == EFI_IFR_SUBTITLE_OP) {
2149 IN BOOLEAN Highlight
2196 Statement = MenuOption->ThisTag;
2201 if (Statement->OpCode->OpCode == EFI_IFR_TEXT_OP) {
2203 if (TextOp->TextTwo != 0) {
2204 String =
GetToken (TextOp->TextTwo, gFormData->HiiHandle);
2210 if ((Statement->OpCode->OpCode == EFI_IFR_SUBTITLE_OP) ||
2211 (Statement->OpCode->OpCode == EFI_IFR_REF_OP) ||
2212 (Statement->OpCode->OpCode == EFI_IFR_PASSWORD_OP) ||
2213 (Statement->OpCode->OpCode == EFI_IFR_ACTION_OP) ||
2214 (Statement->OpCode->OpCode == EFI_IFR_RESET_BUTTON_OP) ||
2218 ((Statement->OpCode->OpCode == EFI_IFR_TEXT_OP) && (Size == 0))
2250 CatLen =
StrLen (gConfirmMsgConnect);
2255 CheckFlags = BROWSER_ACTION_DISCARD |
2256 BROWSER_ACTION_DEFAULT |
2257 BROWSER_ACTION_SUBMIT |
2258 BROWSER_ACTION_RESET |
2259 BROWSER_ACTION_EXIT;
2264 if ((Action & CheckFlags) == 0) {
2268 if ((Action & BROWSER_ACTION_DISCARD) == BROWSER_ACTION_DISCARD) {
2269 CfmStrLen +=
StrLen (gConfirmDiscardMsg);
2272 if ((Action & BROWSER_ACTION_DEFAULT) == BROWSER_ACTION_DEFAULT) {
2273 if (CfmStrLen != 0) {
2274 CfmStrLen += CatLen;
2277 CfmStrLen +=
StrLen (gConfirmDefaultMsg);
2280 if ((Action & BROWSER_ACTION_SUBMIT) == BROWSER_ACTION_SUBMIT) {
2281 if (CfmStrLen != 0) {
2282 CfmStrLen += CatLen;
2285 CfmStrLen +=
StrLen (gConfirmSubmitMsg);
2288 if ((Action & BROWSER_ACTION_RESET) == BROWSER_ACTION_RESET) {
2289 if (CfmStrLen != 0) {
2290 CfmStrLen += CatLen;
2293 CfmStrLen +=
StrLen (gConfirmResetMsg);
2296 if ((Action & BROWSER_ACTION_EXIT) == BROWSER_ACTION_EXIT) {
2297 if (CfmStrLen != 0) {
2298 CfmStrLen += CatLen;
2301 CfmStrLen +=
StrLen (gConfirmExitMsg);
2308 MaxLen = CfmStrLen + 1 + 1;
2310 ASSERT (CfmStr !=
NULL);
2312 if ((Action & BROWSER_ACTION_DISCARD) == BROWSER_ACTION_DISCARD) {
2313 StrCpyS (CfmStr, MaxLen, gConfirmDiscardMsg);
2316 if ((Action & BROWSER_ACTION_DEFAULT) == BROWSER_ACTION_DEFAULT) {
2317 if (CfmStr[0] != 0) {
2318 StrCatS (CfmStr, MaxLen, gConfirmMsgConnect);
2319 StrCatS (CfmStr, MaxLen, gConfirmDefaultMsg2nd);
2321 StrCpyS (CfmStr, MaxLen, gConfirmDefaultMsg);
2325 if ((Action & BROWSER_ACTION_SUBMIT) == BROWSER_ACTION_SUBMIT) {
2326 if (CfmStr[0] != 0) {
2327 StrCatS (CfmStr, MaxLen, gConfirmMsgConnect);
2328 StrCatS (CfmStr, MaxLen, gConfirmSubmitMsg2nd);
2330 StrCpyS (CfmStr, MaxLen, gConfirmSubmitMsg);
2334 if ((Action & BROWSER_ACTION_RESET) == BROWSER_ACTION_RESET) {
2335 if (CfmStr[0] != 0) {
2336 StrCatS (CfmStr, MaxLen, gConfirmMsgConnect);
2337 StrCatS (CfmStr, MaxLen, gConfirmResetMsg2nd);
2339 StrCpyS (CfmStr, MaxLen, gConfirmResetMsg);
2343 if ((Action & BROWSER_ACTION_EXIT) == BROWSER_ACTION_EXIT) {
2344 if (CfmStr[0] != 0) {
2345 StrCatS (CfmStr, MaxLen, gConfirmMsgConnect);
2346 StrCatS (CfmStr, MaxLen, gConfirmExitMsg2nd);
2348 StrCpyS (CfmStr, MaxLen, gConfirmExitMsg);
2352 StrCatS (CfmStr, MaxLen, gConfirmMsgEnd);
2355 CreateDialog (&Key, gEmptyString, CfmStr, gConfirmOpt, gEmptyString,
NULL);
2356 }
while (((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) != (gConfirmOptYes[0] | UPPER_LOWER_CASE_OFFSET)) &&
2357 ((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) != (gConfirmOptNo[0] | UPPER_LOWER_CASE_OFFSET)) &&
2358 (Key.ScanCode != SCAN_ESC));
2360 if ((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) == (gConfirmOptYes[0] | UPPER_LOWER_CASE_OFFSET)) {
2392 IN BOOLEAN Highlight,
2393 IN BOOLEAN UpdateCol
2401 CHAR16 *OptionString;
2402 CHAR16 *OutputString;
2409 BOOLEAN IsProcessingFirstRow;
2411 UINTN PromptLineNum;
2412 UINTN OptionLineNum;
2416 Statement = MenuOption->ThisTag;
2424 IsProcessingFirstRow =
TRUE;
2435 if (EFI_ERROR (Status)) {
2439 if (OptionString !=
NULL) {
2440 if ((Statement->OpCode->OpCode == EFI_IFR_DATE_OP) || (Statement->OpCode->OpCode == EFI_IFR_TIME_OP)) {
2447 Width = (UINT16)gOptionBlockWidth - 1;
2448 Row = MenuOption->Row;
2452 for (Index = 0;
GetLineByWidth (OptionString, Width, &GlyphWidth, &Index, &OutputString) != 0x0000;) {
2453 if (((Temp2 == 0)) && (Row <= BottomRow)) {
2454 if ((Statement->OpCode->OpCode == EFI_IFR_DATE_OP) || (Statement->OpCode->OpCode == EFI_IFR_TIME_OP)) {
2460 if (MenuOption->Skip != 0) {
2465 DisplayMenuString (MenuOption, MenuOption->OptCol, Row, OutputString, Width + 1 - 7, Highlight);
2474 DisplayMenuString (MenuOption, MenuOption->OptCol, Row, OutputString, Width + 1, Highlight);
2483 if (
StrLen (&OptionString[Index]) != 0) {
2493 if ((Row - MenuOption->Row) >= MenuOption->Skip) {
2513 PromptWidth =
GetWidth (MenuOption, &AdjustValue);
2514 Row = MenuOption->Row;
2518 if ((MenuOption->Description ==
NULL) || (MenuOption->Description[0] ==
'\0')) {
2522 for (Index = 0;
GetLineByWidth (MenuOption->Description, PromptWidth, &GlyphWidth, &Index, &OutputString) != 0x0000;) {
2523 if ((Temp == 0) && (Row <= BottomRow)) {
2529 if ((Statement->OpCode->OpCode == EFI_IFR_REF_OP) && (MenuOption->Col >= 2) && IsProcessingFirstRow) {
2534 MenuOption->Col - 2,
2536 GEOMETRICSHAPE_RIGHT_TRIANGLE
2538 IsProcessingFirstRow =
FALSE;
2541 DisplayMenuString (MenuOption, MenuOption->Col, Row, OutputString, PromptWidth + AdjustValue, Highlight);
2548 if (
StrLen (&MenuOption->Description[Index]) != 0) {
2566 if ((Statement->OpCode->OpCode == EFI_IFR_TEXT_OP) && (((
EFI_IFR_TEXT *)Statement->OpCode)->TextTwo != 0)) {
2569 Width = (UINT16)gOptionBlockWidth - 1;
2570 Row = MenuOption->Row;
2574 for (Index = 0;
GetLineByWidth (StringPtr, Width, &GlyphWidth, &Index, &OutputString) != 0x0000;) {
2575 if ((Temp3 == 0) && (Row <= BottomRow)) {
2576 DisplayMenuString (MenuOption, MenuOption->OptCol, Row, OutputString, Width + 1, Highlight);
2583 if (
StrLen (&StringPtr[Index]) != 0) {
2589 if ((Row - MenuOption->Row) >= MenuOption->Skip) {
2608 if (
HasOptionString (MenuOption) && (OptionLineNum != PromptLineNum)) {
2609 Col = OptionLineNum < PromptLineNum ? MenuOption->OptCol : BeginCol;
2610 Row = (OptionLineNum < PromptLineNum ? OptionLineNum : PromptLineNum) + MenuOption->Row;
2611 Width = (UINT16)(OptionLineNum < PromptLineNum ? gOptionBlockWidth : PromptWidth + AdjustValue + SkipWidth);
2612 MaxRow = (OptionLineNum < PromptLineNum ? PromptLineNum : OptionLineNum) + MenuOption->Row - 1;
2614 while (Row <= MaxRow) {
2640 UINTN DistanceValue;
2649 CHAR16 *StringRightPtr;
2650 CHAR16 *StringErrorPtr;
2651 CHAR16 *OptionString;
2653 CHAR16 *HelpHeaderString;
2654 CHAR16 *HelpBottomString;
2668 UI_CONTROL_FLAG ControlFlag;
2669 UI_SCREEN_OPERATION ScreenOperation;
2672 UINTN HelpPageIndex;
2673 UINTN HelpPageCount;
2676 UINTN HelpHeaderLine;
2677 UINTN HelpBottomLine;
2678 BOOLEAN MultiHelpPage;
2679 UINT16 EachLineWidth;
2680 UINT16 HeaderLineWidth;
2681 UINT16 BottomLineWidth;
2682 EFI_STRING_ID HelpInfo;
2683 UI_EVENT_TYPE EventType;
2684 BOOLEAN SkipHighLight;
2687 EventType = UIEventNone;
2690 HelpHeaderString =
NULL;
2691 HelpBottomString =
NULL;
2692 OptionString =
NULL;
2693 ScreenOperation = UiNoOperation;
2701 MultiHelpPage =
FALSE;
2703 HeaderLineWidth = 0;
2704 BottomLineWidth = 0;
2708 SkipHighLight =
FALSE;
2710 NextMenuOption =
NULL;
2711 SavedMenuOption =
NULL;
2715 gModalSkipColumn = (CHAR16)(gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn) / 6;
2719 TopRow = gStatementDimensions.TopRow + SCROLL_ARROW_HEIGHT;
2720 BottomRow = gStatementDimensions.BottomRow - SCROLL_ARROW_HEIGHT - 1;
2723 if ((FormData->Attribute & HII_DISPLAY_MODAL) != 0) {
2724 Col = gStatementDimensions.LeftColumn + LEFT_SKIPPED_COLUMNS + gModalSkipColumn;
2726 Col = gStatementDimensions.LeftColumn + LEFT_SKIPPED_COLUMNS;
2729 FindTopMenu (FormData, &TopOfScreen, &NewPos, &SkipValue);
2731 NextMenuOption = MENU_OPTION_FROM_LINK (NewPos);
2732 gUserInput->SelectedStatement = NextMenuOption->ThisTag;
2737 ControlFlag = CfInitialization;
2739 switch (ControlFlag) {
2740 case CfInitialization:
2741 if ((gOldFormEntry.HiiHandle != FormData->HiiHandle) ||
2742 (!
CompareGuid (&gOldFormEntry.FormSetGuid, &FormData->FormSetGuid)))
2748 gStatementDimensions.LeftColumn,
2749 gStatementDimensions.RightColumn,
2750 TopRow - SCROLL_ARROW_HEIGHT,
2751 BottomRow + SCROLL_ARROW_HEIGHT,
2756 ControlFlag = CfRepaint;
2760 ControlFlag = CfRefreshHighLight;
2779 if ((FormData->Attribute & HII_DISPLAY_MODAL) != 0) {
2780 PrintStringAtWithWidth (gStatementDimensions.LeftColumn + gModalSkipColumn, TopRow - 1, L
"", gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn - 2 * gModalSkipColumn);
2782 PrintStringAtWithWidth (gStatementDimensions.LeftColumn, TopRow - 1, L
"", gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn);
2788 gStatementDimensions.LeftColumn + gPromptBlockWidth + gOptionBlockWidth + 1,
2789 TopRow - SCROLL_ARROW_HEIGHT,
2798 for (Link = TopOfScreen; Link != &gMenuOption; Link = Link->ForwardLink) {
2799 MenuOption = MENU_OPTION_FROM_LINK (Link);
2800 MenuOption->Row = Row;
2801 MenuOption->Col = Col;
2802 if ((FormData->Attribute & HII_DISPLAY_MODAL) != 0) {
2803 MenuOption->OptCol = gStatementDimensions.LeftColumn + LEFT_SKIPPED_COLUMNS + gPromptBlockWidth + gModalSkipColumn;
2805 MenuOption->OptCol = gStatementDimensions.LeftColumn + LEFT_SKIPPED_COLUMNS + gPromptBlockWidth;
2808 if (MenuOption->NestInStatement) {
2809 MenuOption->Col += SUBTITLE_INDENT;
2815 if (Link == NewPos) {
2816 SavedMenuOption = MenuOption;
2817 SkipHighLight =
TRUE;
2820 if ((FormData->Attribute & HII_DISPLAY_MODAL) != 0) {
2823 MenuOption->Col - gStatementDimensions.LeftColumn,
2824 gStatementDimensions.LeftColumn + gModalSkipColumn,
2825 Link == TopOfScreen ? SkipValue : 0,
2827 (BOOLEAN)((Link == NewPos) &&
IsSelectable (MenuOption)),
2833 MenuOption->Col - gStatementDimensions.LeftColumn,
2834 gStatementDimensions.LeftColumn,
2835 Link == TopOfScreen ? SkipValue : 0,
2837 (BOOLEAN)((Link == NewPos) &&
IsSelectable (MenuOption)),
2842 if (EFI_ERROR (Status)) {
2853 if (Link == TopOfScreen) {
2854 Row += MenuOption->Skip - SkipValue;
2856 Row += MenuOption->Skip;
2859 if (Row > BottomRow) {
2864 Row = BottomRow + 1;
2872 while (Row <= BottomRow) {
2873 if ((FormData->Attribute & HII_DISPLAY_MODAL) != 0) {
2874 PrintStringAtWithWidth (gStatementDimensions.LeftColumn + gModalSkipColumn, Row++, L
"", gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn - 2 * gModalSkipColumn);
2876 PrintStringAtWithWidth (gStatementDimensions.LeftColumn, Row++, L
"", gStatementDimensions.RightColumn - gHelpBlockWidth - gStatementDimensions.LeftColumn);
2883 if ((FormData->Attribute & HII_DISPLAY_MODAL) != 0) {
2884 PrintStringAtWithWidth (gStatementDimensions.LeftColumn + gModalSkipColumn, BottomRow + 1, L
"", gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn - 2 * +gModalSkipColumn);
2886 PrintStringAtWithWidth (gStatementDimensions.LeftColumn, BottomRow + 1, L
"", gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn);
2892 gStatementDimensions.LeftColumn + gPromptBlockWidth + gOptionBlockWidth + 1,
2893 BottomRow + SCROLL_ARROW_HEIGHT,
2904 case CfRefreshHighLight:
2911 ControlFlag = CfUpdateHelpString;
2913 ASSERT (NewPos !=
NULL);
2916 if (SkipHighLight) {
2917 SkipHighLight =
FALSE;
2918 MenuOption = SavedMenuOption;
2931 if ((MenuOption !=
NULL) && (TopOfScreen == &MenuOption->Link)) {
2937 if (NewPos == TopOfScreen) {
2943 if ((MenuOption ==
NULL) || (NewPos != &MenuOption->Link)) {
2944 if (MenuOption !=
NULL) {
2950 MenuOption->Col - gStatementDimensions.LeftColumn,
2951 gStatementDimensions.LeftColumn,
2962 MenuOption = MENU_OPTION_FROM_LINK (NewPos);
2971 MenuOption->Col - gStatementDimensions.LeftColumn,
2972 gStatementDimensions.LeftColumn,
2982 case CfUpdateHelpString:
2983 ControlFlag = CfPrepareToReadKey;
2984 if ((FormData->Attribute & HII_DISPLAY_MODAL) != 0) {
2992 if (Repaint || NewLine) {
3002 ASSERT (MenuOption !=
NULL);
3004 Statement = MenuOption->ThisTag;
3005 StatementValue = &Statement->CurrentValue;
3007 if (((Statement->OpCode->OpCode == EFI_IFR_DATE_OP) && (StatementValue->Value.date.Month == 0xff)) || ((Statement->OpCode->OpCode == EFI_IFR_TIME_OP) && (StatementValue->Value.time.Hour == 0xff))) {
3013 if (((Statement->OpCode->OpCode == EFI_IFR_DATE_OP) && (StatementValue->Value.date.Month == 0xff)) || ((Statement->OpCode->OpCode == EFI_IFR_TIME_OP) && (StatementValue->Value.time.Hour == 0xff))) {
3014 StringRightPtr =
GetToken (HelpInfo, gFormData->HiiHandle);
3017 StrCpyS (StringPtr,
StrLen (StringRightPtr) +
StrLen (StringErrorPtr) + 1, StringRightPtr);
3018 StrCatS (StringPtr,
StrLen (StringRightPtr) +
StrLen (StringErrorPtr) + 1, StringErrorPtr);
3022 StringPtr =
GetToken (HelpInfo, gFormData->HiiHandle);
3027 RowCount = BottomRow - TopRow + 1;
3032 if (HelpString !=
NULL) {
3037 HelpLine =
ProcessHelpString (StringPtr, &HelpString, &EachLineWidth, RowCount);
3040 if (HelpLine > RowCount) {
3041 MultiHelpPage =
TRUE;
3043 if (HelpHeaderString !=
NULL) {
3045 HelpHeaderString =
NULL;
3048 HelpHeaderLine =
ProcessHelpString (StringPtr, &HelpHeaderString, &HeaderLineWidth, 0);
3051 if (HelpBottomString !=
NULL) {
3053 HelpBottomString =
NULL;
3056 HelpBottomLine =
ProcessHelpString (StringPtr, &HelpBottomString, &BottomLineWidth, 0);
3061 if (HelpLine > 2 * RowCount - 2) {
3062 HelpPageCount = (HelpLine - RowCount + 1) / (RowCount - 2) + 1;
3063 if ((HelpLine - RowCount + 1) % (RowCount - 2) != 0) {
3070 MultiHelpPage =
FALSE;
3080 if (HelpPageIndex > 0) {
3082 for (Index = 0; Index < HelpHeaderLine; Index++) {
3083 ASSERT (HelpHeaderLine == 1);
3084 ASSERT (
GetStringWidth (HelpHeaderString) / 2 < ((UINT32)gHelpBlockWidth - 1));
3086 gStatementDimensions.RightColumn - gHelpBlockWidth,
3092 gStatementDimensions.RightColumn -
GetStringWidth (HelpHeaderString) / 2 - 1,
3094 &HelpHeaderString[Index * HeaderLineWidth]
3103 if (!MultiHelpPage) {
3104 for (Index = 0; Index < HelpLine; Index++) {
3106 gStatementDimensions.RightColumn - gHelpBlockWidth,
3108 &HelpString[Index * EachLineWidth],
3113 for ( ; Index < RowCount; Index++) {
3115 gStatementDimensions.RightColumn - gHelpBlockWidth,
3122 gST->
ConOut->SetCursorPosition (
gST->
ConOut, gStatementDimensions.RightColumn-1, BottomRow);
3124 if (HelpPageIndex == 0) {
3125 for (Index = 0; Index < RowCount - HelpBottomLine; Index++) {
3127 gStatementDimensions.RightColumn - gHelpBlockWidth,
3129 &HelpString[Index * EachLineWidth],
3134 for (Index = 0; (Index < RowCount - HelpBottomLine - HelpHeaderLine) &&
3135 (Index + HelpPageIndex * (RowCount - 2) + 1 < HelpLine); Index++)
3138 gStatementDimensions.RightColumn - gHelpBlockWidth,
3139 Index + TopRow + HelpHeaderLine,
3140 &HelpString[(Index + HelpPageIndex * (RowCount - 2) + 1)* EachLineWidth],
3145 if (HelpPageIndex == HelpPageCount - 1) {
3146 for ( ; Index < RowCount - HelpHeaderLine; Index++) {
3148 gStatementDimensions.RightColumn - gHelpBlockWidth,
3149 Index + TopRow + HelpHeaderLine,
3155 gST->
ConOut->SetCursorPosition (
gST->
ConOut, gStatementDimensions.RightColumn-1, BottomRow);
3166 if ((HelpPageIndex < HelpPageCount - 1) && MultiHelpPage) {
3168 for (Index = 0; Index < HelpBottomLine; Index++) {
3169 ASSERT (HelpBottomLine == 1);
3170 ASSERT (
GetStringWidth (HelpBottomString) / 2 < ((UINT32)gHelpBlockWidth - 1));
3172 gStatementDimensions.RightColumn - gHelpBlockWidth,
3173 BottomRow + Index - HelpBottomLine + 1,
3178 gStatementDimensions.RightColumn -
GetStringWidth (HelpBottomString) / 2 - 1,
3179 BottomRow + Index - HelpBottomLine + 1,
3180 &HelpBottomString[Index * BottomLineWidth]
3192 case CfPrepareToReadKey:
3193 ControlFlag = CfReadKey;
3194 ScreenOperation = UiNoOperation;
3198 ControlFlag = CfScreenOperation;
3205 if (!EFI_ERROR (Status)) {
3206 EventType = UIEventKey;
3213 if (Status != EFI_NOT_READY) {
3218 if (EventType == UIEventKey) {
3225 if (EventType == UIEventDriver) {
3227 gUserInput->Action = BROWSER_ACTION_NONE;
3228 ControlFlag = CfExit;
3232 if (EventType == UIEventTimeOut) {
3233 gUserInput->Action = BROWSER_ACTION_FORM_EXIT;
3234 ControlFlag = CfExit;
3238 switch (Key.UnicodeChar) {
3239 case CHAR_CARRIAGE_RETURN:
3240 if ((MenuOption ==
NULL) || MenuOption->GrayOut || MenuOption->ReadOnly) {
3241 ControlFlag = CfReadKey;
3245 ScreenOperation = UiSelect;
3259 ASSERT (MenuOption !=
NULL);
3260 if (
IsListEmpty (&gMenuOption) || MenuOption->GrayOut || MenuOption->ReadOnly) {
3261 ControlFlag = CfReadKey;
3265 Statement = MenuOption->ThisTag;
3266 if ( (Statement->OpCode->OpCode == EFI_IFR_DATE_OP)
3267 || (Statement->OpCode->OpCode == EFI_IFR_TIME_OP)
3268 || ((Statement->OpCode->OpCode == EFI_IFR_NUMERIC_OP) && (
GetFieldFromNum (Statement->OpCode) != 0))
3271 if (Key.UnicodeChar ==
'+') {
3272 gDirection = SCAN_RIGHT;
3274 gDirection = SCAN_LEFT;
3278 if (OptionString !=
NULL) {
3282 if (EFI_ERROR (Status)) {
3289 ControlFlag = CfExit;
3296 ScreenOperation = UiUp;
3301 ScreenOperation = UiDown;
3306 ControlFlag = CfReadKey;
3310 ASSERT (MenuOption !=
NULL);
3311 if ((MenuOption->ThisTag->OpCode->OpCode == EFI_IFR_CHECKBOX_OP) && !MenuOption->GrayOut && !MenuOption->ReadOnly) {
3312 ScreenOperation = UiSelect;
3319 if (!MultiHelpPage) {
3320 ControlFlag = CfReadKey;
3324 ControlFlag = CfUpdateHelpString;
3325 HelpPageIndex = HelpPageIndex < HelpPageCount - 1 ? HelpPageIndex + 1 : HelpPageCount - 1;
3330 if (!MultiHelpPage) {
3331 ControlFlag = CfReadKey;
3335 ControlFlag = CfUpdateHelpString;
3336 HelpPageIndex = HelpPageIndex > 0 ? HelpPageIndex - 1 : 0;
3340 for (Index = 0; Index < mScanCodeNumber; Index++) {
3341 if (Key.ScanCode == gScanCodeToOperation[Index].ScanCode) {
3342 ScreenOperation = gScanCodeToOperation[Index].ScreenOperation;
3347 if (((FormData->Attribute & HII_DISPLAY_MODAL) != 0) && ((Key.ScanCode == SCAN_ESC) || (Index == mScanCodeNumber))) {
3351 ControlFlag = CfReadKey;
3352 }
else if (Index == mScanCodeNumber) {
3358 if (HotKey !=
NULL) {
3359 ScreenOperation = UiHotKey;
3368 case CfScreenOperation:
3369 if ((ScreenOperation != UiReset) && (ScreenOperation != UiHotKey)) {
3375 ControlFlag = CfReadKey;
3381 Index <
ARRAY_SIZE (gScreenOperationToControlFlag);
3385 if (ScreenOperation == gScreenOperationToControlFlag[Index].ScreenOperation) {
3386 ControlFlag = gScreenOperationToControlFlag[Index].ControlFlag;
3394 ControlFlag = CfRepaint;
3396 ASSERT (MenuOption !=
NULL);
3397 Statement = MenuOption->ThisTag;
3398 if (Statement->OpCode->OpCode == EFI_IFR_TEXT_OP) {
3402 switch (Statement->OpCode->OpCode) {
3403 case EFI_IFR_REF_OP:
3404 case EFI_IFR_ACTION_OP:
3405 case EFI_IFR_RESET_BUTTON_OP:
3406 ControlFlag = CfExit;
3416 if (OptionString !=
NULL) {
3420 if (EFI_ERROR (Status)) {
3426 ControlFlag = CfExit;
3441 ControlFlag = CfRepaint;
3445 gUserInput->Action = BROWSER_ACTION_FORM_EXIT;
3446 ControlFlag = CfExit;
3450 ControlFlag = CfRepaint;
3452 ASSERT (HotKey !=
NULL);
3455 gUserInput->Action = HotKey->Action;
3456 if ((HotKey->Action & BROWSER_ACTION_DEFAULT) == BROWSER_ACTION_DEFAULT) {
3457 gUserInput->DefaultId = HotKey->DefaultId;
3460 ControlFlag = CfExit;
3464 ControlFlag = CfRepaint;
3470 ControlFlag = CfRepaint;
3471 ASSERT (MenuOption !=
NULL);
3472 if ((MenuOption->ThisTag->OpCode->OpCode == EFI_IFR_DATE_OP) || (MenuOption->ThisTag->OpCode->OpCode == EFI_IFR_TIME_OP)) {
3473 if (MenuOption->Sequence != 0) {
3477 ASSERT (NewPos !=
NULL);
3478 NewPos = NewPos->BackLink;
3485 ControlFlag = CfRepaint;
3486 ASSERT (MenuOption !=
NULL);
3487 if ((MenuOption->ThisTag->OpCode->OpCode == EFI_IFR_DATE_OP) || (MenuOption->ThisTag->OpCode->OpCode == EFI_IFR_TIME_OP)) {
3488 if (MenuOption->Sequence != 2) {
3492 ASSERT (NewPos !=
NULL);
3493 NewPos = NewPos->ForwardLink;
3500 ControlFlag = CfRepaint;
3503 SavedListEntry = NewPos;
3504 ASSERT (NewPos !=
NULL);
3506 MenuOption = MENU_OPTION_FROM_LINK (NewPos);
3507 ASSERT (MenuOption !=
NULL);
3514 NewPos = NewPos->BackLink;
3519 if (Difference < 0) {
3525 if ((TopOfScreen != gMenuOption.ForwardLink) || (SkipValue != 0)) {
3526 TopOfScreen = gMenuOption.ForwardLink;
3527 NewPos = SavedListEntry;
3534 NewPos = gMenuOption.BackLink;
3538 NextMenuOption = MENU_OPTION_FROM_LINK (NewPos);
3540 if (MenuOption->Row < TopRow + Difference + NextMenuOption->Skip) {
3544 TopOfScreen = NewPos;
3559 (BottomRow - TopRow + 1 >= Difference + NextMenuOption->Skip + 1))
3561 NewPos = SavedListEntry;
3580 ControlFlag = CfRepaint;
3588 if (SkipValue >= BottomRow - TopRow + 1) {
3594 SkipValue -= BottomRow - TopRow + 1;
3595 NewPos = TopOfScreen;
3598 Index = (BottomRow + 1) - SkipValue - TopRow;
3602 NewPos = TopOfScreen;
3621 ControlFlag = CfRepaint;
3626 NextMenuOption = MENU_OPTION_FROM_LINK (Link);
3627 Index = TopRow + NextMenuOption->Skip - SkipValue;
3631 while ((Index <= BottomRow + 1) && (Link->ForwardLink != &gMenuOption)) {
3632 Link = Link->ForwardLink;
3633 NextMenuOption = MENU_OPTION_FROM_LINK (Link);
3634 Index = Index + NextMenuOption->Skip;
3637 if ((Link->ForwardLink == &gMenuOption) && (Index <= BottomRow + 1)) {
3647 if (Link == TopOfScreen) {
3651 SkipValue += BottomRow - TopRow + 1;
3653 SkipValue = NextMenuOption->Skip - (Index - (BottomRow + 1));
3686 ControlFlag = CfRepaint;
3689 if (NewPos == TopOfScreen) {
3695 SavedListEntry = NewPos;
3706 MenuOption = MENU_OPTION_FROM_LINK (NewPos);
3707 NewPos = NewPos->ForwardLink;
3711 if (MenuOption->Row + MenuOption->Skip - Temp2 > BottomRow + 1) {
3712 if ((gMenuOption.ForwardLink == NewPos) || (&gMenuOption == NewPos)) {
3721 if (Difference < 0) {
3725 if ((TopOfScreen != gMenuOption.ForwardLink) || (SkipValue != 0)) {
3726 TopOfScreen = gMenuOption.ForwardLink;
3730 MenuOption = MENU_OPTION_FROM_LINK (SavedListEntry);
3733 NewPos = gMenuOption.ForwardLink;
3751 NextMenuOption = MENU_OPTION_FROM_LINK (NewPos);
3752 if (NextMenuOption->Row == 0) {
3759 Temp = (MenuOption->Row + MenuOption->Skip - Temp2) + Difference + NextMenuOption->Skip - 1;
3760 if (Temp > BottomRow) {
3765 SavedMenuOption = MENU_OPTION_FROM_LINK (TopOfScreen);
3771 if ((Temp - BottomRow) >= (SavedMenuOption->Skip - SkipValue)) {
3775 TopOfScreen = TopOfScreen->ForwardLink;
3776 DistanceValue = (Temp - BottomRow) - (SavedMenuOption->Skip - SkipValue);
3778 SavedMenuOption = MENU_OPTION_FROM_LINK (TopOfScreen);
3784 while (DistanceValue >= SavedMenuOption->Skip && TopOfScreen != NewPos) {
3788 DistanceValue = DistanceValue - (
INTN)SavedMenuOption->Skip;
3789 TopOfScreen = TopOfScreen->ForwardLink;
3790 SavedMenuOption = MENU_OPTION_FROM_LINK (TopOfScreen);
3797 if (TopOfScreen != NewPos) {
3798 SkipValue = DistanceValue;
3807 SkipValue += Temp - BottomRow;
3815 ScreenOperation = UiDown;
3816 ControlFlag = CfScreenOperation;
3820 MenuOption = MENU_OPTION_FROM_LINK (SavedListEntry);
3832 (BottomRow - TopRow + 1 >= Difference + NextMenuOption->Skip + 1))
3834 NewPos = SavedListEntry;
3848 case CfUiNoOperation:
3849 ControlFlag = CfRepaint;
3854 if (HelpString !=
NULL) {
3858 if (HelpHeaderString !=
NULL) {
3862 if (HelpBottomString !=
NULL) {
3893 Option = MENU_OPTION_FROM_LINK (Link);
3894 if (Option->Description !=
NULL) {
3923 EFI_STRING_ID StringToken;
3924 CHAR16 DiscardChange;
3925 CHAR16 JumpToFormSet;
3926 CHAR16 *PrintString;
3928 if (gFormData->BrowserStatus == BROWSER_SUCCESS) {
3933 TimeOutEvent =
NULL;
3934 RefreshIntervalEvent =
NULL;
3936 if (gFormData->HighLightedStatement !=
NULL) {
3937 OpCodeBuf = gFormData->HighLightedStatement->OpCode;
3940 if (gFormData->BrowserStatus == (BROWSER_WARNING_IF)) {
3941 ASSERT (OpCodeBuf !=
NULL && OpCodeBuf->OpCode == EFI_IFR_WARNING_IF_OP);
3947 if ((gFormData->BrowserStatus == (BROWSER_NO_SUBMIT_IF)) &&
3948 ((OpCodeBuf !=
NULL) && (OpCodeBuf->OpCode == EFI_IFR_NO_SUBMIT_IF_OP)))
3951 }
else if ((gFormData->BrowserStatus == (BROWSER_INCONSISTENT_IF)) &&
3952 ((OpCodeBuf !=
NULL) && (OpCodeBuf->OpCode == EFI_IFR_INCONSISTENT_IF_OP)))
3958 if (StringToken != 0) {
3959 ErrorInfo =
GetToken (StringToken, gFormData->HiiHandle);
3960 }
else if (gFormData->ErrorString !=
NULL) {
3965 ErrorInfo = gFormData->ErrorString;
3967 switch (gFormData->BrowserStatus) {
3968 case BROWSER_SUBMIT_FAIL:
3969 ErrorInfo = gSaveFailed;
3972 case BROWSER_FORM_NOT_FOUND:
3973 ErrorInfo = gFormNotFound;
3976 case BROWSER_FORM_SUPPRESS:
3977 ErrorInfo = gFormSuppress;
3980 case BROWSER_PROTOCOL_NOT_FOUND:
3981 ErrorInfo = gProtocolNotFound;
3984 case BROWSER_SUBMIT_FAIL_NO_SUBMIT_IF:
3985 ErrorInfo = gNoSubmitIfFailed;
3988 case BROWSER_RECONNECT_FAIL:
3989 ErrorInfo = gReconnectFail;
3992 case BROWSER_RECONNECT_SAVE_CHANGES:
3993 ErrorInfo = gReconnectConfirmChanges;
3996 case BROWSER_RECONNECT_REQUIRED:
3997 ErrorInfo = gReconnectRequired;
4001 ErrorInfo = gBrowserError;
4006 switch (gFormData->BrowserStatus) {
4007 case BROWSER_SUBMIT_FAIL:
4008 case BROWSER_SUBMIT_FAIL_NO_SUBMIT_IF:
4009 case BROWSER_RECONNECT_SAVE_CHANGES:
4010 ASSERT (gUserInput !=
NULL);
4011 if (gFormData->BrowserStatus == (BROWSER_SUBMIT_FAIL)) {
4012 PrintString = gSaveProcess;
4013 JumpToFormSet = gJumpToFormSet[0];
4014 DiscardChange = gDiscardChange[0];
4015 }
else if (gFormData->BrowserStatus == (BROWSER_RECONNECT_SAVE_CHANGES)) {
4016 PrintString = gChangesOpt;
4017 JumpToFormSet = gConfirmOptYes[0];
4018 DiscardChange = gConfirmOptNo[0];
4020 PrintString = gSaveNoSubmitProcess;
4021 JumpToFormSet = gCheckError[0];
4022 DiscardChange = gDiscardChange[0];
4026 CreateDialog (&Key, gEmptyString, ErrorInfo, PrintString, gEmptyString,
NULL);
4027 }
while (((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) != (DiscardChange | UPPER_LOWER_CASE_OFFSET)) &&
4028 ((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) != (JumpToFormSet | UPPER_LOWER_CASE_OFFSET)));
4030 if ((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) == (DiscardChange | UPPER_LOWER_CASE_OFFSET)) {
4031 gUserInput->Action = BROWSER_ACTION_DISCARD;
4033 gUserInput->Action = BROWSER_ACTION_GOTO;
4041 CreateDialog (&Key, gEmptyString, ErrorInfo, gPressEnter, gEmptyString,
NULL);
4042 }
while (Key.UnicodeChar != CHAR_CARRIAGE_RETURN);
4047 EventContext.SyncEvent = TimeOutEvent;
4048 EventContext.TimeOut = &TimeOut;
4049 EventContext.ErrorInfo = ErrorInfo;
4051 Status =
gBS->CreateEvent (EVT_TIMER | EVT_NOTIFY_SIGNAL, TPL_CALLBACK,
RefreshTimeOutProcess, &EventContext, &RefreshIntervalEvent);
4057 gBS->SignalEvent (RefreshIntervalEvent);
4064 if (!EFI_ERROR (Status) && (Key.UnicodeChar == CHAR_CARRIAGE_RETURN)) {
4068 if (Status != EFI_NOT_READY) {
4072 WaitList[0] = TimeOutEvent;
4075 Status =
gBS->WaitForEvent (2, WaitList, &Index);
4086 gBS->CloseEvent (TimeOutEvent);
4087 gBS->CloseEvent (RefreshIntervalEvent);
4093 if (StringToken != 0) {
4118 ASSERT (FormData !=
NULL);
4119 if (FormData ==
NULL) {
4120 return EFI_INVALID_PARAMETER;
4123 gUserInput = UserInputData;
4124 gFormData = FormData;
4130 if (gFormData->BrowserStatus != BROWSER_SUCCESS) {
4138 if (EFI_ERROR (Status)) {
4151 gOptionBlockWidth = (CHAR16)((gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn) / 3) + 1;
4152 gHelpBlockWidth = (CHAR16)(gOptionBlockWidth - 1 - LEFT_SKIPPED_COLUMNS);
4153 gPromptBlockWidth = (CHAR16)(gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn - 2 * (gOptionBlockWidth - 1) - 1);
4161 || (gOldFormEntry.HiiHandle != FormData->HiiHandle)
4162 || (!
CompareGuid (&gOldFormEntry.FormSetGuid, &FormData->FormSetGuid))
4163 || (gOldFormEntry.FormId != FormData->FormId))
4165 mStatementLayoutIsChanged =
TRUE;
4167 mStatementLayoutIsChanged =
FALSE;
4175 mIsFirstForm =
FALSE;
4176 gOldFormEntry.HiiHandle = FormData->HiiHandle;
4177 CopyGuid (&gOldFormEntry.FormSetGuid, &FormData->FormSetGuid);
4178 gOldFormEntry.FormId = FormData->FormId;
4198 mIsFirstForm =
TRUE;
4219 while ((Size--) != 0) {
4250 &gDisplayEngineGuid,
4252 DisplayEngineStrings,
4255 ASSERT (gHiiHandle !=
NULL);
4260 Status =
gBS->InstallProtocolInterface (
4261 &mPrivateData.Handle,
4262 &gEdkiiFormDisplayEngineProtocolGuid,
4264 &mPrivateData.FromDisplayProt
4271 Status =
gBS->InstallProtocolInterface (
4272 &mPrivateData.Handle,
4273 &gEfiHiiPopupProtocolGuid,
4275 &mPrivateData.HiiPopup
4281 ZeroMem (&gHighligthMenuInfo,
sizeof (gHighligthMenuInfo));
4282 ZeroMem (&gOldFormEntry,
sizeof (gOldFormEntry));
4287 Status =
gBS->LocateProtocol (&gEdkiiFormBrowserEx2ProtocolGuid,
NULL, (VOID **)&FormBrowserEx2);
4288 if (!EFI_ERROR (Status)) {
4292 HotKey.UnicodeChar = CHAR_NULL;
4293 HotKey.ScanCode = SCAN_F10;
4296 FormBrowserEx2->RegisterHotKey (&HotKey, BROWSER_ACTION_SUBMIT, 0,
NewString);
4299 HotKey.ScanCode = SCAN_F9;
4302 FormBrowserEx2->RegisterHotKey (&HotKey, BROWSER_ACTION_DEFAULT, EFI_HII_DEFAULT_CLASS_STANDARD,
NewString);
4328 if (gHighligthMenuInfo.HLTOpCode !=
NULL) {
4329 FreePool (gHighligthMenuInfo.HLTOpCode);
4332 if (gHighligthMenuInfo.TOSOpCode !=
NULL) {
4333 FreePool (gHighligthMenuInfo.TOSOpCode);
BOOLEAN EFIAPI IsNull(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
BOOLEAN EFIAPI IsListEmpty(IN CONST LIST_ENTRY *ListHead)
RETURN_STATUS EFIAPI StrCpyS(OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source)
LIST_ENTRY *EFIAPI GetNextNode(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
LIST_ENTRY *EFIAPI GetFirstNode(IN CONST LIST_ENTRY *List)
RETURN_STATUS EFIAPI StrCatS(IN OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source)
LIST_ENTRY *EFIAPI RemoveEntryList(IN CONST LIST_ENTRY *Entry)
LIST_ENTRY *EFIAPI InitializeListHead(IN OUT LIST_ENTRY *ListHead)
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
LIST_ENTRY *EFIAPI InsertTailList(IN OUT LIST_ENTRY *ListHead, IN OUT LIST_ENTRY *Entry)
INTN EFIAPI CompareMem(IN CONST VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
GUID *EFIAPI CopyGuid(OUT GUID *DestinationGuid, IN CONST GUID *SourceGuid)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
UINTN EFIAPI ConfirmDataChange(VOID)
UINT64 EFIAPI FormExitTimeout(IN FORM_DISPLAY_ENGINE_FORM *FormData)
VOID EFIAPI CreateDialog(OUT EFI_INPUT_KEY *Key OPTIONAL,...)
VOID EFIAPI RefreshKeyHelp(IN FORM_DISPLAY_ENGINE_FORM *FormData, IN FORM_DISPLAY_ENGINE_STATEMENT *Statement, IN BOOLEAN Selected)
UINT8 EFIAPI GetGrayedTextColor(VOID)
VOID EFIAPI ClearDisplayPage(VOID)
UINTN EFIAPI PrintStringAtWithWidth(IN UINTN Column, IN UINTN Row, IN CHAR16 *String, IN UINTN Width)
VOID EFIAPI UpdateStatusBar(IN UINTN MessageType, IN BOOLEAN State)
UINT8 EFIAPI GetSubTitleTextColor(VOID)
UINT8 EFIAPI GetArrowColor(VOID)
UINT8 EFIAPI GetFieldTextColor(VOID)
VOID EFIAPI ClearLines(IN UINTN LeftColumn, IN UINTN RightColumn, IN UINTN TopRow, IN UINTN BottomRow, IN UINTN TextAttribute)
UINT8 EFIAPI GetHelpTextColor(VOID)
UINT8 EFIAPI GetHighlightTextColor(VOID)
UINT8 EFIAPI GetInfoTextColor(VOID)
EFI_STATUS EFIAPI DisplayPageFrame(IN FORM_DISPLAY_ENGINE_FORM *FormData, OUT EFI_SCREEN_DESCRIPTOR *ScreenForStatement)
BOOLEAN EFIAPI FormExitPolicy(VOID)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
EFI_HII_HANDLE EFIAPI HiiAddPackages(IN CONST EFI_GUID *PackageListGuid, IN EFI_HANDLE DeviceHandle OPTIONAL,...)
EFI_STRING EFIAPI HiiGetString(IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID StringId, IN CONST CHAR8 *Language OPTIONAL)
VOID EFIAPI HiiRemovePackages(IN EFI_HII_HANDLE HiiHandle)
#define ARRAY_SIZE(Array)
#define ASSERT_EFI_ERROR(StatusParameter)
#define FeaturePcdGet(TokenName)
EFI_STRING_ID NewString(IN CHAR16 *String, IN EFI_HII_HANDLE HiiHandle)
EFI_SIMPLE_TEXT_INPUT_PROTOCOL * ConIn
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * ConOut