]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
MdeModulePkg: Update comments in SimpleTextInEx according to UEFI 2.7
[mirror_edk2.git] / MdeModulePkg / Universal / Console / ConSplitterDxe / ConSplitter.h
index c22f0f659fab00cee3c9273bb0b4f4637654e096..9469860bf0b6b16ff1922249b59106c78a0c4f2e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Private data structures for the Console Splitter driver\r
 \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
 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
@@ -16,6 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define _CON_SPLITTER_H_\r
 \r
 #include <Uefi.h>\r
+#include <PiDxe.h>\r
 \r
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/ComponentName.h>\r
@@ -31,6 +32,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Guid/ConsoleInDevice.h>\r
 #include <Guid/StandardErrorDevice.h>\r
 #include <Guid/ConsoleOutDevice.h>\r
+#include <Guid/ConnectConInEvent.h>\r
 \r
 #include <Library/PcdLib.h>\r
 #include <Library/DebugLib.h>\r
@@ -42,7 +44,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/UefiRuntimeServicesTableLib.h>\r
 \r
-\r
 //\r
 // Driver Binding Externs\r
 //\r
@@ -74,8 +75,7 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterStdErrComponentName2;
 //\r
 // Private Data Structures\r
 //\r
-#define CONSOLE_SPLITTER_CONSOLES_ALLOC_UNIT  32\r
-#define CONSOLE_SPLITTER_MODES_ALLOC_UNIT     32\r
+#define CONSOLE_SPLITTER_ALLOC_UNIT  32\r
 \r
 \r
 typedef struct {\r
@@ -88,6 +88,7 @@ typedef struct {
   UINTN   Rows;\r
 } TEXT_OUT_SPLITTER_QUERY_DATA;\r
 \r
+#define KEY_STATE_VALID_EXPOSED (EFI_TOGGLE_STATE_VALID | EFI_KEY_STATE_EXPOSED)\r
 \r
 #define TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE    SIGNATURE_32 ('T', 'i', 'S', 'n')\r
 \r
@@ -96,8 +97,7 @@ typedef struct {
 //\r
 typedef struct _TEXT_IN_EX_SPLITTER_NOTIFY {\r
   UINTN                                 Signature;\r
-  EFI_HANDLE                            *NotifyHandleList;\r
-  EFI_HANDLE                            NotifyHandle;\r
+  VOID                                  **NotifyHandleList;\r
   EFI_KEY_DATA                          KeyData;\r
   EFI_KEY_NOTIFY_FUNCTION               KeyNotificationFn;\r
   LIST_ENTRY                            NotifyEntry;\r
@@ -129,6 +129,16 @@ typedef struct {
   EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL  **TextInExList;\r
   UINTN                              TextInExListCount;\r
   LIST_ENTRY                         NotifyList;\r
+  //\r
+  // It will be initialized and synced between console input devices\r
+  // for toggle state sync.\r
+  //\r
+  EFI_KEY_TOGGLE_STATE               PhysicalKeyToggleState;\r
+  //\r
+  // It will be initialized and used to record if virtual KeyState\r
+  // has been required to be exposed.\r
+  //\r
+  BOOLEAN                            VirtualKeyStateExported;\r
 \r
 \r
   EFI_SIMPLE_POINTER_PROTOCOL        SimplePointer;\r
@@ -146,6 +156,7 @@ typedef struct {
 \r
   BOOLEAN                            KeyEventSignalState;\r
   BOOLEAN                            InputEventSignalState;\r
+  EFI_EVENT                          ConnectConInEvent;\r
 } TEXT_IN_SPLITTER_PRIVATE_DATA;\r
 \r
 #define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a)  \\r
@@ -1385,11 +1396,14 @@ ConSplitterTextInSetState (
   Register a notification function for a particular keystroke for the input device.\r
 \r
   @param  This                     Protocol instance pointer.\r
-  @param  KeyData                  A pointer to a buffer that is filled in with the\r
-                                   keystroke information data for the key that was\r
-                                   pressed.\r
+  @param  KeyData                  A pointer to a buffer that is filled in with\r
+                                   the keystroke information for the key that was\r
+                                   pressed. If KeyData.Key, KeyData.KeyState.KeyToggleState\r
+                                   and KeyData.KeyState.KeyShiftState are 0, then any incomplete\r
+                                   keystroke will trigger a notification of the KeyNotificationFunction.\r
   @param  KeyNotificationFunction  Points to the function to be called when the key\r
-                                   sequence is typed specified by KeyData.\r
+                                   sequence is typed specified by KeyData. This notification function\r
+                                   should be called at <=TPL_CALLBACK.\r
   @param  NotifyHandle             Points to the unique handle assigned to the\r
                                    registered notification.\r
 \r
@@ -1406,7 +1420,7 @@ ConSplitterTextInRegisterKeyNotify (
   IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL  *This,\r
   IN EFI_KEY_DATA                       *KeyData,\r
   IN EFI_KEY_NOTIFY_FUNCTION            KeyNotificationFunction,\r
-  OUT EFI_HANDLE                        *NotifyHandle\r
+  OUT VOID                              **NotifyHandle\r
   );\r
 \r
 \r
@@ -1427,7 +1441,7 @@ EFI_STATUS
 EFIAPI\r
 ConSplitterTextInUnregisterKeyNotify (\r
   IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL  *This,\r
-  IN EFI_HANDLE                         NotificationHandle\r
+  IN VOID                               *NotificationHandle\r
   );\r
 \r
 /**\r
@@ -1732,12 +1746,12 @@ ConSplitterTextOutEnableCursor (
   );\r
 \r
 /**\r
-  Take the passed in Buffer of size SizeOfCount and grow the buffer\r
-  by MAX (CONSOLE_SPLITTER_CONSOLES_ALLOC_UNIT, MaxGrow) * SizeOfCount\r
-  bytes. Copy the current data in Buffer to the new version of Buffer\r
-  and free the old version of buffer.\r
+  Take the passed in Buffer of size ElementSize and grow the buffer\r
+  by CONSOLE_SPLITTER_ALLOC_UNIT * ElementSize bytes.\r
+  Copy the current data in Buffer to the new version of Buffer and\r
+  free the old version of buffer.\r
 \r
-  @param  SizeOfCount              Size of element in array.\r
+  @param  ElementSize              Size of element in array.\r
   @param  Count                    Current number of elements in array.\r
   @param  Buffer                   Bigger version of passed in Buffer with all the\r
                                    data.\r
@@ -1748,7 +1762,7 @@ ConSplitterTextOutEnableCursor (
 **/\r
 EFI_STATUS\r
 ConSplitterGrowBuffer (\r
-  IN      UINTN                       SizeOfCount,\r
+  IN      UINTN                       ElementSize,\r
   IN OUT  UINTN                       *Count,\r
   IN OUT  VOID                        **Buffer\r
   );\r
@@ -1985,5 +1999,4 @@ TextOutSetMode (
   IN  UINTN                           ModeNumber\r
   );\r
 \r
-\r
 #endif\r