]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Nt32Pkg/WinNtGopDxe/WinNtGop.h
MdePkg/UefiBaseType.h: treat EBC as a non-native machine type
[mirror_edk2.git] / Nt32Pkg / WinNtGopDxe / WinNtGop.h
index b3cf9d265862db6127d7d91ac147c1dd517c04c4..fbf1e0beca12f89b6ec4265c3018b75a2e5134c9 100644 (file)
@@ -1,13 +1,7 @@
 /** @file\r
 \r
-Copyright (c) 2006, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 Module Name:\r
 \r
@@ -46,25 +40,26 @@ Abstract:
 //\r
 // WM_SYSKEYDOWN/WM_SYSKEYUP Notification\r
 // lParam\r
-// bit 24: Specifies whether the key is an extended key, \r
-// such as the right-hand ALT and CTRL keys that appear on \r
-// an enhanced 101- or 102-key keyboard. \r
+// bit 24: Specifies whether the key is an extended key,\r
+// such as the right-hand ALT and CTRL keys that appear on\r
+// an enhanced 101- or 102-key keyboard.\r
 // The value is 1 if it is an extended key; otherwise, it is 0.\r
-// bit 29:Specifies the context code. \r
-// The value is 1 if the ALT key is down while the key is pressed/released; \r
-// it is 0 if the WM_SYSKEYDOWN message is posted to the active window \r
+// bit 29:Specifies the context code.\r
+// The value is 1 if the ALT key is down while the key is pressed/released;\r
+// it is 0 if the WM_SYSKEYDOWN message is posted to the active window\r
 // because no window has the keyboard focus.\r
 #define GOP_EXTENDED_KEY         (0x1 << 24)\r
 #define GOP_ALT_KEY_PRESSED      (0x1 << 29)\r
 \r
+#define KEYBOARD_TIMER_INTERVAL         200000  // 0.02s\r
 \r
 #define MAX_Q 256\r
 \r
 typedef struct {\r
-  UINTN         Front;\r
-  UINTN         Rear;\r
-  UINTN         Count;\r
-  EFI_INPUT_KEY Q[MAX_Q];\r
+  UINTN             Front;\r
+  UINTN             Rear;\r
+  EFI_KEY_DATA      Q[MAX_Q];\r
+  CRITICAL_SECTION  Cs;\r
 } GOP_QUEUE_FIXED;\r
 \r
 #define WIN_NT_GOP_CLASS_NAME       L"WinNtGopWindow"\r
@@ -75,7 +70,6 @@ typedef struct {
 \r
 typedef struct _WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY {\r
   UINTN                                 Signature;\r
-  EFI_HANDLE                            NotifyHandle;\r
   EFI_KEY_DATA                          KeyData;\r
   EFI_KEY_NOTIFY_FUNCTION               KeyNotificationFn;\r
   LIST_ENTRY                            NotifyEntry;\r
@@ -131,17 +125,18 @@ typedef struct {
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL *FillLine;\r
 \r
   //\r
-  // Keyboard Queue used by Simple Text In. WinProc thread adds, and main\r
-  // thread removes.\r
+  // Keyboard Queue used by Simple Text In.\r
+  // QueueForRead:   WinProc thread adds, and main thread removes.\r
+  // QueueForNotify: WinProc thread adds, and timer thread removes.\r
   //\r
-  CRITICAL_SECTION              QCriticalSection;\r
-  GOP_QUEUE_FIXED               Queue;\r
+  GOP_QUEUE_FIXED               QueueForRead;\r
+  GOP_QUEUE_FIXED               QueueForNotify;\r
 \r
   EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL SimpleTextInEx;\r
   EFI_KEY_STATE                     KeyState;\r
   LIST_ENTRY                        NotifyList;\r
   BOOLEAN                           LeftShift;\r
-  BOOLEAN                           RightShift;  \r
+  BOOLEAN                           RightShift;\r
   BOOLEAN                           LeftAlt;\r
   BOOLEAN                           RightAlt;\r
   BOOLEAN                           LeftCtrl;\r
@@ -149,10 +144,12 @@ typedef struct {
   BOOLEAN                           LeftLogo;\r
   BOOLEAN                           RightLogo;\r
   BOOLEAN                           Menu;\r
-  BOOLEAN                           SysReq;  \r
+  BOOLEAN                           SysReq;\r
   BOOLEAN                           NumLock;\r
   BOOLEAN                           ScrollLock;\r
-  BOOLEAN                           CapsLock;  \r
+  BOOLEAN                           CapsLock;\r
+  BOOLEAN                           IsPartialKeySupport;\r
+  EFI_EVENT                         TimerEvent;\r
 } GOP_PRIVATE_DATA;\r
 \r
 #define GOP_PRIVATE_DATA_FROM_THIS(a)  \\r
@@ -171,7 +168,6 @@ extern EFI_DRIVER_BINDING_PROTOCOL   gWinNtGopDriverBinding;
 extern EFI_COMPONENT_NAME_PROTOCOL   gWinNtGopComponentName;\r
 extern EFI_COMPONENT_NAME2_PROTOCOL  gWinNtGopComponentName2;\r
 \r
-extern EFI_GUID                      gSimpleTextInExNotifyGuid;\r
 \r
 //\r
 // Gop Hardware abstraction internal worker functions\r
@@ -309,7 +305,7 @@ WinNtGopDriverBindingStop (
 \r
 **/\r
 EFI_STATUS\r
-GopPrivateAddQ (\r
+GopPrivateAddKey (\r
   IN  GOP_PRIVATE_DATA    *Private,\r
   IN  EFI_INPUT_KEY       Key\r
   );\r