Path: blob/main/sys/contrib/edk2/Include/Protocol/AbsolutePointer.h
96339 views
/** @file1The file provides services that allow information about an2absolute pointer device to be retrieved.34Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>5SPDX-License-Identifier: BSD-2-Clause-Patent67@par Revision Reference:8This Protocol was introduced in UEFI Specification 2.3.910**/1112#ifndef __ABSOLUTE_POINTER_H__13#define __ABSOLUTE_POINTER_H__1415#define EFI_ABSOLUTE_POINTER_PROTOCOL_GUID \16{ 0x8D59D32B, 0xC655, 0x4AE9, { 0x9B, 0x15, 0xF2, 0x59, 0x04, 0x99, 0x2A, 0x43 } }1718typedef struct _EFI_ABSOLUTE_POINTER_PROTOCOL EFI_ABSOLUTE_POINTER_PROTOCOL;1920// *******************************************************21// EFI_ABSOLUTE_POINTER_MODE22// *******************************************************2324/**25The following data values in the EFI_ABSOLUTE_POINTER_MODE26interface are read-only and are changed by using the appropriate27interface functions.28**/29typedef struct {30UINT64 AbsoluteMinX; ///< The Absolute Minimum of the device on the x-axis31UINT64 AbsoluteMinY; ///< The Absolute Minimum of the device on the y axis.32UINT64 AbsoluteMinZ; ///< The Absolute Minimum of the device on the z-axis33UINT64 AbsoluteMaxX; ///< The Absolute Maximum of the device on the x-axis. If 0, and the34///< AbsoluteMinX is 0, then the pointer device does not support a xaxis35UINT64 AbsoluteMaxY; ///< The Absolute Maximum of the device on the y -axis. If 0, and the36///< AbsoluteMinX is 0, then the pointer device does not support a yaxis.37UINT64 AbsoluteMaxZ; ///< The Absolute Maximum of the device on the z-axis. If 0 , and the38///< AbsoluteMinX is 0, then the pointer device does not support a zaxis39UINT32 Attributes; ///< The following bits are set as needed (or'd together) to indicate the40///< capabilities of the device supported. The remaining bits are undefined41///< and should be 042} EFI_ABSOLUTE_POINTER_MODE;4344///45/// If set, indicates this device supports an alternate button input.46///47#define EFI_ABSP_SupportsAltActive 0x000000014849///50/// If set, indicates this device returns pressure data in parameter CurrentZ.51///52#define EFI_ABSP_SupportsPressureAsZ 0x000000025354/**55This function resets the pointer device hardware. As part of56initialization process, the firmware/device will make a quick57but reasonable attempt to verify that the device is58functioning. If the ExtendedVerification flag is TRUE the59firmware may take an extended amount of time to verify the60device is operating on reset. Otherwise the reset operation is61to occur as quickly as possible. The hardware verification62process is not defined by this specification and is left up to63the platform firmware or driver to implement.6465@param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL66instance.6768@param ExtendedVerification Indicates that the driver may69perform a more exhaustive70verification operation of the71device during reset.7273@retval EFI_SUCCESS The device was reset.7475@retval EFI_DEVICE_ERROR The device is not functioning76correctly and could not be reset.7778**/79typedef80EFI_STATUS81(EFIAPI *EFI_ABSOLUTE_POINTER_RESET)(82IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,83IN BOOLEAN ExtendedVerification84);8586///87/// This bit is set if the touch sensor is active.88///89#define EFI_ABSP_TouchActive 0x000000019091///92/// This bit is set if the alt sensor, such as pen-side button, is active93///94#define EFI_ABS_AltActive 0x000000029596/**97Definition of EFI_ABSOLUTE_POINTER_STATE.98**/99typedef struct {100///101/// The unsigned position of the activation on the x axis. If the AboluteMinX102/// and the AboluteMaxX fields of the EFI_ABSOLUTE_POINTER_MODE structure are103/// both 0, then this pointer device does not support an x-axis, and this field104/// must be ignored.105///106UINT64 CurrentX;107108///109/// The unsigned position of the activation on the y axis. If the AboluteMinY110/// and the AboluteMaxY fields of the EFI_ABSOLUTE_POINTER_MODE structure are111/// both 0, then this pointer device does not support an y-axis, and this field112/// must be ignored.113///114UINT64 CurrentY;115116///117/// The unsigned position of the activation on the z axis, or the pressure118/// measurement. If the AboluteMinZ and the AboluteMaxZ fields of the119/// EFI_ABSOLUTE_POINTER_MODE structure are both 0, then this pointer device120/// does not support an z-axis, and this field must be ignored.121///122UINT64 CurrentZ;123124///125/// Bits are set to 1 in this structure item to indicate that device buttons are126/// active.127///128UINT32 ActiveButtons;129} EFI_ABSOLUTE_POINTER_STATE;130131/**132The GetState() function retrieves the current state of a pointer133device. This includes information on the active state associated134with the pointer device and the current position of the axes135associated with the pointer device. If the state of the pointer136device has not changed since the last call to GetState(), then137EFI_NOT_READY is returned. If the state of the pointer device138has changed since the last call to GetState(), then the state139information is placed in State, and EFI_SUCCESS is returned. If140a device error occurs while attempting to retrieve the state141information, then EFI_DEVICE_ERROR is returned.142143144@param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL145instance.146147@param State A pointer to the state information on the148pointer device.149150@retval EFI_SUCCESS The state of the pointer device was151returned in State.152153@retval EFI_NOT_READY The state of the pointer device has not154changed since the last call to GetState().155156@retval EFI_DEVICE_ERROR A device error occurred while157attempting to retrieve the pointer158device's current state.159160**/161typedef162EFI_STATUS163(EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE)(164IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,165OUT EFI_ABSOLUTE_POINTER_STATE *State166);167168///169/// The EFI_ABSOLUTE_POINTER_PROTOCOL provides a set of services170/// for a pointer device that can be used as an input device from an171/// application written to this specification. The services include172/// the ability to: reset the pointer device, retrieve the state of173/// the pointer device, and retrieve the capabilities of the pointer174/// device. The service also provides certain data items describing the device.175///176struct _EFI_ABSOLUTE_POINTER_PROTOCOL {177EFI_ABSOLUTE_POINTER_RESET Reset;178EFI_ABSOLUTE_POINTER_GET_STATE GetState;179///180/// Event to use with WaitForEvent() to wait for input from the pointer device.181///182EFI_EVENT WaitForInput;183///184/// Pointer to EFI_ABSOLUTE_POINTER_MODE data.185///186EFI_ABSOLUTE_POINTER_MODE *Mode;187};188189extern EFI_GUID gEfiAbsolutePointerProtocolGuid;190191#endif192193194