X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Nt32Pkg%2FWinNtGopDxe%2FWinNtGop.h;h=dcc52759e64e94046b3d0c60ebea9607512a918f;hb=bb47667aa726cf86634f6ccbb445d080994f9e22;hp=e83f9ad86a89465aeec73f28880ee99032352da3;hpb=67252d9f0487160a91d43ccc739d13d59f58a0ae;p=mirror_edk2.git diff --git a/Nt32Pkg/WinNtGopDxe/WinNtGop.h b/Nt32Pkg/WinNtGopDxe/WinNtGop.h index e83f9ad86a..dcc52759e6 100644 --- a/Nt32Pkg/WinNtGopDxe/WinNtGop.h +++ b/Nt32Pkg/WinNtGopDxe/WinNtGop.h @@ -1,7 +1,7 @@ /** @file -Copyright (c) 2006, Intel Corporation -All rights reserved. This program and the accompanying materials +Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -34,7 +34,6 @@ Abstract: #include #include #include -#include #include #include @@ -47,25 +46,26 @@ Abstract: // // WM_SYSKEYDOWN/WM_SYSKEYUP Notification // lParam -// bit 24: Specifies whether the key is an extended key, -// such as the right-hand ALT and CTRL keys that appear on -// an enhanced 101- or 102-key keyboard. +// bit 24: Specifies whether the key is an extended key, +// such as the right-hand ALT and CTRL keys that appear on +// an enhanced 101- or 102-key keyboard. // The value is 1 if it is an extended key; otherwise, it is 0. -// bit 29:Specifies the context code. -// The value is 1 if the ALT key is down while the key is pressed/released; -// it is 0 if the WM_SYSKEYDOWN message is posted to the active window +// bit 29:Specifies the context code. +// The value is 1 if the ALT key is down while the key is pressed/released; +// it is 0 if the WM_SYSKEYDOWN message is posted to the active window // because no window has the keyboard focus. #define GOP_EXTENDED_KEY (0x1 << 24) #define GOP_ALT_KEY_PRESSED (0x1 << 29) +#define KEYBOARD_TIMER_INTERVAL 200000 // 0.02s #define MAX_Q 256 typedef struct { - UINTN Front; - UINTN Rear; - UINTN Count; - EFI_INPUT_KEY Q[MAX_Q]; + UINTN Front; + UINTN Rear; + EFI_KEY_DATA Q[MAX_Q]; + CRITICAL_SECTION Cs; } GOP_QUEUE_FIXED; #define WIN_NT_GOP_CLASS_NAME L"WinNtGopWindow" @@ -76,7 +76,6 @@ typedef struct { typedef struct _WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY { UINTN Signature; - EFI_HANDLE NotifyHandle; EFI_KEY_DATA KeyData; EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn; LIST_ENTRY NotifyEntry; @@ -132,17 +131,18 @@ typedef struct { EFI_GRAPHICS_OUTPUT_BLT_PIXEL *FillLine; // - // Keyboard Queue used by Simple Text In. WinProc thread adds, and main - // thread removes. + // Keyboard Queue used by Simple Text In. + // QueueForRead: WinProc thread adds, and main thread removes. + // QueueForNotify: WinProc thread adds, and timer thread removes. // - CRITICAL_SECTION QCriticalSection; - GOP_QUEUE_FIXED Queue; + GOP_QUEUE_FIXED QueueForRead; + GOP_QUEUE_FIXED QueueForNotify; EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL SimpleTextInEx; EFI_KEY_STATE KeyState; LIST_ENTRY NotifyList; BOOLEAN LeftShift; - BOOLEAN RightShift; + BOOLEAN RightShift; BOOLEAN LeftAlt; BOOLEAN RightAlt; BOOLEAN LeftCtrl; @@ -150,10 +150,12 @@ typedef struct { BOOLEAN LeftLogo; BOOLEAN RightLogo; BOOLEAN Menu; - BOOLEAN SysReq; + BOOLEAN SysReq; BOOLEAN NumLock; BOOLEAN ScrollLock; - BOOLEAN CapsLock; + BOOLEAN CapsLock; + BOOLEAN IsPartialKeySupport; + EFI_EVENT TimerEvent; } GOP_PRIVATE_DATA; #define GOP_PRIVATE_DATA_FROM_THIS(a) \ @@ -309,7 +311,7 @@ WinNtGopDriverBindingStop ( **/ EFI_STATUS -GopPrivateAddQ ( +GopPrivateAddKey ( IN GOP_PRIVATE_DATA *Private, IN EFI_INPUT_KEY Key );