]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Universal / Console / TerminalDxe / Terminal.h
index e16b89c264ce2a203d519c5c70fa5667e26227df..a4543fc8de99f6699f88e896e46de5af71710b6a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Header file for Terminal driver.\r
 \r
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 Copyright (C) 2016 Silicon Graphics, Inc. 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
@@ -81,10 +81,19 @@ typedef struct _TERMINAL_CONSOLE_IN_EX_NOTIFY {
   EFI_KEY_NOTIFY_FUNCTION               KeyNotificationFn;\r
   LIST_ENTRY                            NotifyEntry;\r
 } TERMINAL_CONSOLE_IN_EX_NOTIFY;\r
+\r
+typedef enum {\r
+  TerminalTypePcAnsi,\r
+  TerminalTypeVt100,\r
+  TerminalTypeVt100Plus,\r
+  TerminalTypeVtUtf8,\r
+  TerminalTypeTtyTerm\r
+} TERMINAL_TYPE;\r
+\r
 typedef struct {\r
   UINTN                               Signature;\r
   EFI_HANDLE                          Handle;\r
-  UINT8                               TerminalType;\r
+  TERMINAL_TYPE                       TerminalType;\r
   EFI_SERIAL_IO_PROTOCOL              *SerialIo;\r
   EFI_DEVICE_PATH_PROTOCOL            *DevicePath;\r
   EFI_SIMPLE_TEXT_INPUT_PROTOCOL      SimpleInput;\r
@@ -139,12 +148,6 @@ typedef union {
   UINT8 Utf8_3[3];\r
 } UTF8_CHAR;\r
 \r
-#define PCANSITYPE                0\r
-#define VT100TYPE                 1\r
-#define VT100PLUSTYPE             2\r
-#define VTUTF8TYPE                3\r
-#define TTYTERMTYPE               4\r
-\r
 #define LEFTOPENBRACKET           0x5b  // '['\r
 #define ACAP                      0x41\r
 #define BCAP                      0x42\r
@@ -340,9 +343,12 @@ TerminalConInSetState (
   @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
+                                   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
@@ -859,7 +865,7 @@ TerminalRemoveConsoleDevVariable (
 **/\r
 EFI_STATUS\r
 SetTerminalDevicePath (\r
-  IN  UINT8                       TerminalType,\r
+  IN  TERMINAL_TYPE               TerminalType,\r
   IN  EFI_DEVICE_PATH_PROTOCOL    *ParentDevicePath,\r
   OUT EFI_DEVICE_PATH_PROTOCOL    **TerminalDevicePath\r
   );\r
@@ -1084,7 +1090,7 @@ UnicodeFiFoInsertOneKey (
 \r
 /**\r
   Remove one pre-fetched key out of the Unicode FIFO buffer.\r
-  The caller should guarantee that Unicode FIFO buffer is not empty \r
+  The caller should guarantee that Unicode FIFO buffer is not empty\r
   by IsUnicodeFiFoEmpty ().\r
 \r
   @param  TerminalDevice       Terminal driver private structure.\r
@@ -1286,10 +1292,10 @@ VTUTF8TestString (
   Translate one Unicode character into VT-UTF8 characters.\r
 \r
   UTF8 Encoding Table\r
-  Bits per Character | Unicode Character Range | Unicode Binary  Encoding |    UTF8 Binary Encoding\r
-        0-7             |     0x0000 - 0x007F      |     00000000 0xxxxxxx        |   0xxxxxxx\r
-        8-11          |     0x0080 - 0x07FF        |     00000xxx xxxxxxxx       |   110xxxxx 10xxxxxx\r
-       12-16           |     0x0800 - 0xFFFF       |     xxxxxxxx xxxxxxxx        |   1110xxxx 10xxxxxx 10xxxxxx\r
+  Bits per Character | Unicode Character Range | Unicode Binary  Encoding |  UTF8 Binary Encoding\r
+        0-7           |     0x0000 - 0x007F      |     00000000 0xxxxxxx     |   0xxxxxxx\r
+        8-11          |     0x0080 - 0x07FF      |     00000xxx xxxxxxxx     |   110xxxxx 10xxxxxx\r
+       12-16          |     0x0800 - 0xFFFF      |     xxxxxxxx xxxxxxxx     |   1110xxxx 10xxxxxx 10xxxxxx\r
 \r
 \r
   @param  Unicode          Unicode character need translating.\r
@@ -1325,10 +1331,10 @@ GetOneValidUtf8Char (
   Translate VT-UTF8 characters into one Unicode character.\r
 \r
   UTF8 Encoding Table\r
-  Bits per Character | Unicode Character Range | Unicode Binary  Encoding |    UTF8 Binary Encoding\r
-        0-7             |     0x0000 - 0x007F      |     00000000 0xxxxxxx        |   0xxxxxxx\r
-        8-11          |     0x0080 - 0x07FF        |     00000xxx xxxxxxxx       |   110xxxxx 10xxxxxx\r
-       12-16           |     0x0800 - 0xFFFF       |     xxxxxxxx xxxxxxxx        |   1110xxxx 10xxxxxx 10xxxxxx\r
+  Bits per Character | Unicode Character Range | Unicode Binary  Encoding |  UTF8 Binary Encoding\r
+        0-7           |     0x0000 - 0x007F      |     00000000 0xxxxxxx     |   0xxxxxxx\r
+        8-11          |     0x0080 - 0x07FF      |     00000xxx xxxxxxxx     |   110xxxxx 10xxxxxx\r
+       12-16          |     0x0800 - 0xFFFF      |     xxxxxxxx xxxxxxxx     |   1110xxxx 10xxxxxx 10xxxxxx\r
 \r
 \r
   @param  Utf8Char         VT-UTF8 character set needs translating.\r