EDKII:Display engine should not depend on the framework code

Display engine base on class opcode to detect whether in
front page.Now remove class/subclass and use FormsetGuid
or ClassGuid to judge whether in front page

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17590 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Dandan Bi
2015-06-09 05:09:50 +00:00
committed by dandanbi
parent 9d58ab0923
commit 5e30b69eb4
7 changed files with 51 additions and 6 deletions

View File

@@ -1709,6 +1709,7 @@ ParseOpCodes (
CopyMem (&FormSet->FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, sizeof (EFI_STRING_ID));
CopyMem (&FormSet->Help, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));
FormSet->OpCode = (EFI_IFR_OP_HEADER *) OpCodeData;//save the opcode address of formset
if (OpCodeLength > OFFSET_OF (EFI_IFR_FORM_SET, Flags)) {
//

View File

@@ -545,6 +545,21 @@ AddStatementToDisplayForm (
InsertTailList(&gDisplayFormData.StatementListOSF, &DisplayStatement->DisplayLink);
}
//
// treat formset as statement outside the form,get its opcode.
//
DisplayStatement = AllocateZeroPool (sizeof (FORM_DISPLAY_ENGINE_STATEMENT));
ASSERT (DisplayStatement != NULL);
DisplayStatement->Signature = FORM_DISPLAY_ENGINE_STATEMENT_SIGNATURE;
DisplayStatement->Version = FORM_DISPLAY_ENGINE_STATEMENT_VERSION_1;
DisplayStatement->OpCode = gCurrentSelection->FormSet->OpCode;
InitializeListHead (&DisplayStatement->NestStatementList);
InitializeListHead (&DisplayStatement->OptionListHead);
InsertTailList(&gDisplayFormData.StatementListOSF, &DisplayStatement->DisplayLink);
//
// Process the statement in this form.
//

View File

@@ -454,6 +454,7 @@ typedef struct {
UINT16 Class; // Tiano extended Class code
UINT16 SubClass; // Tiano extended Subclass code
EFI_IMAGE_ID ImageId;
EFI_IFR_OP_HEADER *OpCode; //mainly for formset op to get ClassGuid
FORM_BROWSER_STATEMENT *StatementBuffer; // Buffer for all Statements and Questions
EXPRESSION_OPCODE *ExpressionBuffer; // Buffer for all Expression OpCode