From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web10.6681.1586914693205984395 for ; Tue, 14 Apr 2020 18:38:13 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: ming.tan@intel.com) IronPort-SDR: iGQj/K25gwLzHh8gKUjRC/bt7k1OP8hxMjTigbX9Wpd2VYkUuafpMz4yTPMjh+s+ByAvnAF2gJ e+jW5x90vKsA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2020 18:38:12 -0700 IronPort-SDR: XJjJ6+RbuRlWRL9sF2M0fv3wgLM9ZWGkFehjUaXGDuGmvpaU5ZVsZclMh/50QKz245VKYPlmlZ BC4EC4pbbKXw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,385,1580803200"; d="scan'208";a="453754343" Received: from shwdejointlab96.ccr.corp.intel.com ([10.239.134.52]) by fmsmga005.fm.intel.com with ESMTP; 14 Apr 2020 18:38:09 -0700 From: "Tan, Ming" To: devel@edk2.groups.io Subject: [PATCH v2] Features/Intel/UserInterface: Add VirtualKeyboardFeaturePkg Date: Wed, 15 Apr 2020 09:37:41 +0800 Message-Id: <20200415013742.14842-1-ming.tan@intel.com> X-Mailer: git-send-email 2.24.0.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2603 It add a VirtualKeyboardDxe driver. It is used with a touch panel, simulate a keyboard in the screen. Signed-off-by: Ming Tan --- .../Include/PostMemory.fdf | 10 + .../Include/PreMemory.fdf | 8 + .../Include/VirtualKeyboardFeature.dsc | 96 ++ .../VirtualKeyboardFeaturePkg/Readme.md | 97 ++ .../CapitalLetterKeyboard.bmp | Bin 0 -> 330454 bytes .../VirtualKeyboardDxe/ComponentName.c | 159 ++ .../VirtualKeyboardDxe/ComponentName.h | 95 ++ .../VirtualKeyboardDxe/DigitKeyboard.bmp | Bin 0 -> 330454 bytes .../VirtualKeyboardDxe/FullIcon.bmp | Bin 0 -> 5454 bytes .../VirtualKeyboardDxe/Keyboard.c | 1409 ++++++++++++++++ .../VirtualKeyboardDxe/KeyboardLayout.c | 1438 +++++++++++++++++ .../VirtualKeyboardDxe/KeyboardLayout.idf | 12 + .../VirtualKeyboardDxe/SimpleIcon.bmp | Bin 0 -> 2814 bytes .../VirtualKeyboardDxe/SimpleKeyboard.bmp | Bin 0 -> 30054 bytes .../VirtualKeyboardDxe/VirtualKeyboard.h | 829 ++++++++++ .../VirtualKeyboardDriver.c | 515 ++++++ .../VirtualKeyboardDxe/VirtualKeyboardDxe.inf | 78 + .../VirtualKeyboardFeaturePkg.dec | 26 + .../VirtualKeyboardFeaturePkg.dsc | 30 + 19 files changed, 4802 insertions(+) create mode 100644 Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/= Include/PostMemory.fdf create mode 100644 Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/= Include/PreMemory.fdf create mode 100644 Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/= Include/VirtualKeyboardFeature.dsc create mode 100644 Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/= Readme.md create mode 100644 Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/= VirtualKeyboardDxe/CapitalLetterKeyboard.bmp create mode 100644 Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/= VirtualKeyboardDxe/ComponentName.c create mode 100644 Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/= VirtualKeyboardDxe/ComponentName.h create mode 100644 Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/= VirtualKeyboardDxe/DigitKeyboard.bmp create mode 100644 Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/= VirtualKeyboardDxe/FullIcon.bmp create mode 100644 Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/= VirtualKeyboardDxe/Keyboard.c create mode 100644 Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/= VirtualKeyboardDxe/KeyboardLayout.c create mode 100644 Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/= VirtualKeyboardDxe/KeyboardLayout.idf create mode 100644 Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/= VirtualKeyboardDxe/SimpleIcon.bmp create mode 100644 Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/= VirtualKeyboardDxe/SimpleKeyboard.bmp create mode 100644 Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/= VirtualKeyboardDxe/VirtualKeyboard.h create mode 100644 Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/= VirtualKeyboardDxe/VirtualKeyboardDriver.c create mode 100644 Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/= VirtualKeyboardDxe/VirtualKeyboardDxe.inf create mode 100644 Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/= VirtualKeyboardFeaturePkg.dec create mode 100644 Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/= VirtualKeyboardFeaturePkg.dsc diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include= /PostMemory.fdf b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/In= clude/PostMemory.fdf new file mode 100644 index 0000000000..bf4a4d5078 --- /dev/null +++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/PostMe= mory.fdf @@ -0,0 +1,10 @@ +## @file=0D +# FDF file for post-memory modules that enable Virtual Keyboard.=0D +#=0D +# Copyright (c) 2020, Intel Corporation. All rights reserved.
=0D +#=0D +# SPDX-License-Identifier: BSD-2-Clause-Patent=0D +#=0D +##=0D +=0D + INF UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKe= yboardDxe.inf=0D diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include= /PreMemory.fdf b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Inc= lude/PreMemory.fdf new file mode 100644 index 0000000000..c39a057f94 --- /dev/null +++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/PreMem= ory.fdf @@ -0,0 +1,8 @@ +## @file=0D +# FDF file for pre-memory modules that enable Virtual Keyboard.=0D +#=0D +# Copyright (c) 2020, Intel Corporation. All rights reserved.
=0D +#=0D +# SPDX-License-Identifier: BSD-2-Clause-Patent=0D +#=0D +##=0D diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include= /VirtualKeyboardFeature.dsc b/Features/Intel/UserInterface/VirtualKeyboardF= eaturePkg/Include/VirtualKeyboardFeature.dsc new file mode 100644 index 0000000000..c10fb2d567 --- /dev/null +++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Include/Virtua= lKeyboardFeature.dsc @@ -0,0 +1,96 @@ +## @file=0D +# This is a build description file for the Virtual Keyboard feature.=0D +# This file should be included into another package DSC file to build this= feature.=0D +#=0D +# The DEC files are used by the utilities that parse DSC and=0D +# INF files to generate AutoGen.c and AutoGen.h files=0D +# for the build infrastructure.=0D +#=0D +# Copyright (c) 2020, Intel Corporation. All rights reserved.
=0D +#=0D +# SPDX-License-Identifier: BSD-2-Clause-Patent=0D +#=0D +##=0D +=0D +##########################################################################= ######=0D +#=0D +# Defines Section - statements that will be processed to create a Makefile= .=0D +#=0D +##########################################################################= ######=0D +[Defines]=0D +!ifndef $(PEI_ARCH)=0D + !error "PEI_ARCH must be specified to build this feature!"=0D +!endif=0D +!ifndef $(DXE_ARCH)=0D + !error "DXE_ARCH must be specified to build this feature!"=0D +!endif=0D +=0D +##########################################################################= ######=0D +#=0D +# Library Class section - list of all Library Classes needed by this featu= re.=0D +#=0D +##########################################################################= ######=0D +[LibraryClasses]=0D + #######################################=0D + # Edk2 Packages=0D + #######################################=0D + BaseLib|MdePkg/Library/BaseLib/BaseLib.inf=0D + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf=0D + DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf=0D + UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBoo= tServicesTableLib.inf=0D + UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntry= Point.inf=0D + UefiLib|MdePkg/Library/UefiLib/UefiLib.inf=0D + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf=0D + HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf=0D + DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf=0D + PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf=0D + UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServic= esLib.inf=0D + UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/U= efiRuntimeServicesTableLib.inf=0D +=0D +[LibraryClasses.common.UEFI_DRIVER]=0D + #######################################=0D + # Edk2 Packages=0D + #######################################=0D + MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf=0D +=0D +##########################################################################= #########################=0D +#=0D +# Components Section - list of the modules and components that will be pro= cessed by compilation=0D +# tools and the EDK II tools to generate PE32/PE32+/C= off image files.=0D +#=0D +# Note: The EDK II DSC file is not used to specify how compiled binary ima= ges get placed=0D +# into firmware volume images. This section is just a list of module= s to compile from=0D +# source into UEFI-compliant binaries.=0D +# It is the FDF file that contains information on combining binary f= iles into firmware=0D +# volume images, whose concept is beyond UEFI and is described in PI= specification.=0D +# Binary modules do not need to be listed in this section, as they s= hould be=0D +# specified in the FDF file. For example: Shell binary (Shell_Full.e= fi), FAT binary (Fat.efi),=0D +# Logo (Logo.bmp), and etc.=0D +# There may also be modules listed in this section that are not requ= ired in the FDF file,=0D +# When a module listed here is excluded from FDF file, then UEFI-com= pliant binary will be=0D +# generated for it, but the binary will not be put into any firmware= volume.=0D +#=0D +##########################################################################= #########################=0D +#=0D +# Feature DXE Components=0D +#=0D +[Components.X64]=0D + #####################################=0D + # Virtual Keyboard Feature Package=0D + #####################################=0D + UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboa= rdDxe.inf=0D +=0D +##########################################################################= #########################=0D +#=0D +# BuildOptions Section - Define the module specific tool chain flags that = should be used as=0D +# the default flags for a module. These flags are a= ppended to any=0D +# standard flags that are defined by the build proc= ess. They can be=0D +# applied for any modules or only those modules wit= h the specific=0D +# module style (EDK or EDKII) specified in [Compone= nts] section.=0D +#=0D +# For advanced features, it is recommended to enabl= e [BuildOptions] in=0D +# the applicable INF file so it does not affect the= whole board package=0D +# build when this DSC file is active.=0D +#=0D +##########################################################################= #########################=0D +[BuildOptions]=0D diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Readme.= md b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Readme.md new file mode 100644 index 0000000000..80b243feb8 --- /dev/null +++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Readme.md @@ -0,0 +1,97 @@ +# Overview=0D +* **Feature Name:** Virtual Keyboard=0D +* **PI Phase(s) Supported:** DXE=0D +* **SMM Required?** No=0D +=0D +## Purpose=0D +This feature provides a DXE virtual keyboard driver, used with a touch pan= el.=0D +=0D +# High-Level Theory of Operation=0D +This driver will use the following protocol:=0D + gEfiAbsolutePointerProtocolGuid=0D + gEfiGraphicsOutputProtocolGuid=0D + gEdkiiTouchPanelGuid=0D +=0D +It will show a picture like a keyboard in the graphic output, then detect= =0D +position when user touch the touch panel, then calculate the key which the= =0D +user want to type.=0D +=0D +## Firmware Volumes=0D +FvAdvancedUncompact=0D +FvAdvanced=0D +=0D +## Modules=0D +VirtualKeyboardDxe: The main driver of virtual keyboard=0D +=0D +## =0D +*_TODO_*=0D +Each module in the feature should have a section that describes the module= in a level of detail that is useful=0D +to better understand the module source code.=0D +=0D +## =0D +*_TODO_*=0D +Each library in the feature should have a section that describes the libra= ry in a level of detail that is useful=0D +to better understand the library source code.=0D +=0D +## Key Functions=0D +*_TODO_*=0D +A bulleted list of key functions for interacting with the feature.=0D +=0D +Not all features need to be listed. Only functions exposed through externa= l interfaces that are important for feature=0D +users to be aware of.=0D +=0D +## Configuration=0D +*_TODO_*=0D +Information that is useful for configuring the feature.=0D +=0D +Not all configuration options need to be listed. This section is used to p= rovide more background on configuration=0D +options than possible elsewhere.=0D +=0D +## Data Flows=0D +*_TODO_*=0D +Architecturally defined data structures and flows for the feature.=0D +=0D +## Control Flows=0D +*_TODO_*=0D +Key control flows for the feature.=0D +=0D +## Build Flows=0D +*_TODO_*=0D +Any special build flows should be described in this section.=0D +=0D +This is particularly useful for features that use custom build tools or re= quire non-standard tool configuration. If the=0D +standard flow in the feature package template is used, this section may be= empty.=0D +=0D +## Test Point Results=0D +*_TODO_*=0D +The test(s) that can verify porting is complete for the feature.=0D +=0D +Each feature must describe at least one test point to verify the feature i= s successful. If the test point is not=0D +implemented, this should be stated.=0D +=0D +## Functional Exit Criteria=0D +*_TODO_*=0D +The testable functionality for the feature.=0D +=0D +This section should provide an ordered list of criteria that a board integ= rator can reference to ensure the feature is=0D +functional on their board.=0D +=0D +## Feature Enabling Checklist=0D +Make sure the following protocols are supported:=0D + gEfiAbsolutePointerProtocolGuid=0D + gEfiGraphicsOutputProtocolGuid=0D + gEdkiiTouchPanelGuid=0D +=0D +## Performance Impact=0D +A general expectation for the impact on overall boot performance due to us= ing this feature.=0D +=0D +This section is expected to provide guidance on:=0D +* How to estimate performance impact due to the feature=0D +* How to measure performance impact of the feature=0D +* How to manage performance impact of the feature=0D +=0D +## Common Optimizations=0D +*_TODO_*=0D +Common size or performance tuning options for this feature.=0D +=0D +This section is recommended but not required. If not used, the contents sh= ould be left empty.=0D diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Virtual= KeyboardDxe/CapitalLetterKeyboard.bmp b/Features/Intel/UserInterface/Virtua= lKeyboardFeaturePkg/VirtualKeyboardDxe/CapitalLetterKeyboard.bmp new file mode 100644 index 0000000000000000000000000000000000000000..759c3d46a9f0cf6a69fa98563cd= 04f7a082d3b4d GIT binary patch literal 330454 zcmeI5zpw7cao(?FBtU``E>p0M1NK*`gbSt#SOkdw0sRRy;5G#XA}Z1nY7D4|3%XDn zwkD+z1_K0OWmyK;7zPUgqNK(K1CR{!=3DnT)J=3Dg!Q|&iBW8&wJjxFYJ3~_d7fL*=3DJ^V z-}gO7m;doU|J}d-7tenG`X2uO-{b%P-FKfo```HcJJ0?t{(ScAe|-D=3DuJP?3|8KpP z0!x9Vz*1l-a1jNbJ+o;({P4r?-qs5%QU$MMf!9fOTbW<0xfTVkv)UI`zdoE+FJ8RR z&nug3jI{&#?#@BrKE)IAq+nOI!0V)XLTO#7Pe_65toE%`n-161`8(hF&NORVsipx> zaUj*(Z@--`t>0j!KikuHx5Clb?2Ozns%t`tgJTva$E{*P~bYN zy-yVn&fPsz)%sM^P$xPV)$Ud6K!jR%&WWjMhq}(nYU3Yu)Eazs?9Oj49aZ)!$6sf) z_o+@S(P@7ARMSu=3DIvCX{Iv~`#b52Z6JJfYnRvZ7Q<0-}az=3DY3iTA7PfWoR3bpQ>QLUby#L-0B-`|5L z;weCC*Ho7zQ9PqMWp;#Gcg_JNH7%R$y0SKfdWy~mB!9v~*PSz})zgzYnn?Tmd+tyo1&nKLw5A6J7ufBTo%{Oaj7dbXZRCU<1o{mb?s7{#$p)T?{=3DM-2A z60=3DnI#2lUo(+}k!Bb9Tw?Pg!MTk;%j=3D-bXUR##N}h4ZUY7gXv7yMTP_t+&4X@=3DIJe z_WJtkuits+oxvsCxQ9PXR<;3x+fshq=3DY zHxG*WM2C+y^lj%Ft1GJg!l_iL3o3PkJ%V%>PUqTjkz;d2HDWloe^jDIb;?`_weFl# zl$-@|#Wkud=3DXR^jnOe8`e6*o&HOpLAQSBGbG?8EwRO$vhg-kD;>9yk`$L5GCWjMWa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lozt)O#y2xtf}Q5OPOQF^ORJ?-UxB`7QCAOr=3DOF%w)2Q5$|L9Fn zt!sDws;@xbv#6_wzH^647C4MJcAn(rPLZ9crzP-#Lg-yolipQoVTb!kzk$*aXb|o%7*`A3Eem zYy!saoJBRw!qRFg5gnFRlwxWut)>#u;mWo8;DZky@se><1LpqD!QW60S0jad6axTE zAg`T8mF8k;mCBNKF0E2o($1w-Dofh=3DRJ6iL|LC7~0ALr6+&Ol}uRoUpOM#`pQeY|Y Ka0)zo_WuC{9xg=3Dy literal 0 HcmV?d00001 diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Virtual= KeyboardDxe/ComponentName.c b/Features/Intel/UserInterface/VirtualKeyboardF= eaturePkg/VirtualKeyboardDxe/ComponentName.c new file mode 100644 index 0000000000..6ac28ab90b --- /dev/null +++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboar= dDxe/ComponentName.c @@ -0,0 +1,159 @@ +/** @file=0D + Virtual Keyboard driver name.=0D +=0D + Copyright (c) 2012 - 2020, Intel Corporation. All rights reserved.
=0D + SPDX-License-Identifier: BSD-2-Clause-Patent=0D +=0D +**/=0D +=0D +#include "VirtualKeyboard.h"=0D +=0D +//=0D +// EFI Component Name Protocol=0D +//=0D +GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gVirtualKeyboard= ComponentName =3D {=0D + VirtualKeyboardComponentNameGetDriverName,=0D + VirtualKeyboardComponentNameGetControllerName,=0D + "eng"=0D +};=0D +=0D +//=0D +// EFI Component Name 2 Protocol=0D +//=0D +GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gVirtualKeyboar= dComponentName2 =3D {=0D + (EFI_COMPONENT_NAME2_GET_DRIVER_NAME) VirtualKeyboardComponentNameGe= tDriverName,=0D + (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) VirtualKeyboardComponentNameGe= tControllerName,=0D + "en"=0D +};=0D +=0D +//=0D +// Table of driver names=0D +//=0D +GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mVirtualKeyboardDri= verNameTable[] =3D {=0D + {=0D + "eng;en",=0D + L"UEFI Virtual Keyboard Driver"=0D + },=0D + {=0D + NULL,=0D + NULL=0D + }=0D +};=0D +=0D +//=0D +// Controller name string table=0D +//=0D +GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mVirtualKeyboardCon= trollerNameStringTable[] =3D {=0D + {=0D + "eng",=0D + L"UEFI Virtual Keyboard Driver"=0D + },=0D + {=0D + NULL,=0D + NULL=0D + }=0D +};=0D +=0D +/**=0D + Retrieves a Unicode string that is the user-readable name of the EFI Dri= ver.=0D +=0D + @param[in] This A pointer to the EFI_COMPONENT_NAME_PROTOC= OL instance.=0D + @param[in] Language A pointer to a three-character ISO 639-2 l= anguage identifier.=0D + This is the language of the driver name th= at that the caller=0D + is requesting, and it must match one of th= e languages specified=0D + in SupportedLanguages. The number of lang= uages supported by a=0D + driver is up to the driver writer.=0D + @param[out] DriverName A pointer to the Unicode string to return.= This Unicode string=0D + is the name of the driver specified by Thi= s in the language=0D + specified by Language.=0D +=0D + @retval EFI_SUCCESS The Unicode string for the Driver specifie= d by This=0D + and the language specified by Language was= returned=0D + in DriverName.=0D + @retval EFI_INVALID_PARAMETER Language is NULL.=0D + @retval EFI_INVALID_PARAMETER DriverName is NULL.=0D + @retval EFI_UNSUPPORTED The driver specified by This does not supp= ort the=0D + language specified by Language.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VirtualKeyboardComponentNameGetDriverName (=0D + IN EFI_COMPONENT_NAME_PROTOCOL *This,=0D + IN CHAR8 *Language,=0D + OUT CHAR16 **DriverName=0D + )=0D +{=0D + return LookupUnicodeString2 (=0D + Language,=0D + This->SupportedLanguages,=0D + mVirtualKeyboardDriverNameTable,=0D + DriverName,=0D + (BOOLEAN)(This =3D=3D &gVirtualKeyboardComponentName)=0D + );=0D +}=0D +=0D +/**=0D + Retrieves a Unicode string that is the user readable name of the control= ler=0D + that is being managed by an EFI Driver.=0D +=0D + @param[in] This A pointer to the EFI_COMPONENT_NAME_PROTOC= OL instance.=0D + @param[in] ControllerHandle The handle of a controller that the driver= specified by=0D + This is managing. This handle specifies t= he controller=0D + whose name is to be returned.=0D + @param[in] ChildHandle The handle of the child controller to retr= ieve the name=0D + of. This is an optional parameter that ma= y be NULL. It=0D + will be NULL for device drivers. It will = also be NULL=0D + for a bus drivers that wish to retrieve th= e name of the=0D + bus controller. It will not be NULL for a= bus driver=0D + that wishes to retrieve the name of a chil= d controller.=0D + @param[in] Language A pointer to a three character ISO 639-2 l= anguage=0D + identifier. This is the language of the c= ontroller name=0D + that the caller is requesting, and it must= match one=0D + of the languages specified in SupportedLan= guages. The=0D + number of languages supported by a driver = is up to the=0D + driver writer.=0D + @param[out] ControllerName A pointer to the Unicode string to return.= This Unicode=0D + string is the name of the controller speci= fied by=0D + ControllerHandle and ChildHandle in the la= nguage specified=0D + by Language, from the point of view of the= driver specified=0D + by This.=0D +=0D + @retval EFI_SUCCESS The Unicode string for the user-readable n= ame in the=0D + language specified by Language for the dri= ver=0D + specified by This was returned in DriverNa= me.=0D + @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.=0D + @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a va= lid EFI_HANDLE.=0D + @retval EFI_INVALID_PARAMETER Language is NULL.=0D + @retval EFI_INVALID_PARAMETER ControllerName is NULL.=0D + @retval EFI_UNSUPPORTED The driver specified by This is not curren= tly managing=0D + the controller specified by ControllerHand= le and=0D + ChildHandle.=0D + @retval EFI_UNSUPPORTED The driver specified by This does not supp= ort the=0D + language specified by Language.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VirtualKeyboardComponentNameGetControllerName (=0D + IN EFI_COMPONENT_NAME_PROTOCOL *This,=0D + IN EFI_HANDLE ControllerHandle,=0D + IN EFI_HANDLE ChildHandle, OPTIONAL=0D + IN CHAR8 *Language,=0D + OUT CHAR16 **ControllerName=0D + )=0D +{=0D + //=0D + // ChildHandle must be NULL for a Device Driver=0D + //=0D + if (ChildHandle !=3D NULL) {=0D + return EFI_UNSUPPORTED;=0D + }=0D + return LookupUnicodeString2 (=0D + Language,=0D + This->SupportedLanguages,=0D + mVirtualKeyboardControllerNameStringTable,=0D + ControllerName,=0D + (BOOLEAN)(This =3D=3D &gVirtualKeyboardComponentName)=0D + );=0D +}=0D diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Virtual= KeyboardDxe/ComponentName.h b/Features/Intel/UserInterface/VirtualKeyboardF= eaturePkg/VirtualKeyboardDxe/ComponentName.h new file mode 100644 index 0000000000..327ce9f9cb --- /dev/null +++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboar= dDxe/ComponentName.h @@ -0,0 +1,95 @@ +/** @file=0D + Header file for Virtual Keyboard driver name.=0D +=0D + Copyright (c) 2012 - 2020, Intel Corporation. All rights reserved.
=0D + SPDX-License-Identifier: BSD-2-Clause-Patent=0D +=0D +**/=0D +=0D +#ifndef _VIRTUAL_KEYBOARD_COMPONENT_NAME_H_=0D +#define _VIRTUAL_KEYBOARD_COMPONENT_NAME_H_=0D +=0D +#include =0D +#include =0D +#include =0D +=0D +/**=0D + Retrieves a Unicode string that is the user-readable name of the EFI Dri= ver.=0D +=0D + @param[in] This A pointer to the EFI_COMPONENT_NAME_PROTOC= OL instance.=0D + @param[in] Language A pointer to a three-character ISO 639-2 l= anguage identifier.=0D + This is the language of the driver name th= at that the caller=0D + is requesting, and it must match one of th= e languages specified=0D + in SupportedLanguages. The number of lang= uages supported by a=0D + driver is up to the driver writer.=0D + @param[out] DriverName A pointer to the Unicode string to return.= This Unicode string=0D + is the name of the driver specified by Thi= s in the language=0D + specified by Language.=0D +=0D + @retval EFI_SUCCESS The Unicode string for the Driver specifie= d by This=0D + and the language specified by Language was= returned=0D + in DriverName.=0D + @retval EFI_INVALID_PARAMETER Language is NULL.=0D + @retval EFI_INVALID_PARAMETER DriverName is NULL.=0D + @retval EFI_UNSUPPORTED The driver specified by This does not supp= ort the=0D + language specified by Language.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VirtualKeyboardComponentNameGetDriverName (=0D + IN EFI_COMPONENT_NAME_PROTOCOL *This,=0D + IN CHAR8 *Language,=0D + OUT CHAR16 **DriverName=0D + );=0D +=0D +/**=0D + Retrieves a Unicode string that is the user readable name of the control= ler=0D + that is being managed by an EFI Driver.=0D +=0D + @param[in] This A pointer to the EFI_COMPONENT_NAME_PROTOC= OL instance.=0D + @param[in] ControllerHandle The handle of a controller that the driver= specified by=0D + This is managing. This handle specifies t= he controller=0D + whose name is to be returned.=0D + @param[in] ChildHandle The handle of the child controller to retr= ieve the name=0D + of. This is an optional parameter that ma= y be NULL. It=0D + will be NULL for device drivers. It will = also be NULL=0D + for a bus drivers that wish to retrieve th= e name of the=0D + bus controller. It will not be NULL for a= bus driver=0D + that wishes to retrieve the name of a chil= d controller.=0D + @param[in] Language A pointer to a three character ISO 639-2 l= anguage=0D + identifier. This is the language of the c= ontroller name=0D + that the caller is requesting, and it must= match one=0D + of the languages specified in SupportedLan= guages. The=0D + number of languages supported by a driver = is up to the=0D + driver writer.=0D + @param[out] ControllerName A pointer to the Unicode string to return.= This Unicode=0D + string is the name of the controller speci= fied by=0D + ControllerHandle and ChildHandle in the la= nguage specified=0D + by Language, from the point of view of the= driver specified=0D + by This.=0D +=0D + @retval EFI_SUCCESS The Unicode string for the user-readable n= ame in the=0D + language specified by Language for the dri= ver=0D + specified by This was returned in DriverNa= me.=0D + @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.=0D + @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a va= lid EFI_HANDLE.=0D + @retval EFI_INVALID_PARAMETER Language is NULL.=0D + @retval EFI_INVALID_PARAMETER ControllerName is NULL.=0D + @retval EFI_UNSUPPORTED The driver specified by This is not curren= tly managing=0D + the controller specified by ControllerHand= le and=0D + ChildHandle.=0D + @retval EFI_UNSUPPORTED The driver specified by This does not supp= ort the=0D + language specified by Language.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VirtualKeyboardComponentNameGetControllerName (=0D + IN EFI_COMPONENT_NAME_PROTOCOL *This,=0D + IN EFI_HANDLE ControllerHandle,=0D + IN EFI_HANDLE ChildHandle, OPTIONAL=0D + IN CHAR8 *Language,=0D + OUT CHAR16 **ControllerName=0D + );=0D +#endif=0D diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Virtual= KeyboardDxe/DigitKeyboard.bmp b/Features/Intel/UserInterface/VirtualKeyboar= dFeaturePkg/VirtualKeyboardDxe/DigitKeyboard.bmp new file mode 100644 index 0000000000000000000000000000000000000000..b64d62034817e7407120ee2181c= 935e07bef5a8c GIT binary patch literal 330454 zcmeHwF|TDua^71RHeg2%9gwMIknzxwG@t_+B;Y`al<6mM04EB$7&vieOuT^=3DP(MH> zASl=3DwEf~mvu!ICbgaASUK@Ok=3DL}3#x$i;9>e|#U`$C~Qy>N@B2x%b@r`eOI7x=3D(fW z*I!jvoj&)xH~;0oee&=3DA_04ymxA6b}g#Z7?-?+K?zxeNuZvF#)-rW4}@2}rBzW?$6 z=3D4Uc68JG-A1||b1Vc_P5(>#0j>^H9KgB4i@53;~xqPi~6&($1-fn!GdM3s*Z$JN7! z5AAtnk&LlS$hS2IhVv*cNK=3DFzYJtZ@bwO^OP%nsqV@CT@REv^pRryCh`ccgi&a~%vEGujuS%BR(qW~S!A-HTA2 zEIf#+wX{Y3Fg0t=3D$sA`UI%Z@UfK!|d3}fJ!(VjuID4WL0v*wVWS#yT%t7V2V@xILB z)Se6+m4RbMdj?fpMiyP2HD}hGvu@B#yq^`|oP07cjDZ!=3D{^-%87cX9X^UXKIKoo{D zs1{X~Sb5f*S#ydQJY`2F-cN~V&NUg>kAW4@{^ZG%Z@>Na(@#G=3DBdWNDEWJ8w&a656 z1#`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tao+9O-QgeAL~;;gEt>&X-3ST7ta~ZOMpRuR zCsqKe%{8axhiX4-PWgbyDF;4un(LaSuW;Lk;|+l+Z($$k7eX=3D7-l(c;0aV?%TUpAd zN2QY?@0ICOoA`I-$`!pbmf*G47du_9k{LqeFV)vTD|As=3DHXW+wNRQ^&mO}gRs zjBy%N4gi}rF<4p3dvm3UtiT6c{3@W#`q11J6{Co=3DSCavVa^Fr6{H~}hKa1p(p|ZP=3D z@~k--Pj$;q;K7}04kDZd2lb(~1ftrtfUGbMRHv;uEqYvk;6tamy4fu|I8?YDc>+}B za_n6@GJSc>KMN}2MBrCbKCYe-Rmq`xCMsL5%UBXo(}R`@%GIX~ycERM9yJG#m-TP9 z!F~zVqFPZFb{zt)?rY6~TeSaN;^a-dD>%>(BCF;06ZB71d6FkrldC)fdCefM_NY0w zCIldf$|@g02CCbd^Y+_s2iQ-131G<9X;7*1@L3IhRv*ip7*&$M*Bn>~J}sO=3D_3+`tBa|9q0GPX)^X%EP7WUKk0}N}~Q(G@0F zU5cb|aIT&{eR`al12A_r2mb|gD2*cWECK+?fhs!_Rn-@ht12zk&dF7kmTKqZs!B_> l^HR7%ra${>2LM=3DbOwD1ApFbx9lYz;=3DWMDF|9|Jcx{~rV^Pj3JK literal 0 HcmV?d00001 diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Virtual= KeyboardDxe/FullIcon.bmp b/Features/Intel/UserInterface/VirtualKeyboardFeat= urePkg/VirtualKeyboardDxe/FullIcon.bmp new file mode 100644 index 0000000000000000000000000000000000000000..b940505c8bc74ad6550bc322629= d7975c1e1c1fc GIT binary patch literal 5454 zcmdUyTS!(}6o56!L@l#1k<1H~<*msK=3DEYIGfJHUFgo!=3D$AR-O~g3Ln$_Tv5C7@{FW zuaziT6L~3b87f|a5!5uTbW}2D5<@ff*ZKTcvp6&*5#z(Z`TxV--&uR@b@o|%t#u-Q zirH&rZa;AK<^LmpPyW_cZd|Rb+&wdS8R##V7QBl$KC>^RJ%0hvQTJfsOsFMO;BsL#Bc+kVc!`)T3UMd?j1wg!omWC#w~`ctE&(Mwy2?ed3l+I z(9eooA!}=3DE5V1`y85$b0#P}@x{Fk}?ZEkdDXJ>gplgWhtz!<)L`xf%y!v{{T5P2hW zb93BNlHq>@sNRc zcW<~^OiawqojboXH;fq@8{?$x*|P_=3Detv!kG&D5G6vWP+JqzLViCT`^qeqV*iHV8G zh&^&eA4+&A%_;b~o=3DrNWMV^-|sqoaPQ>eOg=3DZ+Grg~Y|hDe3L)g%}S$PWa-*i*4Js zi40~VK%Jvg$RLo+%uFR>vr(nRhmNC+sL@6FBM-=3D9}Th`=3D{|eSMD}J$m@?VL5SB9aK{g>XWpzG?ZVye3?E3{`Bcn zNJ2uwkt0Vq#Wcdgt5>f$-~j;vsKsp%XlZF7Pca3tix)3K%FD}{&f+AF_V#v2YHBJn zVvk(Wh7v*tHK#?!XA7+P>zg-nI@L&PYb!N2hngXN$Qy*v=3Ds3EwH-R`XxEas^eTrKPI;{{8!qpr9ZnQr?h2l^{Sy(4iz&W2}~% zKQb~>Wu)fU@V-fWMmgVBn|!By$>w9nj_Gn@Gx=3DA^SK4e$N&n+_%GcZc4g36Gn?JkH z)JPOL#tkth0ytY#RaK<|1W!moL4gwPLX1VrXZ?A4dRnJQF<|^OCWE8o`0?W^Be7bC zbT|?CbA8K3+_-V$2JTc+Qj(LC!;lK|w}0EUYu6y0N^a55&(G)JL->fu%gckXmPC@9 zH*Xdf7emNv;v1p^wPFv|JGT&^kmF+wC2USsRu+U4EuL`e)~%wVA_yD{kzt4)l+dAo p86F=0D + SPDX-License-Identifier: BSD-2-Clause-Patent=0D +=0D +**/=0D +=0D +#include "VirtualKeyboard.h"=0D +=0D +/**=0D + Notify all keyboards pressed specific key need to hidden Virtual=0D + Keyboard.=0D +=0D + @param[in] KeyData Keyboard pressed specific key data=0D +=0D + @retval EFI_SUCCESS Success for the function.=0D + @retval EFI_NOT_FOUND Not found Virtual Keyboard protocol.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VkNotifyKeyCallback (=0D + IN EFI_KEY_DATA *KeyData=0D + )=0D +{=0D + EFI_STATUS Status;=0D + VK_CONTEXT *VkContext;=0D + UINTN MaxColumn;=0D + UINTN MaxRow;=0D + UINT32 HorizontalPixel;=0D + UINT32 VerticalPixel;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkNotifyKeyCallback Start\n"));=0D +=0D + Status =3D gBS->LocateProtocol (&gEfiCallerIdGuid, NULL, (VOID **) &VkCo= ntext);=0D + if (EFI_ERROR (Status)) {=0D + return Status;=0D + }=0D +=0D + gST->ConOut->QueryMode (=0D + gST->ConOut,=0D + gST->ConOut->Mode->Mode,=0D + &MaxColumn,=0D + &MaxRow=0D + );=0D + HorizontalPixel =3D VkContext->GraphicsOutput->Mode->Info->HorizontalRes= olution;=0D + VerticalPixel =3D VkContext->GraphicsOutput->Mode->Info->VerticalResol= ution;=0D +=0D + //=0D + // CursorRow and CursorColumn are started from 0, so need to add 2 not 1= .=0D + //=0D + if (((UINTN)(gST->ConOut->Mode->CursorColumn * EFI_GLYPH_WIDTH) < VkCont= ext->SimIconBackWidth) &&=0D + ((UINTN)((gST->ConOut->Mode->CursorRow + 2) * EFI_GLYPH_HEIGHT) > (V= erticalPixel - VkContext->SimIconBackHeight))) {=0D + SaveVkIconBackgroundBltBuffer (VkContext, VkDisplayAttributeSimpleBott= om);=0D + } else if (((UINTN)((gST->ConOut->Mode->CursorColumn + 2) * EFI_GLYPH_WI= DTH) > (HorizontalPixel - VkContext->FullIconBackWidth)) &&=0D + ((UINTN)((gST->ConOut->Mode->CursorRow + 2) * EFI_GLYPH_HEIGH= T) > (VerticalPixel - VkContext->FullIconBackHeight))){=0D + SaveVkIconBackgroundBltBuffer (VkContext, VkDisplayAttributeFullBottom= );=0D + }=0D +=0D + //=0D + // Hide icon/keyboard to prevent screen scroll up.=0D + //=0D + if ((KeyData->Key.UnicodeChar =3D=3D CHAR_CARRIAGE_RETURN) ||= =0D + (KeyData->Key.ScanCode =3D=3D SCAN_ESC) ||= =0D + ((gST->ConOut->Mode->CursorColumn >=3D (INT32) (MaxColumn - 2)) &&=0D + (gST->ConOut->Mode->CursorRow =3D=3D (INT32) (MaxRow - 1)))) {=0D + HideVkBody (VkContext);=0D + HideVkIcon (VkContext);=0D + VkContext->IconReDrawCheck =3D 0;=0D + }=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkNotifyKeyCallback End\n"));=0D + return EFI_SUCCESS;=0D +}=0D +=0D +/**=0D + Judge whether is a registed key.=0D +=0D + @param[in] RegsiteredData A pointer to a buffer that is filled in with= the keystroke=0D + state data for the key that was registered.= =0D + @param[in] InputData A pointer to a buffer that is filled in with= the keystroke=0D + state data for the key that was pressed.=0D +=0D + @retval TRUE Key be pressed matches a registered key.=0D + @retval FLASE Match failed.=0D +=0D +**/=0D +BOOLEAN=0D +IsKeyRegistered (=0D + IN EFI_KEY_DATA *RegsiteredData,=0D + IN EFI_KEY_DATA *InputData=0D + )=0D +{=0D + ASSERT (RegsiteredData !=3D NULL && InputData !=3D NULL);=0D +=0D + if ((RegsiteredData->Key.ScanCode !=3D InputData->Key.ScanCode) ||=0D + (RegsiteredData->Key.UnicodeChar !=3D InputData->Key.UnicodeChar)) {= =0D + return FALSE;=0D + }=0D +=0D + //=0D + // Assume KeyShiftState/KeyToggleState =3D 0 in Registered key data mean= s these state could be ignored.=0D + //=0D + if (RegsiteredData->KeyState.KeyShiftState !=3D 0 &&=0D + RegsiteredData->KeyState.KeyShiftState !=3D InputData->KeyState.KeyS= hiftState) {=0D + return FALSE;=0D + }=0D + if (RegsiteredData->KeyState.KeyToggleState !=3D 0 &&=0D + RegsiteredData->KeyState.KeyToggleState !=3D InputData->KeyState.Key= ToggleState) {=0D + return FALSE;=0D + }=0D +=0D + return TRUE;=0D +}=0D +=0D +/**=0D + Pop the key from the keybuffer.=0D +=0D + @param[in, out] VkContext Address of an VK_CONTEXT structure.=0D + @param[out] KeyData The EFI stand key infomation when code get = the key will put=0D + correct mapping key.=0D +=0D + @retval EFI_SUCCESS The keystroke information was returned.=0D + @retval EFI_NOT_READY The keystroke data is empty.=0D +=0D +**/=0D +EFI_STATUS=0D +VkPopTheKey (=0D + IN OUT VK_CONTEXT *VkContext,=0D + OUT EFI_KEY_DATA *KeyData OPTIONAL=0D + )=0D +{=0D + EFI_STATUS Status;=0D + UINT8 IndexSt;=0D + UINT8 IndexEd;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkPopTheKey Start\n"));=0D + //=0D + // KeyBuffer=0D + // [ 0 ]=0D + // [ 1 ]<-*IndexSt/IndexEd=0D + // [ 2 ]=0D + // [ ... ]=0D + // [MAX_KEY_BUF_SIZE - 1]=0D + //=0D + Status =3D EFI_SUCCESS;=0D + IndexSt =3D VkContext->KeyStartIndex;=0D + IndexEd =3D VkContext->KeyEndIndex;=0D +=0D + if (IndexEd =3D=3D IndexSt) {=0D + DEBUG ((DEBUG_VK_KEYS, "ERROR - Keyboard buffer is empty.\n"));=0D + Status =3D EFI_NOT_READY;=0D + goto Error;=0D + }=0D +=0D + DEBUG ((DEBUG_VK_KEYS | DEBUG_INFO, "VkPopTheKey Unicode: %08x\n", Vk= Context->Keybuffer[IndexSt].Key.UnicodeChar));=0D + DEBUG ((DEBUG_VK_KEYS | DEBUG_INFO, "VkPopTheKey ScanCode: %08x\n", Vk= Context->Keybuffer[IndexSt].Key.ScanCode));=0D + DEBUG ((DEBUG_VK_KEYS | DEBUG_INFO, "VkPopTheKey ShiftState: %08x\n", Vk= Context->Keybuffer[IndexSt].KeyState.KeyShiftState));=0D + DEBUG ((DEBUG_VK_KEYS | DEBUG_INFO, "VkPopTheKey ToggleState:%08x\n", Vk= Context->Keybuffer[IndexSt].KeyState.KeyToggleState));=0D +=0D + if (KeyData !=3D NULL) {=0D + *KeyData =3D VkContext->Keybuffer[IndexSt];=0D + }=0D + VkContext->KeyStartIndex =3D ++IndexSt % MAX_KEY_BUF_SIZE;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkPopTheKey Success, Status: %r\n"= , Status));=0D + goto End;=0D +=0D +Error:=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkPopTheKey Failed, Status: %r\n",= Status));=0D +=0D +End:=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkPopTheKey End\n"));=0D + return Status;=0D +}=0D +=0D +/**=0D + Push the event mapping key index to the input key buffer.=0D +=0D + @param[in, out] VkContext Address of an VK_CONTEXT structure.=0D + @param[in] Unicode The font's unicode number.=0D +=0D + @retval EFI_SUCCESS The maping key index did put the key buffer= .=0D +=0D +**/=0D +EFI_STATUS=0D +VkPushTheKey (=0D + IN OUT VK_CONTEXT *VkContext,=0D + IN UINT16 Unicode=0D + )=0D +{=0D + UINT8 IndexSt;=0D + UINT8 IndexEd;=0D + EFI_KEY_DATA KeyData;=0D + EFI_STATUS Status;=0D + LIST_ENTRY *Link;=0D + VK_NOTIFY *CurrentNotify;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkPushTheKey Start\n"));=0D + //=0D + // KeyBuffer=0D + // [ 0 ]=0D + // [ 1 ]<-IndexSt/*IndexEd=0D + // [ 2 ]=0D + // [ ... ]=0D + // [MAX_KEY_BUF_SIZE - 1]=0D + //=0D + IndexSt =3D VkContext->KeyStartIndex;=0D + IndexEd =3D VkContext->KeyEndIndex;=0D +=0D + Status =3D EFI_SUCCESS;=0D +=0D + //=0D + // Check Keyboard Buffer if is full that will pop the first key=0D + //=0D + if (VkContext->IsSupportPartialKey &&=0D + ((VkContext->KeyEndIndex + 2) % MAX_KEY_BUF_SIZE) =3D=3D IndexSt) {=0D + VkPopTheKey (VkContext, NULL);=0D + }=0D +=0D + if (((VkContext->KeyEndIndex + 1) % MAX_KEY_BUF_SIZE) =3D=3D IndexSt) {= =0D + VkPopTheKey (VkContext, NULL);=0D + }=0D +=0D + KeyData.Key.ScanCode =3D SCAN_NULL;=0D + KeyData.Key.UnicodeChar =3D CHAR_NULL;=0D + KeyData.KeyState.KeyShiftState =3D EFI_SHIFT_STATE_VALID;=0D + KeyData.KeyState.KeyToggleState =3D VkContext->KeyToggleState;=0D + KeyData.KeyState.KeyToggleState &=3D ~EFI_CAPS_LOCK_ACTIVE;=0D + KeyData.KeyState.KeyToggleState |=3D VkContext->IsCapsLockFlag ? EFI_CAP= S_LOCK_ACTIVE : 0;=0D +=0D + switch (Unicode) {=0D + case VkKeyShift:=0D + VkContext->IsShiftKeyFlag =3D !VkContext->IsShiftKeyFlag;=0D + if (VkContext->PageNumber >=3D VkPage2 && VkContext->PageNumber <=3D V= kPage3) {=0D + VkContext->IsShiftKeyFlag ? VkContext->PageNumber++ : VkContext->Pag= eNumber--;=0D + }=0D + VkContext->IsRedrawUpdateUI =3D TRUE;=0D + break;=0D +=0D + case VkKeyTwoPage:=0D + switch (VkContext->PageNumber) {=0D + case VkPage0:=0D + case VkPage1:=0D + VkContext->IsShiftKeyFlag =3D FALSE;=0D + VkContext->PageNumber =3D VkContext->IsShiftKeyFlag ? VkPage3 : = VkPage2;=0D + break;=0D +=0D + case VkPage2:=0D + case VkPage3:=0D + VkContext->IsShiftKeyFlag =3D FALSE;=0D + VkContext->PageNumber =3D VkContext->IsCapsLockFlag ? VkPage1 : = VkPage0;=0D + break;=0D +=0D + default:=0D + break;=0D + }=0D + VkContext->IsRedrawUpdateUI =3D TRUE;=0D + break;=0D +=0D + case VkKeyCapslock:=0D + VkContext->IsCapsLockFlag =3D !VkContext->IsCapsLockFlag;=0D + if (VkContext->PageNumber >=3D VkPage0 && VkContext->PageNumber <=3D V= kPage1) {=0D + VkContext->IsCapsLockFlag ? VkContext->PageNumber++ : VkContext->Pag= eNumber--;=0D + }=0D + KeyData.KeyState.KeyToggleState &=3D ~EFI_CAPS_LOCK_ACTIVE;=0D + KeyData.KeyState.KeyToggleState |=3D VkContext->IsCapsLockFlag ? EFI_C= APS_LOCK_ACTIVE : 0;=0D + VkContext->IsRedrawUpdateUI =3D TRUE;=0D + break;=0D +=0D + default:=0D + if ((Unicode & VkKeyScanMask) !=3D 0) {=0D + KeyData.Key.ScanCode =3D Unicode & ~VkKeyScanMask;=0D + } else {=0D + KeyData.Key.UnicodeChar =3D Unicode;=0D + }=0D + break;=0D + }=0D +=0D + if (KeyData.Key.ScanCode =3D=3D SCAN_NULL && KeyData.Key.UnicodeChar =3D= =3D CHAR_NULL) {=0D + if (!VkContext->IsSupportPartialKey) {=0D + goto End;=0D + }=0D + }=0D +=0D + for (Link =3D GetFirstNode (&VkContext->NotifyList); !IsNull (&VkContext= ->NotifyList, Link); Link =3D GetNextNode (&VkContext->NotifyList, Link)) {= =0D + CurrentNotify =3D CR (Link, VK_NOTIFY, NotifyEntry, VK_NOTIFY_SIGNATUR= E);=0D + //=0D + // The key notification function needs to run at TPL_CALLBACK=0D + // while current TPL is TPL_NOTIFY. It will be invoked in=0D + // VkKeyNotifyProcessHandler() which runs at TPL_CALLBACK.=0D + //=0D + if (IsKeyRegistered (&CurrentNotify->KeyData, &KeyData)) {=0D + VkContext->Keybuffer[IndexEd] =3D KeyData;=0D + VkContext->KeyEndIndex =3D ++IndexEd % MAX_KEY_BUF_SIZE;=0D + gBS->SignalEvent (VkContext->KeyNotifyProcessEvent);=0D + }=0D + }=0D + VkContext->Keybuffer[IndexEd] =3D KeyData;=0D + VkContext->KeyEndIndex =3D ++IndexEd % MAX_KEY_BUF_SIZE;=0D +=0D + DEBUG ((DEBUG_VK_TIMER_ENTRY_EXIT, "VkPushTheKey Success, Status: %r\n",= Status));=0D + goto End;=0D +=0D +End:=0D + DEBUG ((DEBUG_VK_TIMER_ENTRY_EXIT, "VkPushTheKey End\n"));=0D + return Status;=0D +}=0D +=0D +/**=0D + Process key notify.=0D +=0D + @param[in] Event Indicates the event that invoke this fu= nction.=0D + @param[in] Context Indicates the calling context.=0D +=0D +**/=0D +VOID=0D +EFIAPI=0D +VkKeyNotifyProcessHandler (=0D + IN EFI_EVENT Event,=0D + IN VOID *Context=0D + )=0D +{=0D + EFI_STATUS Status;=0D + VK_CONTEXT *VkContext;=0D + EFI_KEY_DATA KeyData;=0D + LIST_ENTRY *Link;=0D + LIST_ENTRY *NotifyList;=0D + VK_NOTIFY *CurrentNotify;=0D + EFI_TPL OldTpl;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyNotifyProcessHandler Start\n"= ));=0D + VkContext =3D (VK_CONTEXT *) Context;=0D + OldTpl =3D gBS->RaiseTPL (TPL_NOTIFY);=0D +=0D + //=0D + // Invoke notification functions.=0D + //=0D + NotifyList =3D &VkContext->NotifyList;=0D + Status =3D VkPopTheKey (VkContext, &KeyData);=0D + if (EFI_ERROR (Status)) {=0D + goto Error;=0D + }=0D +=0D + for (Link =3D GetFirstNode (NotifyList); !IsNull (NotifyList, Link); Lin= k =3D GetNextNode (NotifyList, Link)) {=0D + CurrentNotify =3D CR (Link, VK_NOTIFY, NotifyEntry, VK_NOTIFY_SIGNATUR= E);=0D + if (IsKeyRegistered (&CurrentNotify->KeyData, &KeyData)) {=0D + CurrentNotify->KeyNotificationFn (&KeyData);=0D + }=0D + }=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyNotifyProcessHandler Success,= Status: %r\n", Status));=0D + goto End;=0D +=0D +Error:=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyNotifyProcessHandler Failed, = Status: %r\n", Status));=0D +=0D +End:=0D + gBS->RestoreTPL (OldTpl);=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyNotifyProcessHandler End\n"))= ;=0D +}=0D +=0D +/**=0D + Push the event mapping key index to the input key buffer.=0D +=0D + @param[in] VkContext Address of an VK_CONTEXT structure.=0D + @param[out] KeyItem Key Item.=0D + @param[out] Index Index of Key Item.=0D + @param[in] TouchX X position of finger touch.=0D + @param[in] TouchY Y position of finger touch.=0D +=0D + @retval TRUE Touch on Virtual Keyboard.=0D + @retval FALSE Not touch on Virtual Keyboard.=0D +=0D +**/=0D +BOOLEAN=0D +IsTouchVk (=0D + IN VK_CONTEXT *VkContext,=0D + OUT VK_STRUCT *KeyItem,=0D + OUT UINT32 *Index,=0D + IN UINT32 TouchX,=0D + IN UINT32 TouchY=0D + )=0D +{=0D + for (*Index =3D 0; *Index < VkContext->NumOfKeysInfo; (*Index)++) {=0D + if (VkContext->KeyboardBodyPtr[*Index].DisStartX < TouchX &&=0D + VkContext->KeyboardBodyPtr[*Index].DisEndX > TouchX &&=0D + VkContext->KeyboardBodyPtr[*Index].DisStartY < TouchY &&=0D + VkContext->KeyboardBodyPtr[*Index].DisEndY > TouchY) {=0D + break;=0D + }=0D + }=0D + if (*Index !=3D VkContext->NumOfKeysInfo) {=0D + *KeyItem =3D VkContext->KeyboardBodyPtr[*Index];=0D + }=0D +=0D + return *Index !=3D VkContext->NumOfKeysInfo;=0D +}=0D +=0D +/**=0D + Call back function when ready to boot into OS.=0D +=0D + It will clear the Virtual Keyboard.=0D +=0D + @param[in] Event Event whose notification function is being invoked.= =0D + @param[in] Context Pointer to the VkContext.=0D +=0D +**/=0D +VOID=0D +EFIAPI=0D +VkReadyToBootCallBack (=0D + IN EFI_EVENT Event,=0D + IN VOID *Context=0D + )=0D +{=0D + VK_CONTEXT *VkContext;=0D + VkContext =3D (VK_CONTEXT *)Context;=0D +=0D + HideVkBody (VkContext);=0D + VkContext->TargetKeyboardDisplay =3D VkDisplayAttributeNone;=0D +}=0D +=0D +/**=0D + Timer event=0D +=0D + This routine is called at TPL_VK_SYNC.=0D +=0D + This routine polls for touch panel input.=0D +=0D + @param[in] Event Event whose notification function is being invoked.= =0D + @param[in] Context Pointer to the notification function's context,=0D + which is implementation-dependent. Context correspon= ds=0D + to NotifyContext in CreateEventEx().=0D +=0D +**/=0D +VOID=0D +EFIAPI=0D +VkTimer (=0D + IN EFI_EVENT Event,=0D + IN VOID *Context=0D + )=0D +{=0D + EFI_ABSOLUTE_POINTER_PROTOCOL *AbsolutePointer;=0D + EFI_ABSOLUTE_POINTER_STATE Point;=0D + EFI_STATUS Status;=0D + UINT32 TouchX;=0D + UINT32 TouchY;=0D + VK_CONTEXT *VkContext;=0D + UINT32 Index;=0D + VK_STRUCT KeyItem;=0D + UINT32 Font;=0D +=0D + DEBUG ((DEBUG_VK_TIMER_ENTRY_EXIT, "VkTimer Start\n"));=0D + VkContext =3D (VK_CONTEXT *)Context;=0D +=0D + //=0D + // Update keyboard UI layout=0D + //=0D + CheckIconCleared (VkContext);=0D + CheckScreenCleared (VkContext);=0D + CheckBackgroundChanged (VkContext);=0D + if (VkContext->IsRedrawUpdateUI) {=0D + HideVkBody (VkContext);=0D + DrawKeyboardLayout (VkContext);=0D + VkContext->IsRedrawUpdateUI =3D FALSE;=0D + }=0D +=0D + //=0D + // Error handle for invalid information=0D + //=0D + AbsolutePointer =3D VkContext->AbsolutePointer;=0D + Status =3D gBS->CheckEvent (AbsolutePointer->WaitForInput);=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_TIMER_ENTRY_EXIT | DEBUG_VK_POINTS, "ERROR - VkContex= t->AbsolutePointer->WaitForInput->CheckEvent failed! Status: %r\n", Status)= );=0D + goto Error;=0D + }=0D +=0D + Status =3D AbsolutePointer->GetState (AbsolutePointer, &Point);=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_TIMER_ENTRY_EXIT | DEBUG_VK_POINTS, "ERROR - GetState= failed, Status: %r\n", Status));=0D + goto Error;=0D + }=0D +=0D + if (VkContext->AbsolutePointer->Mode->AbsoluteMaxX <=3D Point.CurrentX) = {=0D + DEBUG ((=0D + DEBUG_VK_TIMER_ENTRY_EXIT | DEBUG_VK_POINTS,=0D + "ERROR - X value exceeds maximum: X: 0x%016Lx, MaxX: 0x%016Lx\n",=0D + Point.CurrentX,=0D + VkContext->AbsolutePointer->Mode->AbsoluteMaxX=0D + ));=0D + Status =3D EFI_PROTOCOL_ERROR;=0D + goto Error;=0D + }=0D + if (VkContext->AbsolutePointer->Mode->AbsoluteMaxY <=3D Point.CurrentY) = {=0D + DEBUG ((=0D + DEBUG_VK_TIMER_ENTRY_EXIT | DEBUG_VK_POINTS,=0D + "ERROR - Y value exceeds maximum: Y: 0x%016Lx, MaxY: 0x%016Lx\n",=0D + Point.CurrentY,=0D + VkContext->AbsolutePointer->Mode->AbsoluteMaxY=0D + ));=0D + Status =3D EFI_PROTOCOL_ERROR;=0D + goto Error;=0D + }=0D +=0D + //=0D + // Update the touch active status=0D + //=0D + VkContext->TouchActive =3D ((Point.ActiveButtons & EFI_ABSP_TouchActive)= !=3D 0) ? TRUE : FALSE;=0D + if (!VkContext->TouchActive) {=0D + VkContext->KeyPressed =3D FALSE;=0D + }=0D + ConvertCoordinate (VkContext, Point, &TouchX, &TouchY);=0D +=0D + if (!VkContext->KeyPressed &&=0D + VkContext->TouchActive &&=0D + IsTouchVk (VkContext, &KeyItem, &Index, TouchX, TouchY)) {=0D + VkGetMappingFont (VkContext, KeyItem, &Font);=0D + DEBUG ((DEBUG_VK_TIMER_ENTRY_EXIT | DEBUG_INFO, "VK = Touch event is trigger!\n" ));=0D + DEBUG ((DEBUG_VK_TIMER_ENTRY_EXIT | DEBUG_INFO | DEBUG_VK_POINTS, "Tou= chActive: 0x%04x \n", VkContext->TouchActive));=0D + DEBUG ((DEBUG_VK_TIMER_ENTRY_EXIT | DEBUG_INFO | DEBUG_VK_POINTS, "Cur= rentKeyboardDisplay: 0x%04x \n", VkContext->CurrentKeyboardDisplay));=0D + DEBUG ((DEBUG_VK_TIMER_ENTRY_EXIT | DEBUG_INFO | DEBUG_VK_POINTS, "X: = 0x%016Lx\n", Point.CurrentX));=0D + DEBUG ((DEBUG_VK_TIMER_ENTRY_EXIT | DEBUG_INFO | DEBUG_VK_POINTS, "Y: = 0x%016Lx\n", Point.CurrentY));=0D + DEBUG ((DEBUG_VK_TIMER_ENTRY_EXIT | DEBUG_INFO | DEBUG_VK_POINTS, "Z: = 0x%016Lx\n", Point.CurrentZ));=0D + DEBUG ((DEBUG_VK_TIMER_ENTRY_EXIT | DEBUG_INFO | DEBUG_VK_POINTS, "But= tons: 0x%08x \n", Point.ActiveButtons));=0D + DEBUG ((DEBUG_VK_TIMER_ENTRY_EXIT | DEBUG_INFO | DEBUG_VK_POINTS, "Map= Key Index: 0x%04x \n", Index));=0D + DEBUG ((DEBUG_VK_TIMER_ENTRY_EXIT | DEBUG_INFO | DEBUG_VK_POINTS, "Key= Unicode: 0x%08x \n", Font));=0D +=0D + switch (Font) {=0D + //=0D + // Touch the small keyboard icon, show/hide the keyboard.=0D + //=0D + case VkKeyTypeMaximum:=0D + KeyboardLayoutHandler (VkContext, Index);=0D + break;=0D +=0D + //=0D + // Touch the key raw.=0D + //=0D + default:=0D + if (VkContext->CurrentKeyboardDisplay =3D=3D VkDisplayAttributeNone)= {=0D + break;=0D + }=0D + VkPushTheKey (VkContext, (UINT16) Font);=0D + }=0D + VkContext->KeyPressed =3D TRUE;=0D + }=0D +=0D + DEBUG ((DEBUG_VK_TIMER_ENTRY_EXIT, "VkTimer Success, Status: %r\n", Stat= us));=0D + goto End;=0D +=0D +Error:=0D + DEBUG ((DEBUG_VK_TIMER_ENTRY_EXIT, "VkTimer Failed, Status: %r\n", Statu= s));=0D +=0D +End:=0D + DEBUG ((DEBUG_VK_TIMER_ENTRY_EXIT, "VkTimer End\n"));=0D + return;=0D +}=0D +=0D +/**=0D + VkTouchWaitForKey - SignalEvent when the keybuffer has keys.=0D +=0D + @param[in] Event Event whose notification function is being invoked.= =0D + @param[in] Context Pointer to the notification function's context,=0D + which is implementation-dependent. Context correspo= nds=0D + to NotifyContext in CreateEventEx().=0D +=0D +**/=0D +VOID=0D +EFIAPI=0D +VkTouchWaitForKey (=0D + IN EFI_EVENT Event,=0D + IN VOID *Context=0D + )=0D +{=0D + VK_CONTEXT *VkContext;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkTouchWaitForKey Start\n"));=0D + VkContext =3D (VK_CONTEXT*) Context;=0D +=0D + if (VkContext->KeyStartIndex !=3D VkContext->KeyEndIndex) {=0D + DEBUG ((DEBUG_VK_KEYS, "Signal VkTouchWaitForKey\n"));=0D + gBS->SignalEvent (Event);=0D + }=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkTouchWaitForKey End\n"));=0D +}=0D +=0D +/**=0D + Get image file data from BIOS image through specific ImageId.=0D +=0D + @param[in] VkContext Address of an VK_CONTEXT structure.=0D + @param[in] ImageId Guid to get specific image file used.=0D +=0D + @retval EFI_IMAGE_INPUT Image data on BIOS image.=0D +=0D +**/=0D +EFI_IMAGE_INPUT*=0D +VkGetImage (=0D + IN VK_CONTEXT *VkContext,=0D + IN EFI_IMAGE_ID ImageId=0D + )=0D +{=0D + EFI_STATUS Status;=0D + EFI_IMAGE_INPUT Image;=0D + EFI_IMAGE_INPUT *VkImage;=0D +=0D +=0D + Status =3D VkContext->HiiImageEx->GetImageEx (=0D + VkContext->HiiImageEx,=0D + VkContext->HiiHandle,=0D + ImageId,=0D + &Image=0D + );=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + }=0D +=0D + VkImage =3D AllocateCopyPool (sizeof (EFI_IMAGE_INPUT), &Image);=0D + if (VkImage =3D=3D NULL) {=0D + ASSERT_EFI_ERROR (EFI_OUT_OF_RESOURCES);=0D + return NULL;=0D + }=0D +=0D + return VkImage;=0D +}=0D +=0D +/**=0D + Dump partial debug message on VkContext.=0D +=0D + @param[in] VkContext Address of an VK_CONTEXT structure.=0D +=0D +**/=0D +VOID=0D +VkDumpContext (=0D + IN VK_CONTEXT *VkContext=0D + )=0D +{=0D + DEBUG ((=0D + DEBUG_VK_ROUTINE_ENTRY_EXIT,=0D + "VkContext->Signature: 0x%016x\n",=0D + VkContext->Signature=0D + ));=0D + DEBUG ((=0D + DEBUG_VK_ROUTINE_ENTRY_EXIT,=0D + "VkContext->Controller: 0x%016x\n",=0D + VkContext->Controller=0D + ));=0D + DEBUG ((=0D + DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_VK_GRAPHICS_INFO,=0D + "VkContext->GraphicsOutput->Mode->MaxMode: 0x%08x\n",=0D + VkContext->GraphicsOutput->Mode->MaxMode=0D + ));=0D + DEBUG ((=0D + DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_VK_GRAPHICS_INFO,=0D + "VkContext->GraphicsOutput->Mode->Mode: 0x%08x\n",=0D + VkContext->GraphicsOutput->Mode->Mode=0D + ));=0D + DEBUG ((=0D + DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_VK_GRAPHICS_INFO,=0D + "VkContext->GraphicsOutput->Mode->Info->HorizontalResolution: 0x%08x\n= ",=0D + VkContext->GraphicsOutput->Mode->Info->HorizontalResolution=0D + ));=0D + DEBUG ((=0D + DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_VK_GRAPHICS_INFO,=0D + "VkContext->GraphicsOutput->Mode->Info->VerticalResolution: 0x%08x\n",= =0D + VkContext->GraphicsOutput->Mode->Info->VerticalResolution=0D + ));=0D + DEBUG ((=0D + DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_VK_POINTS,=0D + "VkContext->AbsolutePointer->Mode X: 0x%016Lx - 0x%016Lx\n",=0D + VkContext->AbsolutePointer->Mode->AbsoluteMinX,=0D + VkContext->AbsolutePointer->Mode->AbsoluteMaxX=0D + ));=0D + DEBUG ((=0D + DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_VK_POINTS,=0D + "VkContext->AbsolutePointer->Mode Y: 0x%016Lx - 0x%016Lx\n",=0D + VkContext->AbsolutePointer->Mode->AbsoluteMinY,=0D + VkContext->AbsolutePointer->Mode->AbsoluteMaxY=0D + ));=0D + DEBUG ((=0D + DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_VK_POINTS,=0D + "VkContext->AbsolutePointer->Mode Z: 0x%016Lx - 0x%016Lx\n",=0D + VkContext->AbsolutePointer->Mode->AbsoluteMinZ,=0D + VkContext->AbsolutePointer->Mode->AbsoluteMaxZ=0D + ));=0D + DEBUG ((=0D + DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_VK_POINTS,=0D + "VkContext->AbsolutePointer->Mode->Attributes: 0x%08x\n",=0D + VkContext->AbsolutePointer->Mode->Attributes=0D + ));=0D +}=0D +=0D +/**=0D + Start the virtual keyboard driver=0D +=0D + This routine allocates the necessary resources for the driver.=0D +=0D + This routine is called by VirtualKeyboardDriverStart to complete the dri= ver=0D + initialization.=0D +=0D + @param[in, out] VkContext Address of an VK_CONTEXT structure=0D + @param[in] Controller Handle of device to work with.=0D +=0D + @retval EFI_SUCCESS Driver API properly initialized=0D +=0D +**/=0D +EFI_STATUS=0D +VkApiStart (=0D + IN OUT VK_CONTEXT *VkContext,=0D + IN EFI_HANDLE Controller=0D + )=0D +{=0D + EFI_STATUS Status;=0D + EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *SimpleEx;=0D + EFI_KEY_DATA KeyData;=0D + EFI_HANDLE NotifyHandle;=0D + EFI_EVENT ReadyToBootEvent;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkApiStart Start\n"));=0D +=0D + Status =3D gBS->CreateEvent (=0D + EVT_NOTIFY_SIGNAL,=0D + TPL_CALLBACK,=0D + VkKeyNotifyProcessHandler,=0D + VkContext,=0D + &VkContext->KeyNotifyProcessEvent=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_ERROR, "ERROR - Failed to = create VkContext->KeyNotifyProcessEvent, Status: %r\n", Status));=0D + goto Error;=0D + }=0D +=0D + Status =3D gBS->CreateEvent (=0D + EVT_NOTIFY_WAIT,=0D + TPL_NOTIFY,=0D + VkTouchWaitForKey,=0D + VkContext,=0D + &(VkContext->SimpleTextIn.WaitForKey)=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_ERROR, "ERROR - Failed to = create VkContext->SimpleTextIn.WaitForKey, Status: %r\n", Status));=0D + goto Error;=0D + }=0D +=0D + Status =3D gBS->CreateEvent (=0D + EVT_NOTIFY_WAIT,=0D + TPL_NOTIFY,=0D + VkTouchWaitForKey,=0D + VkContext,=0D + &(VkContext->SimpleTextInEx.WaitForKeyEx)=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_ERROR, "ERROR - Failed to = create VkContext->SimpleTextInEx.WaitForKeyEx, Status %r\n", Status));=0D + goto Error;=0D + }=0D +=0D + Status =3D gBS->CreateEvent (=0D + EVT_TIMER | EVT_NOTIFY_SIGNAL,=0D + TPL_VK_SYNC,=0D + VkTimer,=0D + (VOID *)VkContext,=0D + &(VkContext->TimerEvent)=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_ERROR, "ERROR - Failed to = create the timer event, Status: %r\n", Status));=0D + goto Error;=0D + }=0D +=0D + Status =3D gBS->SetTimer (=0D + VkContext->TimerEvent,=0D + TimerPeriodic,=0D + (UINT64) VK_POLL_INTERVAL=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_ERROR, "ERROR - Failed to = set the timer event, Status: %r\n", Status));=0D + goto Error;=0D + }=0D +=0D + //=0D + // Create event to clear keyboard before boot into OS.=0D + //=0D + Status =3D EfiCreateEventReadyToBootEx (=0D + TPL_CALLBACK,=0D + VkReadyToBootCallBack,=0D + (VOID *)VkContext,=0D + &ReadyToBootEvent=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_ERROR, "ERROR - Failed to = create ReadyToBootEvent, Status: %r\n", Status));=0D + goto Error;=0D + }=0D +=0D + Status =3D gBS->LocateProtocol (=0D + &gEfiHiiImageExProtocolGuid,=0D + NULL,=0D + (VOID **) &VkContext->HiiImageEx=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_ERROR, "ERROR - Failed to = open HiiImageEx protocol, Status: %r\n", Status));=0D + goto Error;=0D + }=0D +=0D + //=0D + // Initialize VkContext=0D + //=0D + VkContext->Signature =3D VK_SIGNATURE;=0D + VkContext->Controller =3D Controller;=0D + VkContext->SimpleTextIn.Reset =3D VkKeyboardReset;=0D + VkContext->SimpleTextIn.ReadKeyStroke =3D VkKeyboardReadKeyStrok= e;=0D + VkContext->SimpleTextInEx.Reset =3D VkKeyboardResetEx;=0D + VkContext->SimpleTextInEx.ReadKeyStrokeEx =3D VkKeyboardReadKeyStrok= eEx;=0D + VkContext->SimpleTextInEx.SetState =3D VkKeyboardSetState;=0D + VkContext->SimpleTextInEx.RegisterKeyNotify =3D VkKeyboardRegisterKeyN= otify;=0D + VkContext->SimpleTextInEx.UnregisterKeyNotify =3D VkKeyboardUnregisterKe= yNotify;=0D + VkContext->IsIconShowed =3D FALSE;=0D + VkContext->IsBackgroundChanged =3D FALSE;=0D + VkContext->PageNumber =3D 0;=0D + VkContext->CurrentKeyboardDisplay =3D VkDisplayAttributeNone= ;=0D + VkContext->TargetKeyboardDisplay =3D VkDisplayAttributeNone= ;=0D + VkContext->VkBodyBackgroundBltBuffer =3D NULL;=0D + VkContext->VkBodyCompoundBltBuffer =3D NULL;=0D + VkContext->VkBodyBltSize =3D 0;=0D + VkContext->VkBodyBltStartX =3D 0;=0D + VkContext->VkBodyBltStartY =3D 0;=0D + VkContext->VkBodyBltHeight =3D 0;=0D + VkContext->VkBodyBltWidth =3D 0;=0D + VkContext->IconBltBuffer =3D NULL;=0D + VkContext->IconBltSize =3D 0;=0D + VkContext->IconReDrawCheck =3D 0;=0D + VkContext->FullIconUpdatedFlag =3D FALSE;=0D + VkContext->SimIconUpdatedFlag =3D FALSE;=0D + VkContext->KeyStartIndex =3D 0;=0D + VkContext->KeyEndIndex =3D 0;=0D + VkContext->KeyToggleState =3D EFI_TOGGLE_STATE_VALID= ;=0D + VkContext->SmallIcon =3D VkGetImage (VkContext,= IMAGE_TOKEN (IMG_VK_SIMPLEICON));=0D + VkContext->FullIcon =3D VkGetImage (VkContext,= IMAGE_TOKEN (IMG_VK_FULLICON));=0D + VkContext->SimKeyBody =3D VkGetImage (VkContext,= IMAGE_TOKEN (IMG_VK_SIMPLEKEYBOARD));=0D + VkContext->DigKeyBody =3D VkGetImage (VkContext,= IMAGE_TOKEN (IMG_VK_DIGITKEYBOARD));=0D + VkContext->CapLeKeyBody =3D VkGetImage (VkContext,= IMAGE_TOKEN (IMG_VK_CAPITALLETTERKEYBOARD));=0D +=0D + InitializeListHead (&VkContext->NotifyList);=0D +=0D + Status =3D SetCharacterPosition (VkContext, 800, 600);=0D + ASSERT_EFI_ERROR (Status);=0D +=0D + Status =3D DrawKeyboardLayout (VkContext);=0D + ASSERT_EFI_ERROR (Status);=0D +=0D + Status =3D HideVkBody (VkContext);=0D + ASSERT_EFI_ERROR (Status);=0D +=0D + Status =3D HideVkIcon (VkContext);=0D + ASSERT_EFI_ERROR (Status);=0D +=0D + DEBUG_CODE (=0D + VkDumpContext (VkContext);=0D + );=0D +=0D + Status =3D gBS->HandleProtocol (=0D + gST->ConsoleInHandle,=0D + &gEfiSimpleTextInputExProtocolGuid,=0D + (VOID **)&SimpleEx=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_ERROR, "ERROR - Failed to = found ConIn Protocol, Status: %r\n", Status));=0D + goto Error;=0D + }=0D +=0D + KeyData.KeyState.KeyToggleState =3D 0;=0D + KeyData.KeyState.KeyShiftState =3D 0;=0D + KeyData.Key.ScanCode =3D SCAN_ESC;=0D + KeyData.Key.UnicodeChar =3D CHAR_NULL;=0D + NotifyHandle =3D NULL;=0D + Status =3D SimpleEx->RegisterKeyNotify (=0D + SimpleEx,=0D + &KeyData,=0D + VkNotifyKeyCallback,=0D + &NotifyHandle=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_ERROR, "ERROR - Failed to = register 'Esc', Status: %r\n", Status));=0D + goto Error;=0D + }=0D +=0D + KeyData.KeyState.KeyToggleState =3D 0;=0D + KeyData.KeyState.KeyShiftState =3D 0;=0D + KeyData.Key.ScanCode =3D SCAN_NULL;=0D + KeyData.Key.UnicodeChar =3D CHAR_CARRIAGE_RETURN;=0D + Status =3D SimpleEx->RegisterKeyNotify (=0D + SimpleEx,=0D + &KeyData,=0D + VkNotifyKeyCallback,=0D + &NotifyHandle=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_ERROR, "ERROR - Failed to = register 'Enter', Status: %r\n", Status));=0D + goto Error;=0D + }=0D +=0D + for (KeyData.Key.UnicodeChar =3D L' '; KeyData.Key.UnicodeChar <=3D L'~'= ; KeyData.Key.UnicodeChar++) {=0D + Status =3D SimpleEx->RegisterKeyNotify (=0D + SimpleEx,=0D + &KeyData,=0D + VkNotifyKeyCallback,=0D + &NotifyHandle=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((=0D + DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_ERROR,=0D + "ERROR - Failed to register '%c', Status: %r\n",=0D + KeyData.Key.UnicodeChar,=0D + Status=0D + ));=0D + break;=0D + }=0D + }=0D + if (EFI_ERROR(Status)) {=0D + goto Error;=0D + }=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkApiStart Success, Status: %r\n",= Status));=0D + goto End;=0D +=0D +Error:=0D + VkApiStop (VkContext);=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkApiStart Failed, Status: %r\n", = Status));=0D +=0D +End:=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkApiStart End\n"));=0D + return Status;=0D +}=0D +=0D +/**=0D + Stop the virtual keyboard driver=0D +=0D + This routine releases the resources allocated by VKApiStart.=0D +=0D + This routine is called by VirtualKeyboardDriverStop to initiate the driv= er=0D + shutdown.=0D +=0D + @param[in] VkContext Address of an VK_CONTEXT structure=0D +=0D +**/=0D +VOID=0D +VkApiStop (=0D + IN VK_CONTEXT *VkContext=0D + )=0D +{=0D + EFI_STATUS Status;=0D + VK_NOTIFY *NotifyNode;=0D + LIST_ENTRY *NotifyList;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkApiStop Start\n"));=0D +=0D + Status =3D gBS->SetTimer (VkContext->TimerEvent, TimerCancel, 0);=0D + ASSERT_EFI_ERROR (Status);=0D +=0D + if (VkContext->KeyNotifyProcessEvent !=3D NULL) {=0D + Status =3D gBS->CloseEvent (VkContext->KeyNotifyProcessEvent);=0D + ASSERT_EFI_ERROR (Status);=0D + VkContext->KeyNotifyProcessEvent =3D NULL;=0D + }=0D +=0D + if (VkContext->TimerEvent !=3D NULL) {=0D + Status =3D gBS->CloseEvent (VkContext->TimerEvent);=0D + ASSERT_EFI_ERROR (Status);=0D + VkContext->TimerEvent =3D NULL;=0D + }=0D +=0D + if (VkContext->SimpleTextIn.WaitForKey !=3D NULL) {=0D + Status =3D gBS->CloseEvent (VkContext->SimpleTextIn.WaitForKey);=0D + ASSERT_EFI_ERROR (Status);=0D + VkContext->SimpleTextIn.WaitForKey =3D NULL;=0D + }=0D +=0D + if (VkContext->SimpleTextInEx.WaitForKeyEx !=3D NULL) {=0D + Status =3D gBS->CloseEvent (VkContext->SimpleTextInEx.WaitForKeyEx);=0D + ASSERT_EFI_ERROR (Status);=0D + VkContext->SimpleTextInEx.WaitForKeyEx =3D NULL;=0D + }=0D +=0D + NotifyList =3D &VkContext->NotifyList;=0D + if (NotifyList !=3D NULL) {=0D + while (!IsListEmpty (NotifyList)) {=0D + NotifyNode =3D CR (NotifyList->ForwardLink, VK_NOTIFY, NotifyEntry, = VK_NOTIFY_SIGNATURE);=0D + RemoveEntryList (NotifyList->ForwardLink);=0D + gBS->FreePool (NotifyNode);=0D + }=0D + }=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkApiStop End\n"));=0D +}=0D +=0D +/**=0D + Reset the input device and optionally run diagnostics=0D +=0D + @param[in] This Protocol instance pointer.=0D + @param[in] ExtendedVerification Driver may perform diagnostics on reset.= =0D +=0D + @retval EFI_SUCCESS The device was reset.=0D + @retval EFI_DEVICE_ERROR The device is not functioning properly a= nd could not be reset.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VkKeyboardReset (=0D + IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,=0D + IN BOOLEAN ExtendedVerification=0D + )=0D +{=0D + EFI_STATUS Status;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardReset Start\n"));=0D + Status =3D EFI_SUCCESS;=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardReset End\n"));=0D + return Status;=0D +}=0D +=0D +/**=0D + Resets the input device hardware.=0D +=0D + The Reset() function resets the input device hardware. As part=0D + of initialization process, the firmware/device will make a quick=0D + but reasonable attempt to verify that the device is functioning.=0D + If the ExtendedVerification flag is TRUE the firmware may take=0D + an extended amount of time to verify the device is operating on=0D + reset. Otherwise the reset operation is to occur as quickly as=0D + possible. The hardware verification process is not defined by=0D + this specification and is left up to the platform firmware or=0D + driver to implement.=0D +=0D + @param[in] This A pointer to the EFI_SIMPLE_TEXT_INPUT_E= X_PROTOCOL instance.=0D +=0D + @param[in] ExtendedVerification Indicates that the driver may perform a = more exhaustive=0D + verification operation of the device dur= ing reset.=0D +=0D + @retval EFI_SUCCESS The device was reset.=0D + @retval EFI_DEVICE_ERROR The device is not functioning correctly = and could not be reset.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VkKeyboardResetEx (=0D + IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,=0D + IN BOOLEAN ExtendedVerification=0D + )=0D +{=0D + EFI_STATUS Status;=0D + VK_CONTEXT *VkContext;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardResetEx Start\n"));=0D +=0D + Status =3D EFI_SUCCESS;=0D + if (This =3D=3D NULL) {=0D + Status =3D EFI_INVALID_PARAMETER;=0D + goto Error;=0D + }=0D +=0D + VkContext =3D VK_CONTEXT_FROM_SIMPLETEXTINEX_PROTOCOL (This);=0D +=0D + Status =3D VkContext->SimpleTextIn.Reset (&VkContext->SimpleTextIn, Exte= ndedVerification);=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_KEYS, "ERROR - Failed to VK reset, Status: %r\n", Sta= tus));=0D + goto Error;=0D + }=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardResetEx Success, Status:= %r\n", Status));=0D + goto End;=0D +=0D +Error:=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardResetEx Failed, Status: = %r\n", Status));=0D +=0D +End:=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardResetEx End\n"));=0D + return Status;=0D +}=0D +=0D +/**=0D + Reads the next keystroke from the input device. The WaitForKey Event can= =0D + be used to test for existence of a keystroke via WaitForEvent () call.=0D +=0D + @param[in] This Protocol instance pointer.=0D + @param[out] Key Driver may perform diagnostics on reset.=0D +=0D + @retval EFI_SUCCESS The keystroke information was returned.=0D + @retval EFI_NOT_READY There was no keystroke data available.=0D + @retval EFI_DEVICE_ERROR The keystroke information was not returned due = to=0D + hardware errors.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VkKeyboardReadKeyStroke (=0D + IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,=0D + OUT EFI_INPUT_KEY *Key=0D + )=0D +{=0D + EFI_STATUS Status;=0D + VK_CONTEXT *VkContext;=0D + EFI_KEY_DATA TmpKeyData;=0D + EFI_TPL OldTpl;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardReadKeyStroke Start\n"))= ;=0D +=0D + OldTpl =3D gBS->RaiseTPL (TPL_NOTIFY);=0D + if (This =3D=3D NULL || Key =3D=3D NULL) {=0D + Status =3D EFI_INVALID_PARAMETER;=0D + goto Error;=0D + }=0D +=0D + VkContext =3D VK_CONTEXT_FROM_PROTOCOL (This);=0D +=0D + Status =3D VkKeyboardReadKeyStrokeEx (&VkContext->SimpleTextInEx, &TmpKe= yData);=0D + if (EFI_ERROR (Status)) {=0D + goto Error;=0D + }=0D + *Key =3D TmpKeyData.Key;=0D +=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardReadKeyStroke Success, S= tatus: %r\n", Status));=0D + goto End;=0D +=0D +Error:=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardReadKeyStroke Failed, St= atus: %r\n", Status));=0D +=0D +End:=0D + gBS->RestoreTPL (OldTpl);=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardReadKeyStroke End\n"));= =0D + return Status;=0D +}=0D +=0D +/**=0D + Reads the next keystroke from the input device.=0D +=0D + @param[in] This Protocol instance pointer.=0D + @param[out] KeyData A pointer to a buffer that is filled in w= ith the keystroke=0D + state data for the key that was pressed.= =0D +=0D + @retval EFI_SUCCESS The keystroke information was returned.=0D + @retval EFI_NOT_READY There was no keystroke data available.=0D + @retval EFI_INVALID_PARAMETER This or KeyData is NULL.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VkKeyboardReadKeyStrokeEx (=0D + IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,=0D + OUT EFI_KEY_DATA *KeyData=0D + )=0D +{=0D + VK_CONTEXT *VkContext;=0D + EFI_STATUS Status;=0D + EFI_TPL OldTpl;=0D + EFI_KEY_DATA TmpKeyData;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardReadKeyStrokeEx Start\n"= ));=0D +=0D + OldTpl =3D gBS->RaiseTPL (TPL_NOTIFY);=0D + if (This =3D=3D NULL || KeyData =3D=3D NULL) {=0D + Status =3D EFI_INVALID_PARAMETER;=0D + goto Error;=0D + }=0D +=0D + VkContext =3D VK_CONTEXT_FROM_SIMPLETEXTINEX_PROTOCOL (This);=0D +=0D + while (TRUE) {=0D + Status =3D VkPopTheKey (VkContext, &TmpKeyData);=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_KEYS, "ERROR - Failed to VkPopTheKey check whether = keybuffer is empty, Status: %r\n", Status));=0D + goto Error;=0D + }=0D + if (TmpKeyData.Key.ScanCode !=3D SCAN_NULL || TmpKeyData.Key.UnicodeCh= ar !=3D CHAR_NULL) {=0D + break;=0D + }=0D + }=0D + *KeyData =3D TmpKeyData;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardReadKeyStrokeEx Success,= Status: %r\n", Status));=0D + goto End;=0D +=0D +Error:=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardReadKeyStrokeEx Failed, = Status: %r\n", Status));=0D +=0D +End:=0D + gBS->RestoreTPL (OldTpl);=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardReadKeyStrokeEx End\n"))= ;=0D + return Status;=0D +}=0D +=0D +/**=0D + Set certain state for the input device.=0D +=0D + @param[in] This Protocol instance pointer.=0D + @param[in] KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to= set the=0D + state for the input device.=0D +=0D + @retval EFI_SUCCESS The device state was set appropriately.= =0D + @retval EFI_INVALID_PARAMETER This or KeyToggleState is NULL.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VkKeyboardSetState (=0D + IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,=0D + IN EFI_KEY_TOGGLE_STATE *KeyToggleState=0D + )=0D +{=0D + EFI_STATUS Status;=0D + VK_CONTEXT *VkContext;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardSetState Start\n"));=0D +=0D + Status =3D EFI_SUCCESS;=0D + if (This =3D=3D NULL || KeyToggleState =3D=3D NULL) {=0D + Status =3D EFI_INVALID_PARAMETER;=0D + goto Error;=0D + }=0D +=0D + VkContext =3D VK_CONTEXT_FROM_SIMPLETEXTINEX_PROTOCOL (This);=0D +=0D + VkContext->KeyToggleState =3D *KeyToggleState;=0D + VkContext->IsCapsLockFlag =3D (*KeyToggleState & EFI_CAPS_LOCK_ACTI= VE) =3D=3D EFI_CAPS_LOCK_ACTIVE;=0D + VkContext->IsSupportPartialKey =3D (*KeyToggleState & EFI_KEY_STATE_EXPO= SED) =3D=3D EFI_KEY_STATE_EXPOSED;=0D +=0D + if (VkContext->PageNumber >=3D VkPage0 && VkContext->PageNumber <=3D VkP= age1) {=0D + VkContext->PageNumber =3D VkContext->IsCapsLockFlag ? VkPage1 : VkPage= 0;=0D + }=0D +=0D + HideVkBody (VkContext);=0D + DrawKeyboardLayout (VkContext);=0D +=0D + DEBUG ((DEBUG_VK_KEYS | DEBUG_INFO, "VkContext->KeyToggleState: %02= x\n", VkContext->KeyToggleState));=0D + DEBUG ((DEBUG_VK_KEYS | DEBUG_INFO, "VkContext->IsCapsLockFlag: %02= x\n", VkContext->IsCapsLockFlag));=0D + DEBUG ((DEBUG_VK_KEYS | DEBUG_INFO, "VkContext->IsSupportPartialKey: %02= x\n", VkContext->IsSupportPartialKey));=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardSetState Success, Status= : %r\n", Status));=0D + goto End;=0D +=0D +Error:=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardSetState Failed, Status:= %r\n", Status));=0D +=0D +End:=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardSetState End\n"));=0D + return Status;=0D +}=0D +=0D +/**=0D + Register a notification function for a particular keystroke for the inpu= t device.=0D +=0D + @param[in] This Protocol instance pointer.=0D + @param[in] KeyData A pointer to a buffer that is fi= lled in with the keystroke=0D + information data for the key tha= t was pressed.=0D + @param[in] KeyNotificationFunction Points to the function to be cal= led when the key=0D + sequence is typed specified by K= eyData.=0D + @param[out] NotifyHandle Points to the unique handle assi= gned to the registered notification.=0D +=0D + @retval EFI_SUCCESS The notification function was re= gistered successfully.=0D + @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for= necessary data structures.=0D + @retval EFI_INVALID_PARAMETER KeyData or NotifyHandle or KeyNo= tificationFunction is NULL.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VkKeyboardRegisterKeyNotify (=0D + IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,=0D + IN EFI_KEY_DATA *KeyData,=0D + IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,=0D + OUT EFI_HANDLE *NotifyHandle=0D + )=0D +{=0D + EFI_STATUS Status;=0D + EFI_TPL OldTpl;=0D + VK_CONTEXT *VkContext;=0D + LIST_ENTRY *Link;=0D + VK_NOTIFY *CurrentNotify;=0D + VK_NOTIFY *NewNotify;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardRegisterKeyNotify Start\= n"));=0D +=0D + //=0D + // Enter critical section=0D + //=0D + OldTpl =3D gBS->RaiseTPL (TPL_NOTIFY);=0D + Status =3D EFI_SUCCESS;=0D + if (This =3D=3D NULL || KeyData =3D=3D NULL || NotifyHandle =3D=3D NULL = || KeyNotificationFunction =3D=3D NULL) {=0D + Status =3D EFI_INVALID_PARAMETER;=0D + goto Error;=0D + }=0D + VkContext =3D VK_CONTEXT_FROM_SIMPLETEXTINEX_PROTOCOL (This);=0D +=0D +=0D + //=0D + // Return EFI_SUCCESS if the (KeyData, NotificationFunction) is already = registered.=0D + //=0D + for (Link =3D VkContext->NotifyList.ForwardLink; Link !=3D &VkContext->N= otifyList; Link =3D Link->ForwardLink) {=0D + CurrentNotify =3D CR (Link, VK_NOTIFY, NotifyEntry, VK_NOTIFY_SIGNATUR= E);=0D + if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {=0D + if (CurrentNotify->KeyNotificationFn =3D=3D KeyNotificationFunction)= {=0D + *NotifyHandle =3D CurrentNotify;=0D + Status =3D EFI_SUCCESS;=0D + goto End;=0D + }=0D + }=0D + }=0D +=0D + //=0D + // Allocate resource to save the notification function=0D + //=0D + NewNotify =3D (VK_NOTIFY *) AllocateZeroPool (sizeof (VK_NOTIFY));=0D + if (NewNotify =3D=3D NULL) {=0D + Status =3D EFI_OUT_OF_RESOURCES;=0D + goto Error;=0D + }=0D +=0D + NewNotify->Signature =3D VK_NOTIFY_SIGNATURE;=0D + NewNotify->KeyNotificationFn =3D KeyNotificationFunction;=0D + CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));=0D + InsertTailList (&VkContext->NotifyList, &NewNotify->NotifyEntry);=0D +=0D + *NotifyHandle =3D NewNotify;=0D + Status =3D EFI_SUCCESS;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardRegisterKeyNotify Succes= s, Status: %r\n", Status));=0D + goto End;=0D +=0D +Error:=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardRegisterKeyNotify Failed= , Status: %r\n", Status));=0D +=0D +End:=0D + //=0D + // Leave critical section and return=0D + //=0D + gBS->RestoreTPL (OldTpl);=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardRegisterKeyNotify End\n"= ));=0D + return Status;=0D +}=0D +=0D +/**=0D + Remove a registered notification function from a particular keystroke.=0D +=0D + @param[in] This Protocol instance pointer.=0D + @param[in] NotificationHandle The handle of the notification function b= eing unregistered.=0D +=0D + @retval EFI_SUCCESS The notification function was unregistere= d successfully.=0D + @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VkKeyboardUnregisterKeyNotify (=0D + IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,=0D + IN EFI_HANDLE NotificationHandle=0D + )=0D +{=0D + EFI_STATUS Status;=0D + VK_CONTEXT *VkContext;=0D + EFI_TPL OldTpl;=0D + LIST_ENTRY *Link;=0D + VK_NOTIFY *CurrentNotify;=0D + BOOLEAN IsFindNotifyHandle;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardUnregisterKeyNotify Star= t\n"));=0D +=0D + //=0D + // Enter critical section=0D + //=0D + OldTpl =3D gBS->RaiseTPL (TPL_NOTIFY);=0D + Status =3D EFI_SUCCESS;=0D + if (This =3D=3D NULL || NotificationHandle =3D=3D NULL) {=0D + Status =3D EFI_INVALID_PARAMETER;=0D + goto Error;=0D + }=0D + VkContext =3D VK_CONTEXT_FROM_SIMPLETEXTINEX_PROTOCOL (This);=0D +=0D + IsFindNotifyHandle =3D FALSE;=0D + for (Link =3D VkContext->NotifyList.ForwardLink; Link !=3D &VkContext->N= otifyList; Link =3D Link->ForwardLink) {=0D + CurrentNotify =3D CR (Link, VK_NOTIFY, NotifyEntry, VK_NOTIFY_SIGNATUR= E);=0D + if (CurrentNotify =3D=3D NotificationHandle) {=0D + //=0D + // Remove the notification function from NotifyList and free resourc= es=0D + //=0D + RemoveEntryList (&CurrentNotify->NotifyEntry);=0D +=0D + gBS->FreePool (CurrentNotify);=0D + IsFindNotifyHandle =3D TRUE;=0D + break;=0D + }=0D + }=0D +=0D + if (!IsFindNotifyHandle) {=0D + Status =3D EFI_INVALID_PARAMETER;=0D + goto Error;=0D + }=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardUnregisterKeyNotify Succ= ess, Status: %r\n", Status));=0D + goto End;=0D +=0D +Error:=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardUnregisterKeyNotify Fail= ed, Status: %r\n", Status));=0D +=0D +End:=0D + //=0D + // Leave critical section and return=0D + //=0D + gBS->RestoreTPL (OldTpl);=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VkKeyboardUnregisterKeyNotify End\= n"));=0D + return Status;=0D +}=0D diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Virtual= KeyboardDxe/KeyboardLayout.c b/Features/Intel/UserInterface/VirtualKeyboard= FeaturePkg/VirtualKeyboardDxe/KeyboardLayout.c new file mode 100644 index 0000000000..744c4324d3 --- /dev/null +++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboar= dDxe/KeyboardLayout.c @@ -0,0 +1,1438 @@ +/** @file=0D + Virtural Keyboard Layout Engine=0D +=0D + Copyright (c) 2012 - 2020, Intel Corporation. All rights reserved.
    =0D + SPDX-License-Identifier: BSD-2-Clause-Patent=0D +=0D +**/=0D +=0D +#include "VirtualKeyboard.h"=0D +=0D +//=0D +// 1.FullKeyboardBody=0D +// Follow below design=0D +// (1).\KeyboardLayout\CapitalLetterKeyboard.bmp=0D +// (2).\KeyboardLayout\DigitKeyboard.bmp=0D +// Based on keyboard's (startX, startY)=0D +//=0D +// Page0Font=0D +// +---+---+---+---+---+---+---+---+---+---+---+=0D +// | q | w | e | r | t | y | u | i | o | p | | ? |F11|F12|Enter| Line 2=0D +// +-----+---+---+---+---+---+---+---+---+---+-+=0D +// | Esc |12#| Space | | | _ | + | | Line 3=0D +// +-----+---+-------------------+---+---+---+-+=0D +//=0D +// 2.Screen Corner=0D +// Follow below design=0D +// (1).\KeyboardLayout\SimpleIcon.bmp # Screen Corner A/B=0D +// (2).\KeyboardLayout\FullIcon.bmp # Screen Corner C/D=0D +// +-+------------------------------------+-+=0D +// |A| |C|=0D +// +-+ +-+=0D +// | |=0D +// | |=0D +// | |=0D +// | |=0D +// | |=0D +// | |=0D +// +-+ +-+=0D +// |B| |D|=0D +// +-+------------------------------------+-+=0D +//=0D +VK_STRUCT mFullKeyboardBody[] =3D {=0D + // StartX StartY EndX EndY Page0Font Page1Font = Page2Font Page3Font=0D + // Line 0=0D + { 0x0000, 0x0000, 0x0032, 0x0032, {L'q', L'Q', = L'1', L'!' }},=0D + { 0x0032, 0x0000, 0x0064, 0x0032, {L'w', L'W', = L'2', L'@' }},=0D + { 0x0064, 0x0000, 0x0096, 0x0032, {L'e', L'E', = L'3', L'#' }},=0D + { 0x0096, 0x0000, 0x00C8, 0x0032, {L'r', L'R', = L'4', L'$' }},=0D + { 0x00C8, 0x0000, 0x00FA, 0x0032, {L't', L'T', = L'5', L'%' }},=0D + { 0x00FA, 0x0000, 0x012C, 0x0032, {L'y', L'Y', = L'6', L'^' }},=0D + { 0x012C, 0x0000, 0x015E, 0x0032, {L'u', L'U', = L'7', L'&' }},=0D + { 0x015E, 0x0000, 0x0190, 0x0032, {L'i', L'I', = L'8', L'*' }},=0D + { 0x0190, 0x0000, 0x01C2, 0x0032, {L'o', L'O', = L'9', L'(' }},=0D + { 0x01C2, 0x0000, 0x01F4, 0x0032, {L'p', L'P', = L'0', L')' }},=0D + { 0x01F4, 0x0000, 0x0226, 0x0032, {VkKeyBackspace, VkKeyBackspace,= VkKeyBackspace, VkKeyBackspace }},=0D + // Line 1=0D + { 0x0000, 0x0032, 0x0019, 0x0064, {VkKeyNull, VkKeyNull, = VkKeyNull, VkKeyNull }},=0D + { 0x0019, 0x0032, 0x004B, 0x0064, {L'a', L'A', = VkKeyF1, VkKeyF1 }},=0D + { 0x004B, 0x0032, 0x007D, 0x0064, {L's', L'S', = VkKeyF2, VkKeyF2 }},=0D + { 0x007D, 0x0032, 0x00AF, 0x0064, {L'd', L'D', = VkKeyF3, VkKeyF3 }},=0D + { 0x00AF, 0x0032, 0x00E1, 0x0064, {L'f', L'F', = VkKeyF4, VkKeyF4 }},=0D + { 0x00E1, 0x0032, 0x0113, 0x0064, {L'g', L'G', = VkKeyF5, VkKeyF5 }},=0D + { 0x0113, 0x0032, 0x0145, 0x0064, {L'h', L'H', = VkKeyF6, VkKeyF6 }},=0D + { 0x0145, 0x0032, 0x0177, 0x0064, {L'j', L'J', = VkKeyF7, VkKeyF7 }},=0D + { 0x0177, 0x0032, 0x01A9, 0x0064, {L'k', L'K', = VkKeyF8, VkKeyF8 }},=0D + { 0x01A9, 0x0032, 0x01DB, 0x0064, {L'l', L'L', = VkKeyF9, VkKeyF9 }},=0D + { 0x01DB, 0x0032, 0x020D, 0x0064, {VkKeyF2, VkKeyF2, = VkKeyF10, VkKeyF10 }},=0D + // Line 2=0D + { 0x0000, 0x0064, 0x004B, 0x0096, {VkKeyCapslock, VkKeyCapslock, = VkKeyShift, VkKeyShift }},=0D + { 0x004B, 0x0064, 0x007D, 0x0096, {L'z', L'Z', = L'`', L'~' }},=0D + { 0x007D, 0x0064, 0x00AF, 0x0096, {L'x', L'X', = L';', L':' }},=0D + { 0x00AF, 0x0064, 0x00E1, 0x0096, {L'c', L'C', = L'\'', L'"' }},=0D + { 0x00E1, 0x0064, 0x0113, 0x0096, {L'v', L'V', = L',', L'<' }},=0D + { 0x0113, 0x0064, 0x0145, 0x0096, {L'b', L'B', = L'.', L'>' }},=0D + { 0x0145, 0x0064, 0x0177, 0x0096, {L'n', L'N', = L'/', L'?' }},=0D + { 0x0177, 0x0064, 0x01A9, 0x0096, {L'm', L'M', = VkKeyF11, VkKeyF11 }},=0D + { 0x01A9, 0x0064, 0x01DB, 0x0096, {VkKeyUp, VkKeyUp, = VkKeyF12, VkKeyF12 }},=0D + { 0x01DB, 0x0064, 0x0226, 0x0096, {VkKeyEnter, VkKeyEnter, = VkKeyEnter, VkKeyEnter }},=0D + // Line 3=0D + { 0x0000, 0x0096, 0x004B, 0x00C8, {VkKeyEsc, VkKeyEsc, = VkKeyEsc, VkKeyEsc }},=0D + { 0x004B, 0x0096, 0x007D, 0x00C8, {VkKeyTwoPage, VkKeyTwoPage, = VkKeyTwoPage, VkKeyTwoPage }},=0D + { 0x007D, 0x0096, 0x0177, 0x00C8, {L' ', L' ', = L' ', L' ' }},=0D + { 0x0177, 0x0096, 0x01A9, 0x00C8, {VkKeyLeft, VkKeyLeft, = L'\\', L'|' }},=0D + { 0x01A9, 0x0096, 0x01DB, 0x00C8, {VkKeyDown, VkKeyDown, = L'-', L'_' }},=0D + { 0x01DB, 0x0096, 0x020D, 0x00C8, {VkKeyRight, VkKeyRight, = L'=3D', L'+' }},=0D + // Screen Corner A=0D + { 0x0000, 0x0000, 0x001E, 0x001E, {VkKeyTypeMaximum, VkKeyTypeMaximu= m, VkKeyTypeMaximum, VkKeyTypeMaximum}},=0D + // Screen Corner B=0D + { 0x0000, 0x023A, 0x001E, 0x0258, {VkKeyTypeMaximum, VkKeyTypeMaximu= m, VkKeyTypeMaximum, VkKeyTypeMaximum}},=0D + // Screen Corner C=0D + { 0x02E4, 0x0000, 0x0320, 0x001E, {VkKeyTypeMaximum, VkKeyTypeMaximu= m, VkKeyTypeMaximum, VkKeyTypeMaximum}},=0D + // Screen Corner D=0D + { 0x02E4, 0x023A, 0x0320, 0x0258, {VkKeyTypeMaximum, VkKeyTypeMaximu= m, VkKeyTypeMaximum, VkKeyTypeMaximum}}=0D +};=0D +=0D +//=0D +// 1.SimpleKeyboardBody=0D +// Follow below design=0D +// (1).\KeyboardLayout\SimpleKeyboard.bmp=0D +// Based on keyboard's (startX, startY)=0D +// +-----+-----+=0D +// | Esc |Enter| Line 0=0D +// +-----+-----+=0D +// | Up | Down| Line 1=0D +// +-----+-----+=0D +//=0D +// 2.Screen Corner=0D +// Follow below design=0D +// (1).\KeyboardLayout\SimpleIcon.bmp # Screen Corner A/B=0D +// (2).\KeyboardLayout\FullIcon.bmp # Screen Corner C/D=0D +// +-+------------------------------------+-+=0D +// |A| |C|=0D +// +-+ +-+=0D +// | |=0D +// | |=0D +// | |=0D +// | |=0D +// | |=0D +// | |=0D +// +-+ +-+=0D +// |B| |D|=0D +// +-+------------------------------------+-+=0D +//=0D +VK_STRUCT mSimpleKeyboardBody[] =3D {=0D + // StartX StartY EndX EndY Page0Font Page1Font = Page2Font Page3Font=0D + // Line 0=0D + { 0x0000, 0x0000, 0x0032, 0x0032, {VkKeyEsc, VkKeyEsc, = VkKeyEsc, VkKeyEsc }},=0D + { 0x0032, 0x0000, 0x0064, 0x0032, {VkKeyEnter, VkKeyEnter, = VkKeyEnter, VkKeyEnter }},=0D + // Line 1=0D + { 0x0000, 0x0032, 0x0032, 0x0064, {VkKeyUp, VkKeyUp, = VkKeyUp, VkKeyUp }},=0D + { 0x0032, 0x0032, 0x0064, 0x0064, {VkKeyDown, VkKeyDown, = VkKeyDown, VkKeyDown }},=0D + // Screen Corner A=0D + { 0x0000, 0x0000, 0x001E, 0x001E, {VkKeyTypeMaximum, VkKeyTypeMaximu= m, VkKeyTypeMaximum, VkKeyTypeMaximum}},=0D + // Screen Corner B=0D + { 0x0000, 0x023A, 0x001E, 0x0258, {VkKeyTypeMaximum, VkKeyTypeMaximu= m, VkKeyTypeMaximum, VkKeyTypeMaximum}},=0D + // Screen Corner C=0D + { 0x02E4, 0x0000, 0x0320, 0x001E, {VkKeyTypeMaximum, VkKeyTypeMaximu= m, VkKeyTypeMaximum, VkKeyTypeMaximum}},=0D + // Screen Corner D=0D + { 0x02E4, 0x023A, 0x0320, 0x0258, {VkKeyTypeMaximum, VkKeyTypeMaximu= m, VkKeyTypeMaximum, VkKeyTypeMaximum}}=0D +};=0D +=0D +/**=0D + Modify the color of key if Shift or CapsLock is pressed.=0D +=0D + @param[in] VkContext Address of an VK_CONTEXT structure.=0D + @param[in, out] BltBuffer Address of a blt buffer.=0D +=0D + @retval EFI_SUCCESS Success for the function.=0D +=0D +**/=0D +EFI_STATUS=0D +ModifyShiftKeyColor (=0D + IN VK_CONTEXT *VkContext,=0D + IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL **BltBuffer=0D + )=0D +{=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *TempBltBuffer;=0D + UINTN BltSize;=0D + BOOLEAN IsPressed;=0D +=0D + TempBltBuffer =3D *BltBuffer;=0D + BltSize =3D VkContext->VkBodyBltHeight * VkContext->VkBodyBltWidth= ;=0D + IsPressed =3D VkContext->PageNumber <=3D VkPage1 ?=0D + VkContext->IsCapsLockFlag :=0D + VkContext->IsShiftKeyFlag;=0D +=0D + while (BltSize-- !=3D 0) {=0D + //=0D + // Color gradient issue=0D + //=0D + if (((TempBltBuffer->Red - TempBltBuffer->Green) > 0x20) &&=0D + ((TempBltBuffer->Red - TempBltBuffer->Blue) > 0x20)) {=0D + if (IsPressed) {=0D + TempBltBuffer->Red =3D 0;=0D + TempBltBuffer->Green =3D 255;=0D + TempBltBuffer->Blue =3D 255;=0D + } else {=0D + TempBltBuffer->Red =3D 255;=0D + TempBltBuffer->Green =3D 255;=0D + TempBltBuffer->Blue =3D 255;=0D + }=0D + }=0D + TempBltBuffer++;=0D + }=0D +=0D + return EFI_SUCCESS;=0D +}=0D +=0D +/**=0D + Make the keyboard transparent.=0D +=0D + @param[in] VkContext Address of an VK_CONTEXT structure.=0D + @param[in] IsTransparent TRUE for set keyboard transparent.=0D + @param[in] BltIn Address of keyboard blt buffer.=0D + @param[in, out] BltOut Address of output blt buffer.=0D + NULL will allocate it.=0D +=0D + @retval EFI_SUCCESS Success for the function.=0D + @retval EFI_OUT_OF_RESOURCES Allocate memory failed.=0D +=0D +**/=0D +EFI_STATUS=0D +MakeKeyboardTransparent (=0D + IN VK_CONTEXT *VkContext,=0D + IN BOOLEAN IsTransparent,=0D + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltIn,=0D + IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL **BltOut=0D + )=0D +{=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Compound;=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Keyboard;=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Background;=0D + UINTN BltSize;=0D +=0D + if (*BltOut =3D=3D NULL) {=0D + *BltOut =3D AllocateZeroPool (VkContext->VkBodyBltSize);=0D + if (*BltOut =3D=3D NULL) {=0D + return EFI_OUT_OF_RESOURCES;=0D + }=0D + }=0D + Compound =3D *BltOut;=0D + Keyboard =3D BltIn;=0D + Background =3D VkContext->VkBodyBackgroundBltBuffer;=0D + BltSize =3D VkContext->VkBodyBltHeight * VkContext->VkBodyBltWidth;=0D + while (BltSize-- !=3D 0) {=0D + if (IsTransparent) {=0D + Compound->Red =3D (Keyboard->Red * TRANSPARENCY_WEIGHT) / 100 + (B= ackground->Red * (100 - TRANSPARENCY_WEIGHT)) / 100;=0D + Compound->Green =3D (Keyboard->Green * TRANSPARENCY_WEIGHT) / 100 + = (Background->Green * (100 - TRANSPARENCY_WEIGHT)) / 100;=0D + Compound->Blue =3D (Keyboard->Blue * TRANSPARENCY_WEIGHT) / 100 + (= Background->Blue * (100 - TRANSPARENCY_WEIGHT)) / 100;=0D + } else {=0D + *Compound =3D *Keyboard;=0D + }=0D + Compound++;=0D + Keyboard++;=0D + Background++;=0D + }=0D +=0D + return EFI_SUCCESS;=0D +}=0D +=0D +/**=0D + Save the background blt buffer.=0D +=0D + @param[in] VkContext Address of an VK_CONTEXT structure.=0D + @param[in] BltSize Size of blt.=0D +=0D + @retval EFI_SUCCESS Success for the function.=0D + @retval EFI_OUT_OF_RESOURCES Allocate memory failed.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +SaveVkBodyBackgroundBltBuffer (=0D + IN VK_CONTEXT *VkContext,=0D + IN UINTN BltSize=0D + )=0D +{=0D + EFI_STATUS Status;=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *CurrentBltBuffer;=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *CurrentBltBufferSave;=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *OldBltBuffer;=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *OldBltBufferSave;=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Compound;=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Background;=0D + UINTN Size;=0D +=0D + CurrentBltBufferSave =3D NULL;=0D + OldBltBufferSave =3D NULL;=0D +=0D + //=0D + // Save original blt buffer first.=0D + //=0D + OldBltBuffer =3D AllocateZeroPool (VkContext->VkBodyBltSize);=0D + if (OldBltBuffer =3D=3D NULL) {=0D + return EFI_OUT_OF_RESOURCES;=0D + }=0D + if (VkContext->VkBodyBackgroundBltBuffer !=3D NULL) {=0D + CopyMem (OldBltBuffer, VkContext->VkBodyBackgroundBltBuffer, VkContext= ->VkBodyBltSize);=0D + }=0D +=0D + if (VkContext->VkBodyBackgroundBltBuffer =3D=3D NULL) {=0D + VkContext->VkBodyBltSize =3D BltSize;=0D + VkContext->VkBodyBackgroundBltBuffer =3D AllocateZeroPool (VkContext->= VkBodyBltSize);=0D + ASSERT (VkContext->VkBodyBackgroundBltBuffer !=3D NULL);=0D + if (VkContext->VkBodyBackgroundBltBuffer =3D=3D NULL) {=0D + return EFI_OUT_OF_RESOURCES;=0D + }=0D + } else if (BltSize > VkContext->VkBodyBltSize) {=0D + VkContext->VkBodyBltSize =3D BltSize;=0D + FreePool (VkContext->VkBodyBackgroundBltBuffer);=0D + VkContext->VkBodyBackgroundBltBuffer =3D NULL;=0D + VkContext->VkBodyBackgroundBltBuffer =3D AllocateZeroPool (VkContext->= VkBodyBltSize);=0D + ASSERT (VkContext->VkBodyBackgroundBltBuffer !=3D NULL);=0D + if (VkContext->VkBodyBackgroundBltBuffer =3D=3D NULL) {=0D + return EFI_OUT_OF_RESOURCES;=0D + }=0D + } else {=0D + ZeroMem (VkContext->VkBodyBackgroundBltBuffer, VkContext->VkBodyBltSiz= e);=0D + }=0D +=0D + CurrentBltBuffer =3D NULL;=0D + if (VkContext->IsBackgroundChanged =3D=3D TRUE) {=0D + //=0D + // Background changed, merge current visioning blt buffer with old bac= kground blt buffer.=0D + //=0D + Compound =3D VkContext->VkBodyCompoundBltBuffer;=0D + Background =3D VkContext->VkBodyBackgroundBltBuffer;=0D + CurrentBltBuffer =3D AllocateZeroPool (VkContext->VkBodyBltSize);=0D + ASSERT (CurrentBltBuffer !=3D NULL);=0D + if (CurrentBltBuffer =3D=3D NULL) {=0D + return EFI_OUT_OF_RESOURCES;=0D + }=0D + Status =3D VkContext->GraphicsOutput->Blt (=0D + VkContext->GraphicsOutput,=0D + CurrentBltBuffer,=0D + EfiBltVideoToBltBuffer,=0D + VkContext->VkBodyBltStartX,=0D + VkContext->VkBodyBltStartY,=0D + 0,=0D + 0,=0D + VkContext->VkBodyBltWidth,=0D + VkContext->VkBodyBltHeight,=0D + VkContext->VkBodyBltWidth * size= of (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)=0D + );=0D + CurrentBltBufferSave =3D CurrentBltBuffer;=0D + OldBltBufferSave =3D OldBltBuffer;=0D + Size =3D VkContext->VkBodyBltHeight * VkContext->VkBodyBltWidth;=0D + while (Size-- !=3D 0) {=0D + if ((Compound->Red !=3D CurrentBltBuffer->Red) ||=0D + (Compound->Green !=3D CurrentBltBuffer->Green) ||=0D + (Compound->Blue !=3D CurrentBltBuffer->Blue)) {=0D + *Background =3D *CurrentBltBuffer;=0D + } else {=0D + *Background =3D *OldBltBuffer;=0D + }=0D + Compound++;=0D + Background++;=0D + CurrentBltBuffer++;=0D + OldBltBuffer++;=0D + }=0D + } else {=0D + //=0D + // Background NOT changed, save it to VkBodyBackgroundBltBuffer direct= ly.=0D + //=0D + Status =3D VkContext->GraphicsOutput->Blt (=0D + VkContext->GraphicsOutput,=0D + VkContext->VkBodyBackgroundBltBu= ffer,=0D + EfiBltVideoToBltBuffer,=0D + VkContext->VkBodyBltStartX,=0D + VkContext->VkBodyBltStartY,=0D + 0,=0D + 0,=0D + VkContext->VkBodyBltWidth,=0D + VkContext->VkBodyBltHeight,=0D + VkContext->VkBodyBltWidth * size= of (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)=0D + );=0D + }=0D +=0D + if (CurrentBltBufferSave !=3D NULL) {=0D + FreePool (CurrentBltBufferSave);=0D + }=0D + if (OldBltBufferSave !=3D NULL) {=0D + FreePool (OldBltBufferSave);=0D + }=0D +=0D + return Status;=0D +}=0D +=0D +/**=0D + Restore the background blt buffer.=0D +=0D + @param[in] VkContext Address of an VK_CONTEXT structure.=0D +=0D + @retval EFI_SUCCESS Success for the function.=0D + @retval EFI_UNSUPPORTED Input blt buffer is NULL.=0D + @retval Others An unexpected error occurred.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +RestoreVkBodyBackgroundBltBuffer (=0D + IN VK_CONTEXT *VkContext=0D + )=0D +{=0D + EFI_STATUS Status;=0D +=0D + if (VkContext->VkBodyBackgroundBltBuffer =3D=3D NULL) {=0D + return EFI_UNSUPPORTED;=0D + }=0D +=0D + Status =3D VkContext->GraphicsOutput->Blt (=0D + VkContext->GraphicsOutput,=0D + VkContext->VkBodyBackgroundBltBuff= er,=0D + EfiBltBufferToVideo,=0D + 0,=0D + 0,=0D + VkContext->VkBodyBltStartX,=0D + VkContext->VkBodyBltStartY,=0D + VkContext->VkBodyBltWidth,=0D + VkContext->VkBodyBltHeight,=0D + VkContext->VkBodyBltWidth * sizeof= (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)=0D + );=0D +=0D + FreePool (VkContext->VkBodyBackgroundBltBuffer);=0D + VkContext->VkBodyBackgroundBltBuffer =3D NULL;=0D +=0D + return Status;=0D +}=0D +=0D +/**=0D + Set the position of character.=0D +=0D + @param[in] VkContext Address of an VK_CONTEXT structure.=0D + @param[in] DestX X position.=0D + @param[in] DestY Y position.=0D +=0D + @retval EFI_SUCCESS Success for the function.=0D + @retval Others An unexpected error occurred.=0D +=0D +**/=0D +EFI_STATUS=0D +SetCharacterPosition (=0D + IN VK_CONTEXT *VkContext,=0D + IN UINT32 DestX,=0D + IN UINT32 DestY=0D + )=0D +{=0D + UINTN Index;=0D + VK_STRUCT *KeyArryPtr;=0D + UINT32 KeyArrySize;=0D +=0D + switch (VkContext->TargetKeyboardDisplay) {=0D + case VkDisplayAttributeSimpleTop:=0D + case VkDisplayAttributeSimpleBottom:=0D + KeyArryPtr =3D mSimpleKeyboardBody;=0D + KeyArrySize =3D DIM (mSimpleKeyboardBody);=0D + break;=0D +=0D + case VkDisplayAttributeFullBottom:=0D + case VkDisplayAttributeFullTop:=0D + KeyArryPtr =3D mFullKeyboardBody;=0D + KeyArrySize =3D DIM (mFullKeyboardBody);=0D + break;=0D +=0D + case VkDisplayAttributeNone:=0D + KeyArryPtr =3D mFullKeyboardBody;=0D + KeyArrySize =3D DIM (mFullKeyboardBody);=0D + break;=0D +=0D + default:=0D + return EFI_UNSUPPORTED;=0D + }=0D +=0D + for (Index =3D 0; Index < KeyArrySize; Index++) {=0D + VkContext->KeyboardBodyPtr[Index] =3D KeyArryPtr[Index];=0D + }=0D + VkContext->NumOfKeysInfo =3D KeyArrySize;=0D +=0D + for (Index =3D 0; Index < (VkContext->NumOfKeysInfo - 4); Index++) {=0D + VkContext->KeyboardBodyPtr[Index].DisStartX +=3D (UINT16)DestX;=0D + VkContext->KeyboardBodyPtr[Index].DisStartY +=3D (UINT16)DestY;=0D + VkContext->KeyboardBodyPtr[Index].DisEndX +=3D (UINT16)DestX;=0D + VkContext->KeyboardBodyPtr[Index].DisEndY +=3D (UINT16)DestY;=0D + }=0D +=0D + return EFI_SUCCESS;=0D +}=0D +=0D +/**=0D + Save the icon background blt buffer.=0D +=0D + @param[in] VkContext Address of an VK_CONTEXT structure.=0D + @param[in] IconType The icon type.=0D +=0D + @retval EFI_SUCCESS Success for the function.=0D + @retval EFI_OUT_OF_RESOURCES Allocate memory failed.=0D + @retval Others An unexpected error occurred.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +SaveVkIconBackgroundBltBuffer (=0D + IN VK_CONTEXT *VkContext,=0D + IN VK_DISPLAY_ATTRIBUTE IconType=0D + )=0D +{=0D + EFI_STATUS Status;=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *GraphicBlt;=0D + UINTN BltSize;=0D + UINTN Height;=0D + UINTN Width;=0D + INTN StartX;=0D + INTN StartY;=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *TempIconBackBuffer;=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *IconBackBuffer;=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Compound;=0D + UINTN Size;=0D + BOOLEAN SaveCursor;=0D +=0D + Status =3D EFI_SUCCESS;=0D + StartX =3D 0;=0D + StartY =3D 0;=0D + TempIconBackBuffer =3D NULL;=0D + IconBackBuffer =3D NULL;=0D + Compound =3D NULL;=0D +=0D + if ((IconType =3D=3D VkDisplayAttributeFullTop) ||=0D + (IconType =3D=3D VkDisplayAttributeSimpleTop)) {=0D + return EFI_SUCCESS;=0D + }=0D +=0D + SaveCursor =3D gST->ConOut->Mode->CursorVisible;=0D + gST->ConOut->EnableCursor (gST->ConOut, FALSE);=0D +=0D + if (IconType =3D=3D VkDisplayAttributeFullBottom) {=0D + GraphicBlt =3D VkContext->FullIcon->Bitmap;=0D + BltSize =3D VkContext->FullIcon->Height * VkContext->FullIcon->Widt= h * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL);=0D + Height =3D VkContext->FullIcon->Height;=0D + Width =3D VkContext->FullIcon->Width;=0D + StartX =3D VkContext->FullIconBackStartX;=0D + StartY =3D VkContext->FullIconBackStartY;=0D + } else if (IconType =3D=3D VkDisplayAttributeSimpleBottom) {=0D + GraphicBlt =3D VkContext->SmallIcon->Bitmap;=0D + BltSize =3D VkContext->SmallIcon->Height * VkContext->SmallIcon->Wi= dth * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL);=0D + Height =3D VkContext->SmallIcon->Height;=0D + Width =3D VkContext->SmallIcon->Width;=0D + StartX =3D VkContext->SimIconBackStartX;=0D + StartY =3D VkContext->SimIconBackStartY;=0D + } else {=0D + gST->ConOut->EnableCursor (gST->ConOut, SaveCursor);=0D + return EFI_UNSUPPORTED;=0D + }=0D +=0D + IconBackBuffer =3D AllocateZeroPool (BltSize);=0D + if (IconBackBuffer =3D=3D NULL) {=0D + gST->ConOut->EnableCursor (gST->ConOut, SaveCursor);=0D + return EFI_OUT_OF_RESOURCES;=0D + }=0D + TempIconBackBuffer =3D IconBackBuffer;=0D + Status =3D VkContext->GraphicsOutput->Blt (=0D + VkContext->GraphicsOutput,=0D + IconBackBuffer,=0D + EfiBltVideoToBltBuffer,=0D + StartX,=0D + StartY,=0D + 0,=0D + 0,=0D + Width,=0D + Height,=0D + Width * sizeof (EFI_GRAPHICS_OUTPU= T_BLT_PIXEL)=0D + );=0D +=0D + if (IconType =3D=3D VkDisplayAttributeFullBottom) {=0D + //=0D + // Store full icon background framebuffer=0D + //=0D + VkContext->FullIconBackHeight =3D Height;=0D + VkContext->FullIconBackWidth =3D Width;=0D + if (VkContext->FullIconUpdatedFlag =3D=3D FALSE) {=0D + //=0D + // No icon draw, save the buffer directly.=0D + //=0D + if (VkContext->FullIconBackBuffer =3D=3D NULL) {=0D + VkContext->FullIconBackBuffer =3D AllocateZeroPool (BltSize);=0D + VkContext->FullIconBackSize =3D BltSize;=0D + }=0D + CopyMem (VkContext->FullIconBackBuffer, IconBackBuffer, BltSize);=0D + VkContext->FullIconUpdatedFlag =3D TRUE;=0D + } else {=0D + if (CompareMem (VkContext->FullIconBackBuffer, IconBackBuffer, BltSi= ze) !=3D 0) {=0D + Compound =3D VkContext->FullIconBackBuffer;=0D + Size =3D Height * Width;=0D + while (Size-- !=3D 0) {=0D + if ((GraphicBlt->Red !=3D IconBackBuffer->Red) ||=0D + (GraphicBlt->Green !=3D IconBackBuffer->Green) ||=0D + (GraphicBlt->Blue !=3D IconBackBuffer->Blue)) {=0D + *Compound =3D *IconBackBuffer;=0D + }=0D + Compound++;=0D + GraphicBlt++;=0D + IconBackBuffer++;=0D + }=0D + }=0D + }=0D + } else if (IconType =3D=3D VkDisplayAttributeSimpleBottom) {=0D + //=0D + // Store simple icon background framebuffer=0D + //=0D + VkContext->SimIconBackHeight =3D Height;=0D + VkContext->SimIconBackWidth =3D Width;=0D + if (VkContext->SimIconUpdatedFlag =3D=3D FALSE) {=0D + //=0D + // No icon draw, save the buffer directly.=0D + //=0D + if (VkContext->SimIconBackBuffer =3D=3D NULL) {=0D + VkContext->SimIconBackBuffer =3D AllocateZeroPool (BltSize);=0D + VkContext->SimIconBackSize =3D BltSize;=0D + }=0D + CopyMem (VkContext->SimIconBackBuffer, IconBackBuffer, BltSize);=0D + VkContext->SimIconUpdatedFlag =3D TRUE;=0D + } else {=0D + if (CompareMem (VkContext->SimIconBackBuffer, IconBackBuffer, BltSiz= e) !=3D 0) {=0D + Compound =3D VkContext->SimIconBackBuffer;=0D + Size =3D Height * Width;=0D + while (Size-- !=3D 0) {=0D + if ((GraphicBlt->Red !=3D IconBackBuffer->Red) ||=0D + (GraphicBlt->Green !=3D IconBackBuffer->Green) ||=0D + (GraphicBlt->Blue !=3D IconBackBuffer->Blue)) {=0D + *Compound =3D *IconBackBuffer;=0D + }=0D + Compound++;=0D + GraphicBlt++;=0D + IconBackBuffer++;=0D + }=0D + }=0D + }=0D + }=0D +=0D + if (TempIconBackBuffer !=3D NULL) FreePool (TempIconBackBuffer);=0D +=0D + gST->ConOut->EnableCursor (gST->ConOut, SaveCursor);=0D + return Status;=0D +}=0D +=0D +/**=0D + Use to draw the keyboard icon.=0D +=0D + @param[in] VkContext Pointer to virtual keyboard's context=0D + @param[in] VkImage Image of keyboard to display on the screen.=0D + @param[in] Attribute Attribute of keyboard to display on the screen.=0D +=0D + @retval EFI_SUCCESS ConsoleControl has been flipped to graphic= s and keyboard icon displayed.=0D + @retval EFI_UNSUPPORTED KeyboardFile not found=0D + @retval EFI_INVALID_PARAMETER Attribute is unknown.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +DrawVkIcon (=0D + IN VK_CONTEXT *VkContext,=0D + IN EFI_IMAGE_INPUT *VkImage,=0D + IN VK_DISPLAY_ATTRIBUTE Attribute=0D + )=0D +{=0D + EFI_STATUS Status;=0D + UINT32 SizeOfX;=0D + UINT32 SizeOfY;=0D + INTN DestX;=0D + INTN DestY;=0D + UINTN CoordinateX;=0D + UINTN CoordinateY;=0D + EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Blt;=0D + UINTN BltSize;=0D + UINTN Height;=0D + UINTN Width;=0D +=0D + Status =3D EFI_SUCCESS;=0D + GraphicsOutput =3D VkContext->GraphicsOutput;=0D + SizeOfX =3D GraphicsOutput->Mode->Info->HorizontalResolution;=0D + SizeOfY =3D GraphicsOutput->Mode->Info->VerticalResolution;=0D + CoordinateX =3D 0;=0D + CoordinateY =3D 0;=0D + Height =3D VkImage->Height;=0D + Width =3D VkImage->Width;=0D + Blt =3D VkImage->Bitmap;=0D + BltSize =3D sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * (UINT32)(Wid= th * Height);=0D +=0D + //=0D + // Calculate the display position according to Attribute.=0D + //=0D + switch (Attribute) {=0D + case VkDisplayAttributeSimpleTop:=0D + DestX =3D CoordinateX;=0D + DestY =3D CoordinateY;=0D + break;=0D +=0D + case VkDisplayAttributeFullTop:=0D + DestX =3D (SizeOfX - Width - CoordinateX);=0D + DestY =3D CoordinateY;;=0D + break;=0D +=0D + case VkDisplayAttributeFullBottom:=0D + DestX =3D (SizeOfX - Width - CoordinateX);=0D + DestY =3D (SizeOfY - Height - CoordinateY);=0D + VkContext->FullIconBackStartX =3D DestX;=0D + VkContext->FullIconBackStartY =3D DestY;=0D + break;=0D +=0D + case VkDisplayAttributeSimpleBottom:=0D + DestX =3D CoordinateX;=0D + DestY =3D (SizeOfY - Height - CoordinateY);=0D +=0D + //=0D + // Save to check icon/screen cleared=0D + //=0D + if (VkContext->IconBltBuffer =3D=3D NULL) {=0D + VkContext->IconBltSize =3D BltSize;=0D + VkContext->IconBltWidth =3D Width;=0D + VkContext->IconBltHeight =3D Height;=0D + VkContext->IconBltBuffer =3D AllocateZeroPool (BltSize);=0D + }=0D + CopyMem (VkContext->IconBltBuffer, Blt, VkContext->IconBltSize);=0D +=0D + VkContext->SimIconBackStartX =3D DestX;=0D + VkContext->SimIconBackStartY =3D DestY;=0D + break;=0D +=0D + case VkDisplayAttributeNone:=0D + return EFI_SUCCESS;=0D +=0D + default:=0D + return EFI_INVALID_PARAMETER;=0D + }=0D +=0D + if ((DestX >=3D 0) && (DestY >=3D 0)) {=0D + //=0D + // Store icon background framebuffer=0D + //=0D + SaveVkIconBackgroundBltBuffer (VkContext, Attribute);=0D + Status =3D GraphicsOutput->Blt (=0D + GraphicsOutput,=0D + Blt,=0D + EfiBltBufferToVideo,=0D + 0,=0D + 0,=0D + (UINTN) DestX,=0D + (UINTN) DestY,=0D + Width,=0D + Height,=0D + Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIX= EL)=0D + );=0D + }=0D +=0D + return Status;=0D +}=0D +=0D +/**=0D + Use to draw the keyboard.=0D +=0D + @param[in] VkContext Pointer to virtual keyboard's context=0D + @param[in] VkImage Image of keyboard to display on the screen.=0D + @param[in] Attribute Attribute of keyboard to display on the screen.=0D +=0D + @retval EFI_SUCCESS ConsoleControl has been flipped to graphic= s and keyboard displayed.=0D + @retval EFI_UNSUPPORTED KeyboardFile not found=0D + @retval EFI_INVALID_PARAMETER Attribute is unknown.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +DrawVkBody (=0D + IN VK_CONTEXT *VkContext,=0D + IN EFI_IMAGE_INPUT *VkImage,=0D + IN VK_DISPLAY_ATTRIBUTE Attribute=0D + )=0D +{=0D + EFI_STATUS Status;=0D + UINT32 SizeOfX;=0D + UINT32 SizeOfY;=0D + INTN DestX;=0D + INTN DestY;=0D + UINTN BltSize;=0D + UINTN Height;=0D + UINTN Width;=0D + UINTN CoordinateY;=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltIn;=0D + EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;=0D +=0D + Status =3D EFI_SUCCESS;=0D + GraphicsOutput =3D VkContext->GraphicsOutput;=0D + SizeOfX =3D GraphicsOutput->Mode->Info->HorizontalResolution;=0D + SizeOfY =3D GraphicsOutput->Mode->Info->VerticalResolution;=0D + CoordinateY =3D 0;=0D + Height =3D VkImage->Height;=0D + Width =3D VkImage->Width;=0D + BltSize =3D sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) * (UINT32)(Wid= th * Height);=0D + BltIn =3D AllocateCopyPool (BltSize, VkImage->Bitmap);=0D +=0D + if (BltIn =3D=3D NULL) {=0D + return EFI_OUT_OF_RESOURCES;=0D + }=0D +=0D + //=0D + // Calculate the display position according to Attribute.=0D + //=0D + switch (Attribute) {=0D + case VkDisplayAttributeSimpleTop:=0D + DestX =3D ((SizeOfX / 2) - Width) / 4;=0D + DestY =3D CoordinateY;=0D + VkContext->CurrentKeyboardDisplay =3D VkDisplayAttributeSimpleTop;=0D + break;=0D +=0D + case VkDisplayAttributeSimpleBottom:=0D + DestX =3D ((SizeOfX / 2) - Width) / 4;=0D + DestY =3D (SizeOfY - Height - CoordinateY);=0D + VkContext->CurrentKeyboardDisplay =3D VkDisplayAttributeSimpleBottom;= =0D + break;=0D +=0D + case VkDisplayAttributeFullTop:=0D + DestX =3D (SizeOfX - Width) / 2;=0D + DestY =3D CoordinateY;=0D + VkContext->CurrentKeyboardDisplay =3D VkDisplayAttributeFullTop;=0D + break;=0D +=0D + case VkDisplayAttributeFullBottom:=0D + DestX =3D (SizeOfX - Width) / 2;=0D + DestY =3D (SizeOfY - Height - CoordinateY);=0D + VkContext->CurrentKeyboardDisplay =3D VkDisplayAttributeFullBottom;=0D + break;=0D +=0D + case VkDisplayAttributeNone:=0D + VkContext->CurrentKeyboardDisplay =3D VkDisplayAttributeNone;=0D + goto DVKBODY_Exit;=0D +=0D + default:=0D + VkContext->CurrentKeyboardDisplay =3D VkDisplayAttributeNone;=0D + Status =3D EFI_INVALID_PARAMETER;=0D + goto DVKBODY_Exit;=0D + }=0D + if ((DestX >=3D 0) && (DestY >=3D 0)) {=0D + SetCharacterPosition (VkContext, (UINT32)DestX, (UINT32)DestY);=0D +=0D + //=0D + // Store current framebuffer=0D + //=0D + VkContext->VkBodyBltStartX =3D DestX;=0D + VkContext->VkBodyBltStartY =3D DestY;=0D + VkContext->VkBodyBltHeight =3D Height;=0D + VkContext->VkBodyBltWidth =3D Width;=0D + SaveVkBodyBackgroundBltBuffer (VkContext, BltSize);=0D +=0D + //=0D + // Free compound buffer first.=0D + //=0D + if (VkContext->VkBodyCompoundBltBuffer !=3D NULL) {=0D + FreePool (VkContext->VkBodyCompoundBltBuffer);=0D + }=0D + VkContext->VkBodyCompoundBltBuffer =3D NULL;=0D + ModifyShiftKeyColor (VkContext, &BltIn);=0D + MakeKeyboardTransparent (VkContext, TRUE, BltIn, &(VkContext->VkBodyCo= mpoundBltBuffer));=0D +=0D + //=0D + // Draw keyboard body=0D + //=0D + Status =3D GraphicsOutput->Blt (=0D + GraphicsOutput,=0D + VkContext->VkBodyCompoundBltBuffer,=0D + EfiBltBufferToVideo,=0D + 0,=0D + 0,=0D + (UINTN) DestX,=0D + (UINTN) DestY,=0D + Width,=0D + Height,=0D + Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIX= EL)=0D + );=0D + }=0D +=0D +=0D +DVKBODY_Exit:=0D + if (BltIn !=3D NULL) {=0D + FreePool (BltIn);=0D + }=0D +=0D + return Status;=0D +}=0D +=0D +/**=0D + Clear the keyboard body=0D +=0D + @param VkContext Code context.=0D +=0D + @retval EFI_SUCCESS Clear rectangle is done.=0D +=0D +**/=0D +EFI_STATUS=0D +HideVkBody (=0D + IN VK_CONTEXT *VkContext=0D + )=0D +{=0D + RestoreVkBodyBackgroundBltBuffer (VkContext);=0D + VkContext->CurrentKeyboardDisplay =3D VkDisplayAttributeNone;=0D +=0D + return EFI_SUCCESS;=0D +}=0D +=0D +=0D +/**=0D + Clear the keyboard icon=0D +=0D + @param VkContext Code context.=0D +=0D + @retval EFI_SUCCESS Clear rectangle is done.=0D +=0D +**/=0D +EFI_STATUS=0D +HideVkIcon (=0D + IN VK_CONTEXT *VkContext=0D + )=0D +{=0D + EFI_STATUS Status;=0D +=0D + if ((VkContext->FullIconBackBuffer =3D=3D NULL) || (VkContext->SimIconBa= ckBuffer =3D=3D NULL)) {=0D + return EFI_UNSUPPORTED;=0D + }=0D +=0D + if ((VkContext->FullIconUpdatedFlag =3D=3D FALSE) || (VkContext->SimIcon= UpdatedFlag =3D=3D FALSE)) {=0D + return EFI_UNSUPPORTED;=0D + }=0D + Status =3D VkContext->GraphicsOutput->Blt (=0D + VkContext->GraphicsOutput,=0D + VkContext->FullIconBackBuffer,=0D + EfiBltBufferToVideo,=0D + 0,=0D + 0,=0D + VkContext->FullIconBackStartX,=0D + VkContext->FullIconBackStartY,=0D + VkContext->FullIconBackWidth,=0D + VkContext->FullIconBackHeight,=0D + VkContext->FullIconBackWidth * siz= eof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)=0D + );=0D +=0D + ZeroMem (VkContext->FullIconBackBuffer, VkContext->FullIconBackSize);=0D + VkContext->FullIconUpdatedFlag =3D FALSE;=0D +=0D +=0D + Status =3D VkContext->GraphicsOutput->Blt (=0D + VkContext->GraphicsOutput,=0D + VkContext->SimIconBackBuffer,=0D + EfiBltBufferToVideo,=0D + 0,=0D + 0,=0D + VkContext->SimIconBackStartX,=0D + VkContext->SimIconBackStartY,=0D + VkContext->SimIconBackWidth,=0D + VkContext->SimIconBackHeight,=0D + VkContext->SimIconBackWidth * size= of (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)=0D + );=0D + if (!EFI_ERROR (Status)) {=0D + if (VkContext->ScreenCheckBuffer =3D=3D NULL) {=0D + VkContext->ScreenCheckBufferSize =3D VkContext->SimIconBackHeight *= =0D + VkContext->SimIconBackWidth *=0D + sizeof (EFI_GRAPHICS_OUTPUT_BLT_P= IXEL);=0D + VkContext->ScreenCheckBuffer =3D AllocateZeroPool (VkContext->Screen= CheckBufferSize);=0D + }=0D +=0D + CopyMem (=0D + VkContext->ScreenCheckBuffer,=0D + VkContext->SimIconBackBuffer,=0D + (VkContext->SimIconBackHeight * VkContext->SimIconBackWidth * sizeof= (EFI_GRAPHICS_OUTPUT_BLT_PIXEL))=0D + );=0D + }=0D + ZeroMem (VkContext->SimIconBackBuffer, VkContext->SimIconBackSize);=0D + VkContext->SimIconUpdatedFlag =3D FALSE;=0D +=0D + return EFI_SUCCESS;=0D +}=0D +=0D +/**=0D + Draw key board on the display=0D +=0D + @param[in] VkContext Graphic Protocol for draw the alphabet.=0D +=0D + @retval EFI_SUCCESS Draw keyboard was done.=0D + @retval EFI_UNSUPPORTED Did not get key mapping table.=0D +=0D +**/=0D +EFI_STATUS=0D +DrawKeyboardLayout (=0D + IN VK_CONTEXT *VkContext=0D + )=0D +{=0D + EFI_STATUS Status;=0D + if (!VkContext->IsIconShowed) {=0D + Status =3D DrawVkIcon (VkContext, VkContext->SmallIcon, VkDisplayAttri= buteSimpleTop);=0D + ASSERT_EFI_ERROR (Status);=0D +=0D + Status =3D DrawVkIcon (VkContext, VkContext->SmallIcon, VkDisplayAttri= buteSimpleBottom);=0D + ASSERT_EFI_ERROR (Status);=0D +=0D + Status =3D DrawVkIcon (VkContext, VkContext->FullIcon, VkDisplayAttri= buteFullTop);=0D + ASSERT_EFI_ERROR (Status);=0D +=0D + Status =3D DrawVkIcon (VkContext, VkContext->FullIcon, VkDisplayAttri= buteFullBottom);=0D + ASSERT_EFI_ERROR (Status);=0D + VkContext->IsIconShowed =3D TRUE;=0D + }=0D +=0D + if (VkContext->TargetKeyboardDisplay !=3D VkContext->CurrentKeyboardDisp= lay) {=0D + switch (VkContext->TargetKeyboardDisplay) {=0D + case VkDisplayAttributeSimpleTop:=0D + case VkDisplayAttributeSimpleBottom:=0D + DrawVkBody (VkContext, VkContext->SimKeyBody, VkContext->TargetKeybo= ardDisplay);=0D + break;=0D +=0D + case VkDisplayAttributeFullTop:=0D + case VkDisplayAttributeFullBottom:=0D + if (VkContext->PageNumber <=3D VkPage1) {=0D + DrawVkBody (VkContext, VkContext->CapLeKeyBody, VkContext->TargetK= eyboardDisplay);=0D + } else {=0D + DrawVkBody (VkContext, VkContext->DigKeyBody, VkContext->TargetKey= boardDisplay);=0D + }=0D +=0D + case VkDisplayAttributeNone:=0D + break;=0D +=0D + default:=0D + break;=0D + }=0D + }=0D +=0D + return EFI_SUCCESS;=0D +}=0D +=0D +/**=0D + Set the keyboard layout.=0D +=0D + @param[in] VkContext Graphic Protocol for draw the alphabet.=0D + @param[in] Index The layout selected.=0D +=0D + @retval EFI_SUCCESS Draw keyboard was done.=0D + @retval Others An unexpected error occurred.=0D +=0D +**/=0D +EFI_STATUS=0D +KeyboardLayoutHandler (=0D + IN VK_CONTEXT *VkContext,=0D + IN UINT32 Index=0D + )=0D +{=0D + EFI_STATUS Status;=0D +=0D + Status =3D EFI_SUCCESS;=0D +=0D + if (Index =3D=3D (VkContext->NumOfKeysInfo - 4)) {=0D + //=0D + // Touch the LeftTop icon=0D + //=0D + if (VkContext->CurrentKeyboardDisplay =3D=3D VkDisplayAttributeSimpleT= op) {=0D + VkContext->TargetKeyboardDisplay =3D VkDisplayAttributeNone;=0D + } else {=0D + VkContext->TargetKeyboardDisplay =3D VkDisplayAttributeSimpleTop;=0D + }=0D + } else if (Index =3D=3D (VkContext->NumOfKeysInfo - 3)) {=0D + //=0D + // Touch the LeftBottom icon=0D + //=0D + if (VkContext->CurrentKeyboardDisplay =3D=3D VkDisplayAttributeSimpleB= ottom) {=0D + VkContext->TargetKeyboardDisplay =3D VkDisplayAttributeNone;=0D + } else {=0D + VkContext->TargetKeyboardDisplay =3D VkDisplayAttributeSimpleBottom;= =0D + }=0D + } else if (Index =3D=3D (VkContext->NumOfKeysInfo - 2)) {=0D + //=0D + // Touch the RightTop icon=0D + //=0D + if (VkContext->CurrentKeyboardDisplay =3D=3D VkDisplayAttributeFullTop= ) {=0D + VkContext->TargetKeyboardDisplay =3D VkDisplayAttributeNone;=0D + } else {=0D + VkContext->TargetKeyboardDisplay =3D VkDisplayAttributeFullTop;=0D + }=0D + } else {=0D + //=0D + // Touch the RightBottom icon=0D + //=0D + if (VkContext->CurrentKeyboardDisplay =3D=3D VkDisplayAttributeFullBot= tom) {=0D + VkContext->TargetKeyboardDisplay =3D VkDisplayAttributeNone;=0D + } else {=0D + VkContext->TargetKeyboardDisplay =3D VkDisplayAttributeFullBottom;=0D + }=0D + }=0D +=0D + if (VkContext->TargetKeyboardDisplay =3D=3D VkDisplayAttributeNone) {=0D + //=0D + // Just hide the current keyboard=0D + //=0D + HideVkBody (VkContext);=0D + VkContext->KeyTouchedTimeOut =3D VK_REPEAT_TIMEOUT;=0D +=0D + } else {=0D + //=0D + // If current keyboard status is NOT none,=0D + // hide current keyboard first and then draw the target keyboard=0D + //=0D + if (VkContext->CurrentKeyboardDisplay !=3D VkDisplayAttributeNone) {=0D + HideVkBody (VkContext);=0D + }=0D + Status =3D DrawKeyboardLayout (VkContext);=0D + }=0D +=0D + return Status;=0D +}=0D +=0D +/**=0D + This routine is used to check if icon has been cleared.=0D +=0D + @param[in] VkContext Pointer to virtual keyboard's context=0D +=0D + @retval EFI_SUCCESS Function completed.=0D +=0D +**/=0D +EFI_STATUS=0D +CheckIconCleared (=0D + IN VK_CONTEXT *VkContext=0D + )=0D +{=0D + EFI_STATUS Status;=0D + UINT32 VerticalResolution;=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer;=0D +=0D + Status =3D EFI_SUCCESS;=0D + BltBuffer =3D NULL;=0D + VkContext->IconReDrawCheck++;=0D + if (VkContext->IconReDrawCheck <=3D 10) {=0D + //=0D + // Check it every 10 * 100ms.=0D + //=0D + return Status;=0D + }=0D +=0D + //=0D + // Check if right-bottomed region is black, if yes, clean screen happene= d, need to re-draw keyboard.=0D + //=0D + VerticalResolution =3D VkContext->GraphicsOutput->Mode->Info->Vertica= lResolution;=0D + BltBuffer =3D AllocateZeroPool (VkContext->IconBltSize);=0D + if (BltBuffer =3D=3D NULL) {=0D + return EFI_OUT_OF_RESOURCES;=0D + }=0D + Status =3D VkContext->GraphicsOutput->Blt (=0D + VkContext->GraphicsOutput,=0D + BltBuffer,=0D + EfiBltVideoToBltBuffer,=0D + 0,=0D + (VerticalResolution - VkContext->I= conBltHeight),=0D + 0,=0D + 0,=0D + VkContext->IconBltWidth,=0D + VkContext->IconBltHeight,=0D + VkContext->IconBltWidth * sizeof (= EFI_GRAPHICS_OUTPUT_BLT_PIXEL)=0D + );=0D + if (EFI_ERROR (Status)) {=0D + FreePool (BltBuffer);=0D + return Status;=0D + }=0D + VkContext->IsIconShowed =3D TRUE;=0D + if (VkContext->IconBltBuffer =3D=3D NULL) {=0D + //=0D + // No icon has been drawn.=0D + //=0D + VkContext->IsIconShowed =3D FALSE;=0D + } else {=0D + if (CompareMem (BltBuffer, VkContext->IconBltBuffer, VkContext->IconBl= tSize) !=3D 0) {=0D + //=0D + // Icon has been overridden, need to re-draw.=0D + //=0D + VkContext->IsIconShowed =3D FALSE;=0D + }=0D + }=0D +=0D + if (VkContext->IsIconShowed =3D=3D FALSE) {=0D + if (VkContext->ScreenCheckBuffer !=3D NULL) {=0D + if (CompareMem (BltBuffer, VkContext->ScreenCheckBuffer, VkContext->= IconBltSize) =3D=3D 0) {=0D + //=0D + // Icon has been overridden, force to re-draw the keyboard.=0D + //=0D + Status =3D DrawKeyboardLayout (VkContext);=0D + } else {=0D + //=0D + // Save blt buffer of icon position and use it to check if icon is= overridden.=0D + //=0D + CopyMem (VkContext->ScreenCheckBuffer, BltBuffer, VkContext->IconB= ltSize);=0D + }=0D + } else {=0D + //=0D + // Draw the keyboard.=0D + //=0D + Status =3D DrawKeyboardLayout (VkContext);=0D + }=0D + }=0D +=0D + if (BltBuffer !=3D NULL) {=0D + FreePool (BltBuffer);=0D + }=0D +=0D + VkContext->IconReDrawCheck =3D 0;=0D +=0D + return Status;=0D +}=0D +=0D +/**=0D + ConvertCoordinate - Convert the touch panel's coordinate to display's co= ordinate.=0D +=0D + @param[in] VkContext Virtual Keyboard context.=0D + @param[in] Point The coordinate reported from touch pan= el.=0D + @param[out] TouchX The coordinate X converted to display = panel.=0D + @param[out] TouchY The coordinate Y converted to display = panel..=0D +=0D + @retval EFI_SUCCESS Convert success.=0D +=0D +**/=0D +EFI_STATUS=0D +ConvertCoordinate (=0D + IN VK_CONTEXT *VkContext,=0D + IN EFI_ABSOLUTE_POINTER_STATE Point,=0D + OUT UINT32 *TouchX,=0D + OUT UINT32 *TouchY=0D + )=0D +{=0D + UINT64 AbsoluteMaxX;=0D + UINT64 AbsoluteMaxY;=0D + UINT32 HorizontalResolution;=0D + UINT32 VerticalResolution;=0D +=0D + AbsoluteMaxX =3D VkContext->AbsolutePointer->Mode->AbsoluteMaxX;= =0D + AbsoluteMaxY =3D VkContext->AbsolutePointer->Mode->AbsoluteMaxY;= =0D + HorizontalResolution =3D VkContext->GraphicsOutput->Mode->Info->Horizont= alResolution;=0D + VerticalResolution =3D VkContext->GraphicsOutput->Mode->Info->Vertical= Resolution;=0D + *TouchX =3D (UINT32) MultU64x32 (Point.CurrentX, Horizontal= Resolution) / (UINT32) AbsoluteMaxX;=0D + *TouchY =3D (UINT32) MultU64x32 (Point.CurrentY, VerticalRe= solution) / (UINT32) AbsoluteMaxY;=0D +=0D + return EFI_SUCCESS;=0D +}=0D +=0D +/**=0D + This routine is used to check if screen has been cleared.=0D +=0D + @param[in] VkContext Pointer to virtual keyboard's context=0D +=0D + @retval EFI_SUCCESS Function completed.=0D +=0D +**/=0D +EFI_STATUS=0D +CheckScreenCleared (=0D + IN VK_CONTEXT *VkContext=0D + )=0D +{=0D + EFI_STATUS Status;=0D + UINT32 HorizontalResolution;=0D + UINT32 VerticalResolution;=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer;=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBufferIndex;=0D + UINTN BltSize;=0D + BOOLEAN IsScreenCleared;=0D +=0D + //=0D + // Check left-bottom side.=0D + // If IconBltBuffer is null, checking is meaningless.=0D + //=0D + if (VkContext->IconBltBuffer =3D=3D NULL) {=0D + return EFI_SUCCESS;=0D + }=0D +=0D + IsScreenCleared =3D FALSE;=0D + Status =3D EFI_SUCCESS;=0D + if ((gST->ConOut->Mode->CursorColumn =3D=3D 0) && (gST->ConOut->Mode->Cu= rsorRow =3D=3D 0)) {=0D + //=0D + // System may call gST->ConOut->ClearScreen=0D + //=0D + HorizontalResolution =3D VkContext->GraphicsOutput->Mode->Info->Horiz= ontalResolution;=0D + VerticalResolution =3D VkContext->GraphicsOutput->Mode->Info->Verti= calResolution;=0D + BltBuffer =3D AllocateZeroPool (VkContext->IconBltSize);=0D + if (BltBuffer =3D=3D NULL) {=0D + return EFI_OUT_OF_RESOURCES;=0D + }=0D +=0D + BltBufferIndex =3D BltBuffer;=0D + Status =3D VkContext->GraphicsOutput->Blt (=0D + VkContext->GraphicsOutput,=0D + BltBuffer,=0D + EfiBltVideoToBltBuffer,=0D + (HorizontalResolution - VkContex= t->IconBltWidth),=0D + (VerticalResolution - VkContext-= >IconBltHeight),=0D + 0,=0D + 0,=0D + VkContext->IconBltWidth,=0D + VkContext->IconBltHeight,=0D + VkContext->IconBltWidth * sizeof= (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)=0D + );=0D + if (EFI_ERROR (Status)) {=0D + FreePool (BltBuffer);=0D + return Status;=0D + }=0D + BltSize =3D VkContext->IconBltHeight * VkContext->IconBltWidth;=0D + IsScreenCleared =3D TRUE;=0D + while (BltSize-- !=3D 0) {=0D + if ((BltBufferIndex->Red !=3D 0) || (BltBufferIndex->Green !=3D 0) |= | (BltBufferIndex->Blue !=3D 0)) {=0D + IsScreenCleared =3D FALSE;=0D + break;=0D + }=0D + BltBufferIndex++;=0D + }=0D + FreePool (BltBuffer);=0D + }=0D +=0D + if (IsScreenCleared) {=0D + VkContext->IsIconShowed =3D FALSE;=0D + VkContext->CurrentKeyboardDisplay =3D VkDisplayAttributeNone;=0D +=0D + if (VkContext->VkBodyBackgroundBltBuffer !=3D NULL) {=0D + FreePool (VkContext->VkBodyBackgroundBltBuffer);=0D + VkContext->VkBodyBackgroundBltBuffer =3D NULL;=0D + }=0D +=0D + if (VkContext->VkBodyCompoundBltBuffer !=3D NULL) {=0D + FreePool (VkContext->VkBodyCompoundBltBuffer);=0D + VkContext->VkBodyCompoundBltBuffer =3D NULL;=0D + }=0D +=0D + if (VkContext->IconBltBuffer !=3D NULL) {=0D + FreePool (VkContext->IconBltBuffer);=0D + VkContext->IconBltBuffer =3D NULL;=0D + }=0D +=0D + }=0D +=0D + return Status;=0D +}=0D +=0D +/**=0D + This routine is used to check if background beneath virtual keyboard has= been cleared.=0D +=0D + @param[in] VkContext Pointer to virtual keyboard's context=0D +=0D + @retval EFI_SUCCESS Function completed.=0D +=0D +**/=0D +EFI_STATUS=0D +CheckBackgroundChanged (=0D + IN VK_CONTEXT *VkContext=0D + )=0D +{=0D + EFI_STATUS Status;=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer;=0D +=0D + Status =3D EFI_SUCCESS;=0D + VkContext->IsBackgroundChanged =3D FALSE;=0D +=0D + if ((VkContext->CurrentKeyboardDisplay =3D=3D VkDisplayAttributeNone) ||= (VkContext->VkBodyCompoundBltBuffer =3D=3D NULL)) {=0D + return EFI_SUCCESS;=0D + }=0D +=0D + BltBuffer =3D AllocateZeroPool (VkContext->VkBodyBltSize);=0D + if (BltBuffer =3D=3D NULL) {=0D + return EFI_OUT_OF_RESOURCES;=0D + }=0D + Status =3D VkContext->GraphicsOutput->Blt (=0D + VkContext->GraphicsOutput,=0D + BltBuffer,=0D + EfiBltVideoToBltBuffer,=0D + VkContext->VkBodyBltStartX,=0D + VkContext->VkBodyBltStartY,=0D + 0,=0D + 0,=0D + VkContext->VkBodyBltWidth,=0D + VkContext->VkBodyBltHeight,=0D + VkContext->VkBodyBltWidth * sizeof= (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)=0D + );=0D + if (EFI_ERROR (Status)) {=0D + FreePool (BltBuffer);=0D + return Status;=0D + }=0D + if (CompareMem (BltBuffer, VkContext->VkBodyCompoundBltBuffer, VkContext= ->VkBodyBltSize) !=3D 0) {=0D + VkContext->IsBackgroundChanged =3D TRUE;=0D + VkContext->CurrentKeyboardDisplay =3D VkDisplayAttributeNone;=0D + DrawKeyboardLayout (VkContext);=0D + }=0D +=0D + if (BltBuffer !=3D NULL) {=0D + FreePool (BltBuffer);=0D + }=0D +=0D + return Status;=0D +}=0D +=0D +/**=0D + Get unicode by VkContext->PageNumber and VkContext->KeyboardBodyPtr.=0D +=0D + @param[in] VkContext Address of an VK_CONTEXT structure.=0D + @param[in] KeyItem Key Item.=0D + @param[out] FontPtr Follow VkContext->PageNumber to transla= te=0D + font unicode.=0D +=0D + @retval EFI_SUCCESS Finish translating FontPtr.=0D + @retval EFI_INVALID_PARAMETER VkContext or FontPtr is NULL.=0D +=0D +**/=0D +EFI_STATUS=0D +VkGetMappingFont (=0D + IN VK_CONTEXT *VkContext,=0D + IN VK_STRUCT KeyItem,=0D + OUT UINT32 *FontPtr=0D + )=0D +{=0D + if ((VkContext =3D=3D NULL) || (FontPtr =3D=3D NULL) || (VkContext->Page= Number>=3DVkPageMaximum)) {=0D + return EFI_INVALID_PARAMETER;=0D + }=0D + *FontPtr =3D (UINT32) KeyItem.PageFont[VkContext->PageNumber];=0D +=0D + return EFI_SUCCESS;=0D +}=0D diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Virtual= KeyboardDxe/KeyboardLayout.idf b/Features/Intel/UserInterface/VirtualKeyboa= rdFeaturePkg/VirtualKeyboardDxe/KeyboardLayout.idf new file mode 100644 index 0000000000..995bd0d859 --- /dev/null +++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboar= dDxe/KeyboardLayout.idf @@ -0,0 +1,12 @@ +// /** @file=0D +// Virtual Keyboard Layout=0D +//=0D +// Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
    = =0D +//=0D +// SPDX-License-Identifier: BSD-2-Clause-Patent=0D +//=0D +#image IMG_VK_CAPITALLETTERKEYBOARD TRANSPARENT CapitalLetterKeyboard.bmp= =0D +#image IMG_VK_DIGITKEYBOARD TRANSPARENT DigitKeyboard.bmp=0D +#image IMG_VK_FULLICON TRANSPARENT FullIcon.bmp=0D +#image IMG_VK_SIMPLEICON TRANSPARENT SimpleIcon.bmp=0D +#image IMG_VK_SIMPLEKEYBOARD TRANSPARENT SimpleKeyboard.bmp=0D diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Virtual= KeyboardDxe/SimpleIcon.bmp b/Features/Intel/UserInterface/VirtualKeyboardFe= aturePkg/VirtualKeyboardDxe/SimpleIcon.bmp new file mode 100644 index 0000000000000000000000000000000000000000..16816f031eb98bf8169c7119b95= ea3ed1371f41d GIT binary patch literal 2814 zcmeHDu?>JQ41<*mn3%bM1K9bStAMDgEvtknP%#v#jj+gU5{W9DB#Qt~ueEazM`sKHo|BsLM z*}=3D!|d)xXGP=3DM>Qqv~}j(Q%zBZCbCb!q%%qN2e-vPQf-|Q&6HB3RQjm|E3w{+S+w% zYin*i0t!_jQj?oqlAkf?LVK=3DJsLDy2n^ps~Z)2roqTN_UCMnMvSsfl8o}ZtmguxGO znO4`d{2JWZ*?D<+u{>{YZwChlZiscU0;t#5R|q>jJ#~_JSRpIUod!YKNlf8ttQ@Ee zuF6?;f=3Dc14nU!8VjgQ;A#aJz?xu9Zo)yc|%dU|?#cz7^4@9*zdS65nKtgZ@KIZ%&} zkNf-k_xJZ?b#!!ec6LTwpa&0rY1YOng4*5P-QM1ItU%`S^3vfNn-%Y2%uuPTzZX>| z;DCw(C!ZEba>G|ZkLD+t49ndj%{_~>EoXB>8{ zWDOcCJgg?kKsmbX=3DqVa1C^wX7Vj6f1&4e9f#BS0^h4RUs>^IQKZ| z=3DH`aiF#sVGIQbnBoc!oo&-Kc#P7znEt4>hpUK=3DY++2Ojqz18;_uCK3WCH8a2iZad> zvWmC}M-2z6&bqQ9an+@iVnx+lS9x5qq8cj@h}D$>h2T1`S5_ysKR!Oz1<1$W8e?{2 z1rEfO0fn%}%4!C<@}O4C%2Z|cIB~XRVqB9gALopRzY_P(k5t-sW#5a&DL4;RIe+G` zvC6=3D4O^dPON$G10URQ29qaIF>l}W;W)QR^^PF2$prjjPB%86`;jlfU@`Yz!y;^SP# z7^QDcr>bxF@#0n3c%$^qOjUh5jva5p#vY|_{-&y&SYy>#l@lnBY<1OGl@lnBY<1OG zl@lnB{B(6y_^nPkf$~Vl3QCsW%11{ehtpmuRTi(2YU81j9xiF~t2yTBRK?a3gOjCE z(u*;jy*gDP61{BC?lkb{f%p#tJS;a-2{)CMy=3D`)FaZ!$lk@c{`i(Y&!htuz648n>U zY(=3D=3Dez6lv4Q_sKLJ8Z~_Vt`s~IzhJvwMipgHVrGcHDT<9l}M*k^;7gO*^z+aA}jqn zVhxCI;ie*yYHx3kl3+Mh+C+JH?~8w>Yw>tSxxjXEa>8CZklCwY1^xEopADJs7w4Tuv4hGPBg)mQsuzcnV3pcf<%wljSw{_6f!*qA8OT$p_Nc$9 zicC_T#wtZ7`WvgrB;{$WQe>jPv5HJmp2jLg#`z5t_RhcFL#mpNFqJe}RZe6(>?H65 D{aYn_ literal 0 HcmV?d00001 diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Virtual= KeyboardDxe/VirtualKeyboard.h b/Features/Intel/UserInterface/VirtualKeyboar= dFeaturePkg/VirtualKeyboardDxe/VirtualKeyboard.h new file mode 100644 index 0000000000..a7e7a26841 --- /dev/null +++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboar= dDxe/VirtualKeyboard.h @@ -0,0 +1,829 @@ +/** @file=0D + Header file for Virtual Keyboard driver.=0D +=0D + Copyright (c) 2012 - 2020, Intel Corporation. All rights reserved.
    =0D + SPDX-License-Identifier: BSD-2-Clause-Patent=0D +=0D +**/=0D +=0D +#ifndef _VIRTUAL_KEYBOARD_H_=0D +#define _VIRTUAL_KEYBOARD_H_=0D +=0D +#include =0D +#include =0D +#include =0D +#include =0D +#include =0D +#include =0D +#include =0D +#include =0D +#include =0D +#include =0D +#include =0D +#include =0D +#include =0D +#include =0D +#include =0D +#include =0D +#include =0D +#include =0D +#include =0D +#include "ComponentName.h"=0D +=0D +//=0D +// Global Variables=0D +//=0D +extern EFI_DRIVER_BINDING_PROTOCOL gVirtualKeyboardDriverBinding;=0D +extern EFI_COMPONENT_NAME_PROTOCOL gVirtualKeyboardComponentName;=0D +extern EFI_COMPONENT_NAME2_PROTOCOL gVirtualKeyboardComponentName2;=0D +=0D +///=0D +/// Debug raw data points=0D +///=0D +#define DEBUG_VK_POINTS 0x40000000=0D +=0D +///=0D +/// Debug data point scaling=0D +///=0D +#define DEBUG_VK_POINT_SCALING 0x20000000=0D +=0D +///=0D +/// Debug key press=0D +///=0D +#define DEBUG_VK_KEYS 0x10000000=0D +=0D +///=0D +/// Debug routine entry and exit=0D +///=0D +#define DEBUG_VK_ROUTINE_ENTRY_EXIT 0x08000000=0D +=0D +///=0D +/// Display the graphics info=0D +///=0D +#define DEBUG_VK_GRAPHICS_INFO 0x04000000=0D +=0D +///=0D +/// Display the timer entry and exit=0D +///=0D +#define DEBUG_VK_TIMER_ENTRY_EXIT 0x00100000=0D +=0D +///=0D +/// Signature=0D +///=0D +#define VK_SIGNATURE SIGNATURE_32 ('V', 'K', 'e', 'y')=0D +#define VK_NOTIFY_SIGNATURE SIGNATURE_32 ('V', 'K', 'n', 's')=0D +=0D +///=0D +/// Poll interval=0D +///=0D +#define VK_POLL_INTERVAL (1000 * 1000)=0D +=0D +///=0D +/// Define the touch timeout in poll intervals=0D +///=0D +#define VK_REPEAT_TIMEOUT 5=0D +=0D +///=0D +/// TPL used to synchronize add/remove from list=0D +///=0D +#define TPL_VK_SYNC TPL_NOTIFY=0D +=0D +///=0D +/// Dimension of an array ( number of elements )=0D +///=0D +#define DIM(x) ( sizeof ( x ) / sizeof ( x [ 0 ]))=0D +=0D +///=0D +/// Define Key buffer=0D +///=0D +#define MAX_KEY_BUF_SIZE 64=0D +=0D +///=0D +/// Define Transparent Weight=0D +///=0D +#define TRANSPARENCY_WEIGHT 50=0D +=0D +typedef struct _VK_CONTEXT VK_CONTEXT;=0D +=0D +typedef enum _VK_KEY_TYPE {=0D + VkKeyNull =3D 0x0000 | CHAR_NULL,=0D + VkKeyBackspace =3D 0x0000 | CHAR_BACKSPACE,=0D + VkKeyTab =3D 0x0000 | CHAR_TAB,=0D + VkKeyEnter =3D 0x0000 | CHAR_CARRIAGE_RETURN,=0D + VkKeyScanMask =3D 0x1000,=0D + VkKeyEsc =3D 0x1000 | SCAN_ESC,=0D + VkKeyLeft =3D 0x1000 | SCAN_LEFT,=0D + VkKeyRight =3D 0x1000 | SCAN_RIGHT,=0D + VkKeyUp =3D 0x1000 | SCAN_UP,=0D + VkKeyDown =3D 0x1000 | SCAN_DOWN,=0D + VkKeyF1 =3D 0x1000 | SCAN_F1,=0D + VkKeyF2 =3D 0x1000 | SCAN_F2,=0D + VkKeyF3 =3D 0x1000 | SCAN_F3,=0D + VkKeyF4 =3D 0x1000 | SCAN_F4,=0D + VkKeyF5 =3D 0x1000 | SCAN_F5,=0D + VkKeyF6 =3D 0x1000 | SCAN_F6,=0D + VkKeyF7 =3D 0x1000 | SCAN_F7,=0D + VkKeyF8 =3D 0x1000 | SCAN_F8,=0D + VkKeyF9 =3D 0x1000 | SCAN_F9,=0D + VkKeyF10 =3D 0x1000 | SCAN_F10,=0D + VkKeyF11 =3D 0x1000 | SCAN_F11,=0D + VkKeyF12 =3D 0x1000 | SCAN_F12,=0D + VkKeySpecificMask =3D 0x2000,=0D + VkKeyShift =3D 0x2000 | 0x0000,=0D + VkKeyCapslock =3D 0x2000 | 0x0001,=0D + VkKeyTwoPage =3D 0x2000 | 0x0002,=0D + VkKeyTypeMaximum =3D 0xFFFF=0D +} VK_KEY_TYPE;=0D +=0D +typedef enum _VK_PAGE_TYPE {=0D + //=0D + // +---+---+---+---+---+---+---+---+---+---+---+=0D + // | q | w | e | r | t | y | u | i | o | p | | ? |F11|F12|Enter| Line 2=0D + // +-----+---+---+---+---+---+---+---+---+---+-+=0D + // | Esc |12#| Space | | | _ | + | | Line 3=0D + // +-----+---+-------------------+---+---+---+-+=0D + //=0D + VkPage3,=0D + VkPageMaximum=0D +} VK_PAGE_TYPE;=0D +=0D +typedef enum VK_DISPLAY_ATTRIBUTE {=0D + VkDisplayAttributeNone, /// No keyboard displayed=0D + VkDisplayAttributeFullTop, /// Full keyboard display at top=0D + VkDisplayAttributeFullBottom, /// Full keyboard display at bottom=0D + VkDisplayAttributeSimpleTop, /// Simple keyboard display at top=0D + VkDisplayAttributeSimpleBottom, /// Simple keyboard display at bottom=0D + VkDisplayAttributeMaximum=0D +} VK_DISPLAY_ATTRIBUTE;=0D +=0D +typedef struct _VK_STRUCT {=0D + UINT16 DisStartX;=0D + UINT16 DisStartY;=0D + UINT16 DisEndX;=0D + UINT16 DisEndY;=0D + VK_KEY_TYPE PageFont[VkPageMaximum];=0D +} VK_STRUCT;=0D +=0D +typedef struct _VK_NOTIFY {=0D + UINTN Signature;=0D + EFI_KEY_DATA KeyData;=0D + EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;=0D + LIST_ENTRY NotifyEntry;=0D +} VK_NOTIFY;=0D +=0D +///=0D +/// Virtual Keyboard context=0D +///=0D +struct _VK_CONTEXT {=0D + ///=0D + /// Structure identification=0D + ///=0D + UINTN Signature;=0D +=0D + ///=0D + /// Controller Handle=0D + ///=0D + EFI_HANDLE Controller;=0D +=0D + ///=0D + /// Upper level API=0D + ///=0D + EFI_SIMPLE_TEXT_INPUT_PROTOCOL SimpleTextIn;=0D +=0D + ///=0D + /// Simple Text In EX=0D + ///=0D + EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL SimpleTextInEx;=0D +=0D + ///=0D + /// Lower level APIs=0D + ///=0D + EFI_ABSOLUTE_POINTER_PROTOCOL *AbsolutePointer;=0D + EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;=0D +=0D + ///=0D + /// Flag when the last poll indicated a touch event=0D + ///=0D + BOOLEAN TouchActive;=0D +=0D + ///=0D + /// Time to poll for touch input=0D + ///=0D + EFI_EVENT TimerEvent;=0D +=0D + ///=0D + /// HII handle to get image data used=0D + ///=0D + EFI_HII_HANDLE HiiHandle;=0D + EFI_HII_IMAGE_EX_PROTOCOL *HiiImageEx;=0D +=0D + ///=0D + /// Keyboard body background buffer information=0D + ///=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *VkBodyBackgroundBltBuffer;=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *VkBodyCompoundBltBuffer;=0D + UINTN VkBodyBltSize;=0D + UINTN VkBodyBltStartX;=0D + UINTN VkBodyBltStartY;=0D + UINTN VkBodyBltHeight;=0D + UINTN VkBodyBltWidth;=0D + BOOLEAN IsBackgroundChanged;=0D +=0D + ///=0D + /// Icon buffer information=0D + ///=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *IconBltBuffer;=0D + UINTN IconBltSize;=0D + UINTN IconBltHeight;=0D + UINTN IconBltWidth;=0D +=0D + ///=0D + /// Full icon background buffer information=0D + ///=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *FullIconBackBuffer;=0D + UINTN FullIconBackStartX;=0D + UINTN FullIconBackStartY;=0D + UINTN FullIconBackHeight;=0D + UINTN FullIconBackWidth;=0D + UINTN FullIconBackSize;=0D + BOOLEAN FullIconUpdatedFlag;=0D +=0D + ///=0D + /// Simple icon background buffer information=0D + ///=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *SimIconBackBuffer;=0D + UINTN SimIconBackStartX;=0D + UINTN SimIconBackStartY;=0D + UINTN SimIconBackHeight;=0D + UINTN SimIconBackWidth;=0D + UINTN SimIconBackSize;=0D + BOOLEAN SimIconUpdatedFlag;=0D +=0D + ///=0D + /// Small Icon=0D + ///=0D + EFI_IMAGE_INPUT *SmallIcon;=0D +=0D + ///=0D + /// Full Icon=0D + ///=0D + EFI_IMAGE_INPUT *FullIcon;=0D +=0D + ///=0D + /// Simple Key body=0D + ///=0D + EFI_IMAGE_INPUT *SimKeyBody;=0D +=0D + ///=0D + /// Digital key body=0D + ///=0D + EFI_IMAGE_INPUT *DigKeyBody;=0D +=0D + ///=0D + /// Capital Letter Key board=0D + ///=0D + EFI_IMAGE_INPUT *CapLeKeyBody;=0D +=0D + ///=0D + /// Screen check buffer.=0D + /// This is used to check if screen is kept scrolling up.=0D + ///=0D + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ScreenCheckBuffer;=0D + UINTN ScreenCheckBufferSize;=0D +=0D + ///=0D + /// Key state=0D + ///=0D + BOOLEAN KeyPressed;=0D +=0D + ///=0D + /// Keyboard display status=0D + ///=0D + VK_DISPLAY_ATTRIBUTE CurrentKeyboardDisplay;=0D + VK_DISPLAY_ATTRIBUTE TargetKeyboardDisplay;=0D +=0D + ///=0D + /// Keyboard icon display status=0D + ///=0D + BOOLEAN IsIconShowed;=0D + UINT8 IconReDrawCheck;=0D +=0D + ///=0D + /// Keyboard body Image address=0D + /// Size of KeyboardBodyPtr must larger than mFullKeyboardBody=0D + ///=0D + UINT32 NumOfKeysInfo;=0D + VK_STRUCT KeyboardBodyPtr[50];=0D +=0D + ///=0D + /// KeyBuffer=0D + ///=0D + EFI_EVENT KeyNotifyProcessEvent;=0D + EFI_KEY_TOGGLE_STATE KeyToggleState;=0D + EFI_KEY_DATA Keybuffer[MAX_KEY_BUF_SIZE];=0D + UINT8 KeyStartIndex;=0D + UINT8 KeyEndIndex;=0D + UINT16 KeyTouchedTimeOut;=0D + BOOLEAN IsShiftKeyFlag;=0D + BOOLEAN IsCapsLockFlag;=0D + BOOLEAN IsSupportPartialKey;=0D + BOOLEAN IsRedrawUpdateUI;=0D + VK_PAGE_TYPE PageNumber;=0D + LIST_ENTRY NotifyList;=0D +};=0D +=0D +///=0D +/// Locate VK_CONTEXT from protocol=0D +///=0D +#define VK_CONTEXT_FROM_PROTOCOL(a) CR (a, VK_CONTEXT, Simp= leTextIn, VK_SIGNATURE)=0D +#define VK_CONTEXT_FROM_SIMPLETEXTINEX_PROTOCOL(a) CR (a, VK_CONTEXT, Simp= leTextInEx, VK_SIGNATURE)=0D +#define VK_CONTEXT_FROM_VKBD_PROTOCOL(a) CR (a, VK_CONTEXT, Vkbd= Protocol, VK_SIGNATURE)=0D +=0D +/**=0D + Start the virtual keyboard driver=0D +=0D + This routine allocates the necessary resources for the driver.=0D +=0D + This routine is called by VirtualKeyboardDriverStart to complete the dri= ver=0D + initialization.=0D +=0D + @param[in, out] VkContext Address of an VK_CONTEXT structure=0D + @param[in] Controller Handle of device to work with.=0D +=0D + @retval EFI_SUCCESS Driver API properly initialized=0D +=0D +**/=0D +EFI_STATUS=0D +VkApiStart (=0D + IN OUT VK_CONTEXT *VkContext,=0D + IN EFI_HANDLE Controller=0D + );=0D +=0D +/**=0D + Stop the virtual keyboard driver=0D +=0D + This routine releases the resources allocated by VKApiStart.=0D +=0D + This routine is called by VirtualKeyboardDriverStop to initiate the driv= er=0D + shutdown.=0D +=0D + @param[in] VkContext Address of an VK_CONTEXT structure=0D +=0D +**/=0D +VOID=0D +VkApiStop (=0D + IN VK_CONTEXT *VkContext=0D + );=0D +=0D +/**=0D + Resets the input device hardware.=0D +=0D + The Reset() function resets the input device hardware. As part=0D + of initialization process, the firmware/device will make a quick=0D + but reasonable attempt to verify that the device is functioning.=0D + If the ExtendedVerification flag is TRUE the firmware may take=0D + an extended amount of time to verify the device is operating on=0D + reset. Otherwise the reset operation is to occur as quickly as=0D + possible. The hardware verification process is not defined by=0D + this specification and is left up to the platform firmware or=0D + driver to implement.=0D +=0D + @param[in] This A pointer to the EFI_SIMPLE_TEXT_INPUT_E= X_PROTOCOL instance.=0D +=0D + @param[in] ExtendedVerification Indicates that the driver may perform a = more exhaustive=0D + verification operation of the device dur= ing reset.=0D +=0D + @retval EFI_SUCCESS The device was reset.=0D + @retval EFI_DEVICE_ERROR The device is not functioning correctly = and could not be reset.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VkKeyboardReset (=0D + IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,=0D + IN BOOLEAN ExtendedVerification=0D + );=0D +=0D +/**=0D + Reads the next keystroke from the input device. The WaitForKey Event can= =0D + be used to test for existence of a keystroke via WaitForEvent () call.=0D +=0D + @param[in] This Protocol instance pointer.=0D + @param[out] Key Driver may perform diagnostics on reset.=0D +=0D + @retval EFI_SUCCESS The keystroke information was returned.=0D + @retval EFI_NOT_READY There was no keystroke data available.=0D + @retval EFI_DEVICE_ERROR The keystroke information was not returned due = to=0D + hardware errors.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VkKeyboardReadKeyStroke (=0D + IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,=0D + OUT EFI_INPUT_KEY *Key=0D + );=0D +=0D +/**=0D + Resets the input device hardware.=0D +=0D + The Reset() function resets the input device hardware. As part=0D + of initialization process, the firmware/device will make a quick=0D + but reasonable attempt to verify that the device is functioning.=0D + If the ExtendedVerification flag is TRUE the firmware may take=0D + an extended amount of time to verify the device is operating on=0D + reset. Otherwise the reset operation is to occur as quickly as=0D + possible. The hardware verification process is not defined by=0D + this specification and is left up to the platform firmware or=0D + driver to implement.=0D +=0D + @param[in] This A pointer to the EFI_SIMPLE_TEXT_INPUT_E= X_PROTOCOL instance.=0D +=0D + @param[in] ExtendedVerification Indicates that the driver may perform a = more exhaustive=0D + verification operation of the device dur= ing reset.=0D +=0D + @retval EFI_SUCCESS The device was reset.=0D + @retval EFI_DEVICE_ERROR The device is not functioning correctly = and could not be reset.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VkKeyboardResetEx (=0D + IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,=0D + IN BOOLEAN ExtendedVerification=0D + );=0D +=0D +/**=0D + Reads the next keystroke from the input device.=0D +=0D + @param[in] This Protocol instance pointer.=0D + @param[out] KeyData A pointer to a buffer that is filled in w= ith the keystroke=0D + state data for the key that was pressed.= =0D +=0D + @retval EFI_SUCCESS The keystroke information was returned.=0D + @retval EFI_NOT_READY There was no keystroke data available.=0D + @retval EFI_INVALID_PARAMETER This or KeyData is NULL.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VkKeyboardReadKeyStrokeEx (=0D + IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,=0D + OUT EFI_KEY_DATA *KeyData=0D + );=0D +=0D +/**=0D + Set certain state for the input device.=0D +=0D + @param[in] This Protocol instance pointer.=0D + @param[in] KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to= set the=0D + state for the input device.=0D +=0D + @retval EFI_SUCCESS The device state was set appropriately.= =0D + @retval EFI_INVALID_PARAMETER This or KeyToggleState is NULL.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VkKeyboardSetState (=0D + IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,=0D + IN EFI_KEY_TOGGLE_STATE *KeyToggleState=0D + );=0D +=0D +/**=0D + Register a notification function for a particular keystroke for the inpu= t device.=0D +=0D + @param[in] This Protocol instance pointer.=0D + @param[in] KeyData A pointer to a buffer that is fi= lled in with the keystroke=0D + information data for the key tha= t was pressed.=0D + @param[in] KeyNotificationFunction Points to the function to be cal= led when the key=0D + sequence is typed specified by K= eyData.=0D + @param[out] NotifyHandle Points to the unique handle assi= gned to the registered notification.=0D +=0D + @retval EFI_SUCCESS The notification function was re= gistered successfully.=0D + @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for= necessary data structures.=0D + @retval EFI_INVALID_PARAMETER KeyData or NotifyHandle or KeyNo= tificationFunction is NULL.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VkKeyboardRegisterKeyNotify (=0D + IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,=0D + IN EFI_KEY_DATA *KeyData,=0D + IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,=0D + OUT EFI_HANDLE *NotifyHandle=0D + );=0D +=0D +/**=0D + Remove a registered notification function from a particular keystroke.=0D +=0D + @param[in] This Protocol instance pointer.=0D + @param[in] NotificationHandle The handle of the notification function b= eing unregistered.=0D +=0D + @retval EFI_SUCCESS The notification function was unregistere= d successfully.=0D + @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VkKeyboardUnregisterKeyNotify (=0D + IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,=0D + IN EFI_HANDLE NotificationHandle=0D + );=0D +=0D +/**=0D + Draw key board on the display=0D +=0D + @param[in] VkContext Graphic Protocol for draw the alphabet.=0D +=0D + @retval EFI_SUCCESS Draw keyboard was done.=0D + @retval EFI_UNSUPPORTED Did not get key mapping table.=0D +=0D +**/=0D +EFI_STATUS=0D +DrawKeyboardLayout (=0D + IN VK_CONTEXT *VkContext=0D + );=0D +=0D +/**=0D + Clear the keyboard body=0D +=0D + @param[in] VkContext Code context.=0D +=0D + @retval EFI_SUCCESS Clear rectangle is done.=0D +=0D +**/=0D +EFI_STATUS=0D +HideVkBody (=0D + IN VK_CONTEXT *VkContext=0D + );=0D +=0D +/**=0D + Clear the keyboard icon=0D +=0D + @param[in] VkContext Code context.=0D +=0D + @retval EFI_SUCCESS Clear rectangle is done.=0D +=0D +**/=0D +EFI_STATUS=0D +HideVkIcon (=0D + IN VK_CONTEXT *VkContext=0D + );=0D +=0D +/**=0D + Use to draw the keyboard icon.=0D +=0D + @param[in] VkContext Pointer to virtual keyboard's context=0D + @param[in] VkImage Image of keyboard to display on the screen.=0D + @param[in] Attribute Attribute of keyboard to display on the screen.=0D +=0D + @retval EFI_SUCCESS ConsoleControl has been flipped to graphic= s and keyboard icon displayed.=0D + @retval EFI_UNSUPPORTED KeyboardFile not found=0D + @retval EFI_INVALID_PARAMETER Attribute is unknown.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +DrawVkIcon (=0D + IN VK_CONTEXT *VkContext,=0D + IN EFI_IMAGE_INPUT *VkImage,=0D + IN VK_DISPLAY_ATTRIBUTE Attribute=0D + );=0D +=0D +/**=0D + Use to draw the keyboard.=0D +=0D + @param[in] VkContext Pointer to virtual keyboard's context=0D + @param[in] VkImage Image of keyboard to display on the screen.=0D + @param[in] Attribute Attribute of keyboard to display on the screen.=0D +=0D + @retval EFI_SUCCESS ConsoleControl has been flipped to graphic= s and keyboard displayed.=0D + @retval EFI_UNSUPPORTED KeyboardFile not found=0D + @retval EFI_INVALID_PARAMETER Attribute is unknown.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +DrawVkBody (=0D + IN VK_CONTEXT *VkContext,=0D + IN EFI_IMAGE_INPUT *VkImage,=0D + IN VK_DISPLAY_ATTRIBUTE Attribute=0D + );=0D +=0D +/**=0D + Get unicode by VkContext->PageNumber and VkContext->KeyboardBodyPtr.=0D +=0D + @param[in] VkContext Address of an VK_CONTEXT structure.=0D + @param[in] KeyItem Key Item.=0D + @param[out] FontPtr Follow VkContext->PageNumber to transla= te=0D + font unicode.=0D +=0D + @retval EFI_SUCCESS Finish translating FontPtr.=0D + @retval EFI_INVALID_PARAMETER VkContext or FontPtr is NULL.=0D +=0D +**/=0D +EFI_STATUS=0D +VkGetMappingFont (=0D + IN VK_CONTEXT *VkContext,=0D + IN VK_STRUCT KeyItem,=0D + OUT UINT32 *FontPtr=0D + );=0D +=0D +/**=0D + This routine is used to check if icon has been cleared.=0D +=0D + @param[in] VkContext Pointer to virtual keyboard's context=0D +=0D + @retval EFI_SUCCESS Function completed.=0D +=0D +**/=0D +EFI_STATUS=0D +CheckIconCleared (=0D + IN VK_CONTEXT *VkContext=0D + );=0D +=0D +/**=0D + ConvertCoordinate - Convert the touch panel's coordinate to display's co= ordinate.=0D +=0D + @param[in] VkContext Virtual Keyboard context.=0D + @param[in] Point The coordinate reported from touch pan= el.=0D + @param[out] TouchX The coordinate X converted to display = panel.=0D + @param[out] TouchY The coordinate Y converted to display = panel..=0D +=0D + @retval EFI_SUCCESS Convert success.=0D +=0D +**/=0D +EFI_STATUS=0D +ConvertCoordinate (=0D + IN VK_CONTEXT *VkContext,=0D + IN EFI_ABSOLUTE_POINTER_STATE Point,=0D + OUT UINT32 *TouchX,=0D + OUT UINT32 *TouchY=0D + );=0D +=0D +/**=0D + This routine is used to check if screen has been cleared.=0D +=0D + @param[in] VkContext Pointer to virtual keyboard's context=0D +=0D + @retval EFI_SUCCESS Function completed.=0D +=0D +**/=0D +EFI_STATUS=0D +CheckScreenCleared (=0D + IN VK_CONTEXT *VkContext=0D + );=0D +=0D +/**=0D + This routine is used to check if background beneath virtual keyboard has= been cleared.=0D +=0D + @param[in] VkContext Pointer to virtual keyboard's context=0D +=0D + @retval EFI_SUCCESS Function completed.=0D +=0D +**/=0D +EFI_STATUS=0D +CheckBackgroundChanged (=0D + IN VK_CONTEXT *VkContext=0D + );=0D +=0D +/**=0D + To prevent screen keyboard layout occur scroll up=0D +=0D + @param[in, out] VkContext Address of an VK_CONTEXT structure= .=0D +=0D +**/=0D +VOID=0D +PreventScreenScrollUp (=0D + IN OUT VK_CONTEXT *VkContext=0D + );=0D +=0D +/**=0D + Set the position of character.=0D +=0D + @param[in] VkContext Address of an VK_CONTEXT structure.=0D + @param[in] DestX X position.=0D + @param[in] DestY Y position.=0D +=0D + @retval EFI_SUCCESS Success for the function.=0D + @retval Others An unexpected error occurred.=0D +=0D +**/=0D +EFI_STATUS=0D +SetCharacterPosition (=0D + IN VK_CONTEXT *VkContext,=0D + IN UINT32 DestX,=0D + IN UINT32 DestY=0D + );=0D +=0D +/**=0D + Set the keyboard layout.=0D +=0D + @param[in] VkContext Graphic Protocol for draw the alphabet.=0D + @param[in] Index The layout selected.=0D +=0D + @retval EFI_SUCCESS Draw keyboard was done.=0D + @retval Others An unexpected error occurred.=0D +=0D +**/=0D +EFI_STATUS=0D +KeyboardLayoutHandler (=0D + IN VK_CONTEXT *VkContext,=0D + IN UINT32 Index=0D + );=0D +=0D +/**=0D + Save the background blt buffer.=0D +=0D + @param[in] VkContext Address of an VK_CONTEXT structure.=0D + @param[in] BltSize Size of blt.=0D +=0D + @retval EFI_SUCCESS Success for the function.=0D + @retval EFI_OUT_OF_RESOURCES Allocate memory failed.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +SaveVkBodyBackgroundBltBuffer (=0D + IN VK_CONTEXT *VkContext,=0D + IN UINTN BltSize=0D + );=0D +=0D +/**=0D + Restore the background blt buffer.=0D +=0D + @param[in] VkContext Address of an VK_CONTEXT structure.=0D +=0D + @retval EFI_SUCCESS Success for the function.=0D + @retval EFI_UNSUPPORTED Input blt buffer is NULL.=0D + @retval Others An unexpected error occurred.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +RestoreVkBodyBackgroundBltBuffer (=0D + IN VK_CONTEXT *VkContext=0D + );=0D +=0D +/**=0D + Save the icon background blt buffer.=0D +=0D + @param[in] VkContext Address of an VK_CONTEXT structure.=0D + @param[in] IconType The icon type.=0D +=0D + @retval EFI_SUCCESS Success for the function.=0D + @retval EFI_OUT_OF_RESOURCES Allocate memory failed.=0D + @retval Others An unexpected error occurred.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +SaveVkIconBackgroundBltBuffer (=0D + IN VK_CONTEXT *VkContext,=0D + IN VK_DISPLAY_ATTRIBUTE IconType=0D + );=0D +#endif=0D diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Virtual= KeyboardDxe/VirtualKeyboardDriver.c b/Features/Intel/UserInterface/VirtualK= eyboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboardDriver.c new file mode 100644 index 0000000000..523c662b29 --- /dev/null +++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboar= dDxe/VirtualKeyboardDriver.c @@ -0,0 +1,515 @@ +/** @file=0D + Virtual Keyboard driver.=0D +=0D + Copyright (c) 2012 - 2020, Intel Corporation. All rights reserved.
    =0D + SPDX-License-Identifier: BSD-2-Clause-Patent=0D +=0D +**/=0D +=0D +#include "VirtualKeyboard.h"=0D +=0D +UINT32 mOrigConOutRow =3D 0;=0D +UINT32 mOrigSetupConOutRow =3D 0;=0D +EFI_HII_HANDLE mHiiHandle =3D NULL;=0D +/**=0D + Verify the controller type=0D +=0D + This routine determines if the pointer and GOP are available.=0D +=0D + This routine is called by the UEFI driver framework during connect=0D + processing.=0D +=0D + @param[in] This Protocol instance pointer.=0D + @param[in] Controller Handle of device to test.=0D + @param[in] RemainingDevicePath Not used.=0D +=0D + @retval EFI_SUCCESS This driver supports this device.=0D + @retval other This driver does not support this device= .=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VirtualKeyboardDriverSupported (=0D + IN EFI_DRIVER_BINDING_PROTOCOL *This,=0D + IN EFI_HANDLE Controller,=0D + IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath=0D + )=0D +{=0D + EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;=0D + EFI_STATUS Status;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VirtualKeyboardDriverSupported Sta= rt\n"));=0D +=0D + //=0D + // Verify that the driver is not already started=0D + //=0D + Status =3D gBS->OpenProtocol (=0D + Controller,=0D + &gEfiCallerIdGuid,=0D + NULL,=0D + This->DriverBindingHandle,=0D + Controller,=0D + EFI_OPEN_PROTOCOL_TEST_PROTOCOL=0D + );=0D + if (!EFI_ERROR (Status)) {=0D + Status =3D EFI_ALREADY_STARTED;=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "ERROR - VK has already initializ= ed\n"));=0D + goto Error;=0D + }=0D +=0D + //=0D + // Determine if the pointer protocol is available.=0D + // This should be installed in touch driver.=0D + //=0D + Status =3D gBS->OpenProtocol (=0D + Controller,=0D + &gEfiAbsolutePointerProtocolGuid,=0D + NULL,=0D + This->DriverBindingHandle,=0D + Controller,=0D + EFI_OPEN_PROTOCOL_TEST_PROTOCOL=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "ERROR - VK Absolute pointer prot= ocol not found\n"));=0D + goto Error;=0D + }=0D +=0D + Status =3D gBS->OpenProtocol (=0D + Controller,=0D + &gEdkiiTouchPanelGuid,=0D + NULL,=0D + This->DriverBindingHandle,=0D + Controller,=0D + EFI_OPEN_PROTOCOL_TEST_PROTOCOL=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "ERROR - VK Touch Panel Guid not = found\n"));=0D + goto Error;=0D + }=0D +=0D + //=0D + // Determine if the graphics output protocol is available=0D + //=0D + Status =3D gBS->HandleProtocol (=0D + gST->ConsoleOutHandle,=0D + &gEfiGraphicsOutputProtocolGuid,=0D + (VOID **)&GraphicsOutput=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "ERROR - VK Graphics output proto= col not found\n"));=0D + goto Error;=0D + }=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_INFO, "VirtualKeyboardDriver= Supported Success, Status: %r\n", Status));=0D + goto End;=0D +=0D +Error:=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VirtualKeyboardDriverSupported Fai= led, Status: %r\n", Status));=0D +=0D +End:=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VirtualKeyboardDriverSupported End= \n"));=0D + return Status;=0D +}=0D +=0D +/**=0D + Connect to the controller=0D +=0D + This routine initializes an instance of the virutal keyboard driver for = this=0D + controller.=0D +=0D + This routine is called by the UEFI driver framework during connect=0D + processing if the controller passes the tests in I2cBusDriverSupported.= =0D +=0D + @param[in] This Protocol instance pointer.=0D + @param[in] Controller Handle of device to work with.=0D + @param[in] RemainingDevicePath Not used, always produce all possible ch= ildren.=0D +=0D + @retval EFI_SUCCESS This driver is added to Controller.=0D + @retval other This driver does not support this device= .=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VirtualKeyboardDriverStart (=0D + IN EFI_DRIVER_BINDING_PROTOCOL *This,=0D + IN EFI_HANDLE Controller,=0D + IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath=0D + )=0D +{=0D + VK_CONTEXT *VkContext;=0D + EFI_STATUS Status;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_INFO, "VirtualKeyboardDriver= Start Start\n"));=0D +=0D + VkContext =3D AllocateZeroPool (sizeof (VK_CONTEXT));=0D + if (VkContext =3D=3D NULL) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_ERROR, "ERROR - No memory = for virtual keyboard driver\n"));=0D + Status =3D EFI_OUT_OF_RESOURCES;=0D + ASSERT_EFI_ERROR (Status);=0D + goto Error;=0D + }=0D +=0D + Status =3D gBS->OpenProtocol (=0D + Controller,=0D + &gEfiAbsolutePointerProtocolGuid,=0D + (VOID**) &VkContext->AbsolutePointer,=0D + This->DriverBindingHandle,=0D + Controller,=0D + EFI_OPEN_PROTOCOL_BY_DRIVER=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_ERROR, "ERROR - Failed to = open absolute pointer protocol, Status: %r\n", Status));=0D + goto Error;=0D + }=0D +=0D + Status =3D gBS->OpenProtocol (=0D + Controller,=0D + &gEdkiiTouchPanelGuid,=0D + NULL,=0D + This->DriverBindingHandle,=0D + Controller,=0D + EFI_OPEN_PROTOCOL_TEST_PROTOCOL=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_ERROR, "ERROR - TouchPanel= GUID not found, Status: %r\n", Status));=0D + goto Error;=0D + }=0D +=0D + Status =3D gBS->HandleProtocol (=0D + gST->ConsoleOutHandle,=0D + &gEfiGraphicsOutputProtocolGuid,=0D + (VOID**) &VkContext->GraphicsOutput=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_ERROR, "ERROR - Graphics o= utput protocol not available, Status: %r\n", Status));=0D + goto Error;=0D + }=0D +=0D + VkContext->HiiHandle =3D mHiiHandle;=0D + Status =3D VkApiStart (VkContext, Controller);=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_ERROR, "ERROR - Failed to = VkApiStart, Status: %r\n", Status));=0D + goto Error;=0D + }=0D +=0D + Status =3D gBS->InstallMultipleProtocolInterfaces (=0D + &Controller,=0D + &gEfiCallerIdGuid,=0D + VkContext,=0D + &gEfiSimpleTextInProtocolGuid,=0D + &VkContext->SimpleTextIn,=0D + &gEfiSimpleTextInputExProtocolGuid,=0D + &VkContext->SimpleTextInEx,=0D + &gEfiConsoleInDeviceGuid,=0D + NULL,=0D + NULL=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_ERROR, "ERROR - Failed to = install VK protocols, Status: %r\n", Status));=0D + ASSERT_EFI_ERROR (Status);=0D + goto Error;=0D + }=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT | DEBUG_INFO, "VirtualKeyboardDriver= Start Success, Status: %r\n", Status));=0D + goto End;=0D +=0D +Error:=0D + if (VkContext !=3D NULL) {=0D + FreePool (VkContext);=0D + }=0D +=0D + gBS->CloseProtocol (=0D + Controller,=0D + &gEfiAbsolutePointerProtocolGuid,=0D + This->DriverBindingHandle,=0D + Controller=0D + );=0D +=0D + //=0D + // Restore setting if connect device fail.=0D + //=0D + PcdSet32S (PcdConOutRow, mOrigConOutRow);=0D + PcdSet32S (PcdSetupConOutRow, mOrigSetupConOutRow);=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VirtualKeyboardDriverStart Failed,= Status: %r\n", Status));=0D +=0D +End:=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VirtualKeyboardDriverStart End\n")= );=0D +=0D + return Status;=0D +}=0D +=0D +/**=0D + Disconnect from the controller.=0D +=0D + This routine disconnects from the controller.=0D +=0D + This routine is called by DriverUnload when the I2C bus driver=0D + is being unloaded.=0D +=0D + @param[in] This Protocol instance pointer.=0D + @param[in] Controller Handle of device to stop driver on.=0D + @param[in] NumberOfChildren How many children need to be stopped.=0D + @param[in] ChildHandleBuffer Not used.=0D +=0D + @retval EFI_SUCCESS This driver is removed Controller.=0D + @retval EFI_DEVICE_ERROR The device could not be stopped due to a= device error.=0D + @retval other This driver was not removed from this de= vice.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VirtualKeyboardDriverStop (=0D + IN EFI_DRIVER_BINDING_PROTOCOL *This,=0D + IN EFI_HANDLE Controller,=0D + IN UINTN NumberOfChildren,=0D + IN EFI_HANDLE *ChildHandleBuffer=0D + )=0D +{=0D + VK_CONTEXT *VkContext;=0D + EFI_STATUS Status;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VirtualKeyboardDriverStop Start\n"= ));=0D +=0D + Status =3D gBS->OpenProtocol (=0D + Controller,=0D + &gEfiCallerIdGuid,=0D + (VOID**)&VkContext,=0D + This->DriverBindingHandle,=0D + Controller,=0D + EFI_OPEN_PROTOCOL_BY_DRIVER | EFI_OPEN_PROTOCOL_EXCLUSIV= E=0D + );=0D + if (EFI_ERROR (Status)) {=0D + Status =3D EFI_SUCCESS;=0D + goto Success;=0D + }=0D +=0D + //=0D + // Done with the driver protocol=0D + //=0D + Status =3D gBS->CloseProtocol (=0D + Controller,=0D + &gEfiCallerIdGuid,=0D + This->DriverBindingHandle,=0D + Controller=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "ERROR - Failed to close the VK p= rotocol, Status: %r\n", Status));=0D + goto Error;=0D + }=0D +=0D + //=0D + // Remove ConsoleIn protocols first to close the link in ConSplitter=0D + //=0D + Status =3D gBS->OpenProtocol (=0D + Controller,=0D + &gEfiConsoleInDeviceGuid,=0D + NULL,=0D + This->DriverBindingHandle,=0D + Controller,=0D + EFI_OPEN_PROTOCOL_TEST_PROTOCOL=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "ERROR - Failed to uninstall the = protocols, Status: %r\n", Status));=0D + goto Error;=0D + }=0D +=0D + //=0D + // Remove the remaining protocols=0D + //=0D + Status =3D gBS->UninstallMultipleProtocolInterfaces (=0D + Controller,=0D + &gEfiCallerIdGuid,=0D + VkContext,=0D + &gEfiSimpleTextInProtocolGuid,=0D + &VkContext->SimpleTextIn,=0D + &gEfiSimpleTextInputExProtocolGuid,=0D + &VkContext->SimpleTextInEx,=0D + &gEfiConsoleInDeviceGuid,=0D + NULL,=0D + NULL=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "ERROR - Failed to uninstall the = protocols, Status: %r\n", Status));=0D + goto Error;=0D + }=0D +=0D + //=0D + // Stop the driver=0D + //=0D + VkApiStop (VkContext);=0D +=0D + //=0D + // Release the pointer protocol upon failure=0D + //=0D + Status =3D gBS->CloseProtocol (=0D + Controller,=0D + &gEfiAbsolutePointerProtocolGuid,=0D + This->DriverBindingHandle,=0D + Controller=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "ERROR - Failed to close absolute= pointer protocol, Status: %r\n", Status));=0D + goto Error;=0D + }=0D +=0D + //=0D + // Release VkContext=0D + //=0D + if (VkContext !=3D NULL) {=0D + FreePool (VkContext);=0D + }=0D +=0D +Success:=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VirtualKeyboardDriverStop Success,= Status: %r\n", Status));=0D + goto End;=0D +=0D +Error:=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VirtualKeyboardDriverStop Failed, = Status: %r\n", Status));=0D +=0D +End:=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VirtualKeyboardDriverStop End\n"))= ;=0D + return Status;=0D +}=0D +=0D +/**=0D + Unloads an image.=0D +=0D + @param[in] ImageHandle Handle that identifies the image to be unl= oaded.=0D +=0D + @retval EFI_SUCCESS The image has been unloaded.=0D + @retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VirtualKeyboardDriverUnload (=0D + IN EFI_HANDLE ImageHandle=0D + )=0D +{=0D + EFI_STATUS Status;=0D + EFI_HANDLE *HandleBuffer;=0D + UINTN HandleCount;=0D + UINTN Index;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VirtualKeyboardDriverUnload Start\= n"));=0D +=0D + //=0D + // Retrieve array of all handles in the handle database=0D + //=0D + Status =3D gBS->LocateHandleBuffer (=0D + AllHandles,=0D + NULL,=0D + NULL,=0D + &HandleCount,=0D + &HandleBuffer=0D + );=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "ERROR - Failed to locate handle = buffer, Status: %r\n", Status));=0D + ASSERT_EFI_ERROR (Status);=0D + goto Error;=0D + }=0D +=0D + //=0D + // Disconnect the current driver from handles in the handle database=0D + //=0D + for (Index =3D 0; Index < HandleCount; Index++) {=0D + gBS->DisconnectController (HandleBuffer[Index], ImageHandle, NULL);=0D + }=0D +=0D + //=0D + // Free the array of handles=0D + //=0D + if (HandleBuffer !=3D NULL) {=0D + FreePool (HandleBuffer);=0D + }=0D +=0D + //=0D + // Uninstall protocols installed in the driver entry point=0D + //=0D + Status =3D gBS->UninstallMultipleProtocolInterfaces (=0D + ImageHandle,=0D + &gEfiDriverBindingProtocolGuid,=0D + &gVirtualKeyboardDriverBinding,=0D + &gEfiComponentNameProtocolGuid,=0D + &gVirtualKeyboardComponentName,=0D + &gEfiComponentName2ProtocolGuid,=0D + &gVirtualKeyboardComponentName2,=0D + NULL=0D + );=0D + if (EFI_ERROR (Status)) {=0D + ASSERT_EFI_ERROR (Status);=0D + goto Error;=0D + }=0D +=0D + HiiRemovePackages (mHiiHandle);=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VirtualKeyboardDriverUnload Succes= s, Status: %r\n", Status));=0D + goto End;=0D +=0D +Error:=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VirtualKeyboardDriverUnload Failed= , Status: %r\n", Status));=0D +=0D +End:=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VirtualKeyboardDriverUnload End\n"= ));=0D + return Status;=0D +}=0D +=0D +EFI_DRIVER_BINDING_PROTOCOL gVirtualKeyboardDriverBinding =3D {=0D + VirtualKeyboardDriverSupported,=0D + VirtualKeyboardDriverStart,=0D + VirtualKeyboardDriverStop,=0D + 0x10,=0D + NULL,=0D + NULL=0D +};=0D +=0D +/**=0D + This is the declaration of an EFI image entry point. This entry point is= =0D + the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers includ= ing=0D + both device drivers and bus drivers.=0D +=0D + @param ImageHandle The firmware allocated handle for the UEFI= image.=0D + @param SystemTable A pointer to the EFI System Table.=0D +=0D + @retval EFI_SUCCESS The operation completed successfully.=0D + @retval Others An unexpected error occurred.=0D +=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +VirtualKeyboardDriverEntryPoint (=0D + IN EFI_HANDLE ImageHandle,=0D + IN EFI_SYSTEM_TABLE *SystemTable=0D + )=0D +{=0D + EFI_STATUS Status;=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VirtualKeyboardDriverEntryPoint St= art\n"));=0D + //=0D + // Install UEFI Driver Model protocol(s).=0D + //=0D + Status =3D EfiLibInstallDriverBindingComponentName2 (=0D + ImageHandle,=0D + SystemTable,=0D + &gVirtualKeyboardDriverBinding,=0D + ImageHandle,=0D + &gVirtualKeyboardComponentName,=0D + &gVirtualKeyboardComponentName2=0D + );=0D + ASSERT_EFI_ERROR (Status);=0D +=0D + mHiiHandle =3D HiiAddPackages (=0D + &gEfiCallerIdGuid,=0D + NULL,=0D + VirtualKeyboardDxeImages,=0D + NULL=0D + );=0D + ASSERT (mHiiHandle !=3D NULL);=0D +=0D + mOrigConOutRow =3D PcdGet32 (PcdConOutRow);=0D + mOrigSetupConOutRow =3D PcdGet32 (PcdSetupConOutRow);=0D +=0D + DEBUG ((DEBUG_VK_ROUTINE_ENTRY_EXIT, "VirtualKeyboardDriverEntryPoint En= d\n"));=0D + return Status;=0D +}=0D diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Virtual= KeyboardDxe/VirtualKeyboardDxe.inf b/Features/Intel/UserInterface/VirtualKe= yboardFeaturePkg/VirtualKeyboardDxe/VirtualKeyboardDxe.inf new file mode 100644 index 0000000000..38843443e1 --- /dev/null +++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboar= dDxe/VirtualKeyboardDxe.inf @@ -0,0 +1,78 @@ +## @file=0D +# Instance of virtual keyboard driver binding protocol.=0D +#=0D +# Compliant with efi driver model, 1. VirtualKeyboardDriverSupported=0D +# determines if the pointer and GOP are available. 2.=0D +# VirtualKeyboardDriverStart initializes an instance of the virtual=0D +# keyboard driver for a particular controller. 3.=0D +# VirtualKeyboardDriverStop is called by DriverUnload when the I2C bus=0D +# driver is being unload.=0D +#=0D +# Copyright (c) 2012 - 2020, Intel Corporation. All rights reserved.
    =0D +# SPDX-License-Identifier: BSD-2-Clause-Patent=0D +#=0D +##=0D +=0D +[Defines]=0D + INF_VERSION =3D 0x00010017=0D + BASE_NAME =3D VirtualKeyboardDxe=0D + FILE_GUID =3D E4735AAC-9C27-493f-86EA-9EFF43D7ADCD= =0D + VERSION_STRING =3D 2.0=0D + MODULE_TYPE =3D UEFI_DRIVER=0D + ENTRY_POINT =3D VirtualKeyboardDriverEntryPoint=0D + UNLOAD_IMAGE =3D VirtualKeyboardDriverUnload=0D +=0D +#=0D +# VALID_ARCHITECTURES =3D IA32 X64=0D +# DRIVER_BINDING =3D gVirtualKeyboardDriverBinding;=0D +# COMPONENT_NAME =3D gVirtualKeyboardComponentName;=0D +# COMPONENT_NAME2 =3D gVirtualKeyboardComponentName2;=0D +#=0D +=0D +[LibraryClasses]=0D + BaseMemoryLib=0D + DebugLib=0D + MemoryAllocationLib=0D + UefiBootServicesTableLib=0D + UefiDriverEntryPoint=0D + UefiLib=0D + PcdLib=0D + HiiLib=0D +=0D +[Packages]=0D + MdePkg/MdePkg.dec=0D + MdeModulePkg/MdeModulePkg.dec=0D + VirtualKeyboardFeaturePkg/VirtualKeyboardFeaturePkg.dec=0D +=0D +[Pcd]=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutRow=0D +=0D +[Sources]=0D + CapitalLetterKeyboard.bmp=0D + DigitKeyboard.bmp=0D + FullIcon.bmp=0D + SimpleIcon.bmp=0D + SimpleKeyboard.bmp=0D + KeyboardLayout.idf=0D + KeyboardLayout.c=0D + ComponentName.c=0D + ComponentName.h=0D + Keyboard.c=0D + VirtualKeyboard.h=0D + VirtualKeyboardDriver.c=0D +=0D +[Protocols]=0D + gEfiAbsolutePointerProtocolGuid ## TO_START=0D + gEfiDriverBindingProtocolGuid ## PRODUCES=0D + gEfiGraphicsOutputProtocolGuid ## TO_START=0D + gEfiSimpleTextInProtocolGuid ## BY_START=0D + gEfiSimpleTextInputExProtocolGuid ## BY_START=0D + gEfiHiiImageExProtocolGuid ## TO_START=0D +=0D +[Guids]=0D + gEfiConsoleInDeviceGuid ## SOMETIMES_PRODUCES=0D + gEdkiiTouchPanelGuid ## TO_START=0D +=0D +[Depex]=0D + gEfiHiiDatabaseProtocolGuid=0D diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Virtual= KeyboardFeaturePkg.dec b/Features/Intel/UserInterface/VirtualKeyboardFeatur= ePkg/VirtualKeyboardFeaturePkg.dec new file mode 100644 index 0000000000..c26db01f09 --- /dev/null +++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboar= dFeaturePkg.dec @@ -0,0 +1,26 @@ +## @file=0D +# This package provides advanced feature functionality for User Authentica= tion support.=0D +# This package should only depend on EDK II Core packages, IntelSiliconPkg= , and MinPlatformPkg.=0D +#=0D +# The DEC files are used by the utilities that parse DSC and=0D +# INF files to generate AutoGen.c and AutoGen.h files=0D +# for the build infrastructure.=0D +#=0D +# Copyright (c) 2020, Intel Corporation. All rights reserved.
    =0D +#=0D +# SPDX-License-Identifier: BSD-2-Clause-Patent=0D +#=0D +##=0D +=0D +[Defines]=0D + DEC_SPECIFICATION =3D 0x00010017=0D + PACKAGE_NAME =3D VirtualKeyboardFeaturePkg=0D + PACKAGE_GUID =3D A40DFD69-3552-40E8-8D3D-89741B03B9E1=0D + PACKAGE_VERSION =3D 0.1=0D +=0D +[Includes]=0D + Include=0D +=0D +[Guids]=0D + ## GUID used for VirtualKeyboardDriver to open TouchPanel protocol.=0D + gEdkiiTouchPanelGuid =3D { 0x91b1d27b, 0xe12= 6, 0x48d1, { 0x82, 0x34, 0xd2, 0x8b, 0x81, 0xc8, 0x83, 0x62 }}=0D diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Virtual= KeyboardFeaturePkg.dsc b/Features/Intel/UserInterface/VirtualKeyboardFeatur= ePkg/VirtualKeyboardFeaturePkg.dsc new file mode 100644 index 0000000000..ab3605fa15 --- /dev/null +++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboar= dFeaturePkg.dsc @@ -0,0 +1,30 @@ +## @file=0D +# This is a build description file for the User Authentication advanced fe= ature.=0D +# This package should only depend on EDK II Core packages, IntelSiliconPkg= , and MinPlatformPkg.=0D +#=0D +# The DEC files are used by the utilities that parse DSC and=0D +# INF files to generate AutoGen.c and AutoGen.h files=0D +# for the build infrastructure.=0D +#=0D +# Copyright (c) 2020, Intel Corporation. All rights reserved.
    =0D +#=0D +# SPDX-License-Identifier: BSD-2-Clause-Patent=0D +#=0D +##=0D +=0D +[Defines]=0D + PLATFORM_NAME =3D VirtualKeyboardFeaturePkg=0D + PLATFORM_GUID =3D 6D396683-C82B-41D5-84E7-BB6E13B7C2BF= =0D + PLATFORM_VERSION =3D 0.1=0D + DSC_SPECIFICATION =3D 0x00010005=0D + OUTPUT_DIRECTORY =3D Build/$(PLATFORM_NAME)=0D + SUPPORTED_ARCHITECTURES =3D IA32|X64=0D + BUILD_TARGETS =3D DEBUG|RELEASE|NOOPT=0D + SKUID_IDENTIFIER =3D DEFAULT=0D + PEI_ARCH =3D IA32=0D + DXE_ARCH =3D X64=0D +=0D +#=0D +# This package always builds the feature.=0D +#=0D +!include Include/VirtualKeyboardFeature.dsc=0D --=20 2.24.0.windows.2