From 5e30b69eb4027f4fc6c8ef78d1961e7c78d80683 Mon Sep 17 00:00:00 2001 From: Dandan Bi Date: Tue, 9 Jun 2015 05:09:50 +0000 Subject: 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 Reviewed-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17590 6f19259b-4bc3-4df7-8a09-765794883524 --- .../CustomizedDisplayLib/CustomizedDisplayLib.inf | 5 ++-- .../CustomizedDisplayLibInternal.c | 27 +++++++++++++++++++++- 2 files changed, 29 insertions(+), 3 deletions(-) (limited to 'MdeModulePkg/Library/CustomizedDisplayLib') diff --git a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf index cdcc25610b..23528948a3 100644 --- a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf +++ b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf @@ -1,7 +1,7 @@ ## @file # Customize display library used by display engine. # -# Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -61,4 +61,5 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserSubtitleTextColor ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldTextColor ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldTextHighlightColor ## CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldBackgroundHighlightColor ## CONSUMES \ No newline at end of file + gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldBackgroundHighlightColor ## CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFrontPageFormSetGuid ## CONSUMES \ No newline at end of file diff --git a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.c b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.c index ad4bc9ac90..f9032b86de 100644 --- a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.c +++ b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.c @@ -2,7 +2,7 @@ This library class defines a set of interfaces to customize Display module -Copyright (c) 2013, Intel Corporation. All rights reserved.
+Copyright (c) 2013-2015, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at @@ -256,7 +256,32 @@ ProcessUserOpcode( IN EFI_IFR_OP_HEADER *OpCodeData ) { + EFI_GUID * ClassGuid; + UINT8 ClassGuidNum; + + ClassGuid = NULL; + ClassGuidNum = 0; + switch (OpCodeData->OpCode) { + case EFI_IFR_FORM_SET_OP: + // + // process the statement outside of form,if it is formset op, get its formsetguid or classguid and compared with gFrontPageFormSetGuid + // + if (CompareGuid((EFI_GUID*)PcdGetPtr (PcdFrontPageFormSetGuid),(EFI_GUID*)&((EFI_IFR_FORM_SET *) OpCodeData)->Guid)){ + gClassOfVfr = FORMSET_CLASS_FRONT_PAGE; + } else{ + ClassGuidNum = (UINT8)(((EFI_IFR_FORM_SET *)OpCodeData)->Flags & 0x3); + ClassGuid = (EFI_GUID *)(VOID *)((UINT8 *)OpCodeData + sizeof (EFI_IFR_FORM_SET)); + while (ClassGuidNum-- > 0){ + if (CompareGuid((EFI_GUID*)PcdGetPtr (PcdFrontPageFormSetGuid),ClassGuid)){ + gClassOfVfr = FORMSET_CLASS_FRONT_PAGE; + break; + } + ClassGuid ++; + } + } + break; + case EFI_IFR_GUID_OP: if (CompareGuid (&gEfiIfrTianoGuid, (EFI_GUID *)((CHAR8*) OpCodeData + sizeof (EFI_IFR_OP_HEADER)))) { // -- cgit v1.2.3