X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FSimpleTextInEx.h;h=ffc11c601e1304e3ee283d4675a4a633dc4bd571;hp=6420a55a9fc50d9cc719f14da889993b01b30a52;hb=2de87e461d37680ebbae455b51341dbf49a27567;hpb=9df063a06aef048c042498e2f542fb693e93493a
diff --git a/MdePkg/Include/Protocol/SimpleTextInEx.h b/MdePkg/Include/Protocol/SimpleTextInEx.h
index 6420a55a9f..ffc11c601e 100644
--- a/MdePkg/Include/Protocol/SimpleTextInEx.h
+++ b/MdePkg/Include/Protocol/SimpleTextInEx.h
@@ -1,24 +1,26 @@
/** @file
Simple Text Input Ex protocol from the UEFI 2.0 specification.
-
+
This protocol defines an extension to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL
which exposes much more state and modifier information from the input device,
also allows one to register a notification for a particular keystroke.
- Copyright (c) 2006 - 2009, 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
+ Copyright (c) 2006 - 2018, 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
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __SIMPLE_TEXT_IN_EX_H__
#define __SIMPLE_TEXT_IN_EX_H__
+#include
+
#define EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID \
{0xdd9e7534, 0x7762, 0x4698, { 0x8c, 0x14, 0xf5, 0x85, 0x17, 0xa6, 0x25, 0xaa } }
@@ -45,7 +47,7 @@ typedef struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL EFI_SIMPLE_TEXT_INPUT_EX_PROTO
@retval EFI_SUCCESS The device was reset.
-
+
@retval EFI_DEVICE_ERROR The device is not functioning
correctly and could not be reset.
@@ -111,17 +113,21 @@ typedef struct {
#define EFI_MENU_KEY_PRESSED 0x00000100
#define EFI_SYS_REQ_PRESSED 0x00000200
-//
-// Toggle state
-//
+//
+// Toggle state
+//
#define EFI_TOGGLE_STATE_VALID 0x80
+#define EFI_KEY_STATE_EXPOSED 0x40
#define EFI_SCROLL_LOCK_ACTIVE 0x01
#define EFI_NUM_LOCK_ACTIVE 0x02
#define EFI_CAPS_LOCK_ACTIVE 0x04
-
-//
-// EFI Scan codes
-//
+
+//
+// EFI Scan codes
+//
+#define SCAN_F11 0x0015
+#define SCAN_F12 0x0016
+#define SCAN_PAUSE 0x0048
#define SCAN_F13 0x0068
#define SCAN_F14 0x0069
#define SCAN_F15 0x006A
@@ -176,21 +182,18 @@ typedef struct {
state information, and in those cases the high order bit in the
respective Toggle and Shift state fields should not be active.
-
+
@param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
@param KeyData A pointer to a buffer that is filled in with
the keystroke state data for the key that was
pressed.
-
- @retval EFI_SUCCESS The keystroke information was
- returned.
-
- @retval EFI_NOT_READY There was no keystroke data available.
- EFI_DEVICE_ERROR The keystroke
- information was not returned due to
- hardware errors.
+
+ @retval EFI_SUCCESS The keystroke information was returned.
+ @retval EFI_NOT_READY There was no keystroke data available.
+ @retval EFI_DEVICE_ERROR The keystroke information was not returned due to
+ hardware errors.
**/
@@ -204,13 +207,13 @@ EFI_STATUS
/**
The SetState() function allows the input device hardware to
have state settings adjusted.
-
+
@param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
-
+
@param KeyToggleState Pointer to the EFI_KEY_TOGGLE_STATE to
set the state for the input device.
-
-
+
+
@retval EFI_SUCCESS The device state was set appropriately.
@retval EFI_DEVICE_ERROR The device is not functioning
@@ -240,23 +243,24 @@ EFI_STATUS
/**
The RegisterKeystrokeNotify() function registers a function
which will be called when a specified keystroke will occur.
-
+
@param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
-
+
@param KeyData A pointer to a buffer that is filled in with
the keystroke information for the key that was
- pressed.
-
- @param KeyNotificationFunction Points to the function to be
- called when the key sequence
- is typed specified by KeyData.
-
-
+ pressed. If KeyData.Key, KeyData.KeyState.KeyToggleState
+ and KeyData.KeyState.KeyShiftState are 0, then any incomplete
+ keystroke will trigger a notification of the KeyNotificationFunction.
+
+ @param KeyNotificationFunction Points to the function to be called when the key sequence
+ is typed specified by KeyData. This notification function
+ should be called at <=TPL_CALLBACK.
+
+
@param NotifyHandle Points to the unique handle assigned to
the registered notification.
-
- @retval EFI_SUCCESS The device state was set
- appropriately.
+
+ @retval EFI_SUCCESS Key notify was registered successfully.
@retval EFI_OUT_OF_RESOURCES Unable to allocate necessary
data structures.
@@ -268,20 +272,20 @@ EFI_STATUS
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_DATA *KeyData,
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
- OUT EFI_HANDLE *NotifyHandle
+ OUT VOID **NotifyHandle
);
/**
The UnregisterKeystrokeNotify() function removes the
notification which was previously registered.
-
+
@param This A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
-
+
@param NotificationHandle The handle of the notification
function being unregistered.
-
- @retval EFI_SUCCESS The device state was set appropriately.
-
+
+ @retval EFI_SUCCESS Key notify was unregistered successfully.
+
@retval EFI_INVALID_PARAMETER The NotificationHandle is
invalid.
@@ -290,7 +294,7 @@ typedef
EFI_STATUS
(EFIAPI *EFI_UNREGISTER_KEYSTROKE_NOTIFY)(
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
- IN EFI_HANDLE NotificationHandle
+ IN VOID *NotificationHandle
);