X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Nt32Pkg%2FWinNtGopDxe%2FWinNtGop.h;h=dcc52759e64e94046b3d0c60ebea9607512a918f;hb=bb47667aa726cf86634f6ccbb445d080994f9e22;hp=cc7283ebf688c41fead3a1e7d3878a06603091ee;hpb=c9fc89a313e0955d3eb8baf3bbfd8bb7d450ad7c;p=mirror_edk2.git diff --git a/Nt32Pkg/WinNtGopDxe/WinNtGop.h b/Nt32Pkg/WinNtGopDxe/WinNtGop.h index cc7283ebf6..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 @@ -23,41 +23,63 @@ Abstract: #ifndef _WIN_NT_GOP_H_ #define _WIN_NT_GOP_H_ -// -// Include common header file for this module. -// -#include "CommonHeader.h" -//@MT:#include "EfiWinNT.h" -//@MT:#include "Tiano.h" -//@MT:#include "EfiDriverLib.h" +#include +#include -// -// Driver Consumed Protocols -// -//@MT:#include EFI_PROTOCOL_DEFINITION (DevicePath) -//@MT:#include EFI_PROTOCOL_DEFINITION (WinNtIo) +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include // -// Driver Produced Protocols -// -//@MT:#include EFI_PROTOCOL_DEFINITION (DriverBinding) -//@MT:#include EFI_PROTOCOL_DEFINITION (ComponentName) -//@MT:#include EFI_PROTOCOL_DEFINITION (GraphicsOutput) -//@MT:#include "LinkedList.h" +// 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. +// 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 +// 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" -#define GOP_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('S', 'g', 'o', 'N') +#define GOP_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('S', 'g', 'o', 'N') + +#define WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE SIGNATURE_32 ('W', 'g', 'S', 'n') + +typedef struct _WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY { + UINTN Signature; + EFI_KEY_DATA KeyData; + EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn; + LIST_ENTRY NotifyEntry; +} WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY; #define GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER 0xffff @@ -109,12 +131,31 @@ 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 LeftAlt; + BOOLEAN RightAlt; + BOOLEAN LeftCtrl; + BOOLEAN RightCtrl; + BOOLEAN LeftLogo; + BOOLEAN RightLogo; + BOOLEAN Menu; + BOOLEAN SysReq; + BOOLEAN NumLock; + BOOLEAN ScrollLock; + BOOLEAN CapsLock; + BOOLEAN IsPartialKeySupport; + EFI_EVENT TimerEvent; } GOP_PRIVATE_DATA; #define GOP_PRIVATE_DATA_FROM_THIS(a) \ @@ -123,11 +164,16 @@ typedef struct { #define GOP_PRIVATE_DATA_FROM_TEXT_IN_THIS(a) \ CR(a, GOP_PRIVATE_DATA, SimpleTextIn, GOP_PRIVATE_DATA_SIGNATURE) +#define GOP_PRIVATE_DATA_FROM_TEXT_IN_EX_THIS(a) \ + CR(a, GOP_PRIVATE_DATA, SimpleTextInEx, GOP_PRIVATE_DATA_SIGNATURE) + // // Global Protocol Variables // -extern EFI_DRIVER_BINDING_PROTOCOL gWinNtGopDriverBinding; -extern EFI_COMPONENT_NAME_PROTOCOL gWinNtGopComponentName; +extern EFI_DRIVER_BINDING_PROTOCOL gWinNtGopDriverBinding; +extern EFI_COMPONENT_NAME_PROTOCOL gWinNtGopComponentName; +extern EFI_COMPONENT_NAME2_PROTOCOL gWinNtGopComponentName2; + // // Gop Hardware abstraction internal worker functions @@ -144,8 +190,7 @@ extern EFI_COMPONENT_NAME_PROTOCOL gWinNtGopComponentName; EFI_STATUS WinNtGopSupported ( IN EFI_WIN_NT_IO_PROTOCOL *WinNtIo - ) -; + ); /** @@ -159,8 +204,7 @@ WinNtGopSupported ( EFI_STATUS WinNtGopConstructor ( IN GOP_PRIVATE_DATA *Private - ) -; + ); /** @@ -174,11 +218,10 @@ WinNtGopConstructor ( EFI_STATUS WinNtGopDestructor ( IN GOP_PRIVATE_DATA *Private - ) -; + ); // -// EFI 1.1 driver model prototypes for Win NT GOP +// UEFI 2.0 driver model prototypes for Win NT GOP // @@ -196,8 +239,7 @@ EFIAPI WinNtGopInitialize ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable - ) -; + ); /** @@ -216,8 +258,7 @@ WinNtGopDriverBindingSupported ( IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Handle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath - ) -; + ); /** @@ -236,8 +277,7 @@ WinNtGopDriverBindingStart ( IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Handle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath - ) -; + ); /** @@ -258,8 +298,7 @@ WinNtGopDriverBindingStop ( IN EFI_HANDLE Handle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer - ) -; + ); /** @@ -272,11 +311,10 @@ WinNtGopDriverBindingStop ( **/ EFI_STATUS -GopPrivateAddQ ( +GopPrivateAddKey ( IN GOP_PRIVATE_DATA *Private, IN EFI_INPUT_KEY Key - ) -; + ); /** @@ -290,8 +328,7 @@ GopPrivateAddQ ( EFI_STATUS WinNtGopInitializeSimpleTextInForWindow ( IN GOP_PRIVATE_DATA *Private - ) -; + ); /** @@ -305,22 +342,8 @@ WinNtGopInitializeSimpleTextInForWindow ( EFI_STATUS WinNtGopDestroySimpleTextInForWindow ( IN GOP_PRIVATE_DATA *Private - ) -; - + ); -/** - TODO: Add function description - @param String TODO: add argument description - - @return TODO: add return values - -**/ -UINTN -Atoi ( - IN CHAR16 *String - ) -; #endif