2 The file provides services that allow information about an
3 absolute pointer device to be retrieved.
5 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
8 @par Revision Reference:
9 This Protocol was introduced in UEFI Specification 2.3.
13 #ifndef __ABSOLUTE_POINTER_H__
14 #define __ABSOLUTE_POINTER_H__
17 #define EFI_ABSOLUTE_POINTER_PROTOCOL_GUID \
18 { 0x8D59D32B, 0xC655, 0x4AE9, { 0x9B, 0x15, 0xF2, 0x59, 0x04, 0x99, 0x2A, 0x43 } }
21 typedef struct _EFI_ABSOLUTE_POINTER_PROTOCOL EFI_ABSOLUTE_POINTER_PROTOCOL
;
24 //*******************************************************
25 // EFI_ABSOLUTE_POINTER_MODE
26 //*******************************************************
30 The following data values in the EFI_ABSOLUTE_POINTER_MODE
31 interface are read-only and are changed by using the appropriate
35 UINT64 AbsoluteMinX
; ///< The Absolute Minimum of the device on the x-axis
36 UINT64 AbsoluteMinY
; ///< The Absolute Minimum of the device on the y axis.
37 UINT64 AbsoluteMinZ
; ///< The Absolute Minimum of the device on the z-axis
38 UINT64 AbsoluteMaxX
; ///< The Absolute Maximum of the device on the x-axis. If 0, and the
39 ///< AbsoluteMinX is 0, then the pointer device does not support a xaxis
40 UINT64 AbsoluteMaxY
; ///< The Absolute Maximum of the device on the y -axis. If 0, and the
41 ///< AbsoluteMinX is 0, then the pointer device does not support a yaxis.
42 UINT64 AbsoluteMaxZ
; ///< The Absolute Maximum of the device on the z-axis. If 0 , and the
43 ///< AbsoluteMinX is 0, then the pointer device does not support a zaxis
44 UINT32 Attributes
; ///< The following bits are set as needed (or'd together) to indicate the
45 ///< capabilities of the device supported. The remaining bits are undefined
47 } EFI_ABSOLUTE_POINTER_MODE
;
50 /// If set, indicates this device supports an alternate button input.
52 #define EFI_ABSP_SupportsAltActive 0x00000001
55 /// If set, indicates this device returns pressure data in parameter CurrentZ.
57 #define EFI_ABSP_SupportsPressureAsZ 0x00000002
61 This function resets the pointer device hardware. As part of
62 initialization process, the firmware/device will make a quick
63 but reasonable attempt to verify that the device is
64 functioning. If the ExtendedVerification flag is TRUE the
65 firmware may take an extended amount of time to verify the
66 device is operating on reset. Otherwise the reset operation is
67 to occur as quickly as possible. The hardware verification
68 process is not defined by this specification and is left up to
69 the platform firmware or driver to implement.
71 @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL
74 @param ExtendedVerification Indicates that the driver may
75 perform a more exhaustive
76 verification operation of the
79 @retval EFI_SUCCESS The device was reset.
81 @retval EFI_DEVICE_ERROR The device is not functioning
82 correctly and could not be reset.
87 (EFIAPI
*EFI_ABSOLUTE_POINTER_RESET
)(
88 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
89 IN BOOLEAN ExtendedVerification
93 /// This bit is set if the touch sensor is active.
95 #define EFI_ABSP_TouchActive 0x00000001
98 /// This bit is set if the alt sensor, such as pen-side button, is active
100 #define EFI_ABS_AltActive 0x00000002
104 Definition of EFI_ABSOLUTE_POINTER_STATE.
108 /// The unsigned position of the activation on the x axis. If the AboluteMinX
109 /// and the AboluteMaxX fields of the EFI_ABSOLUTE_POINTER_MODE structure are
110 /// both 0, then this pointer device does not support an x-axis, and this field
116 /// The unsigned position of the activation on the y axis. If the AboluteMinY
117 /// and the AboluteMaxY fields of the EFI_ABSOLUTE_POINTER_MODE structure are
118 /// both 0, then this pointer device does not support an y-axis, and this field
124 /// The unsigned position of the activation on the z axis, or the pressure
125 /// measurement. If the AboluteMinZ and the AboluteMaxZ fields of the
126 /// EFI_ABSOLUTE_POINTER_MODE structure are both 0, then this pointer device
127 /// does not support an z-axis, and this field must be ignored.
132 /// Bits are set to 1 in this structure item to indicate that device buttons are
135 UINT32 ActiveButtons
;
136 } EFI_ABSOLUTE_POINTER_STATE
;
139 The GetState() function retrieves the current state of a pointer
140 device. This includes information on the active state associated
141 with the pointer device and the current position of the axes
142 associated with the pointer device. If the state of the pointer
143 device has not changed since the last call to GetState(), then
144 EFI_NOT_READY is returned. If the state of the pointer device
145 has changed since the last call to GetState(), then the state
146 information is placed in State, and EFI_SUCCESS is returned. If
147 a device error occurs while attempting to retrieve the state
148 information, then EFI_DEVICE_ERROR is returned.
151 @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL
154 @param State A pointer to the state information on the
157 @retval EFI_SUCCESS The state of the pointer device was
160 @retval EFI_NOT_READY The state of the pointer device has not
161 changed since the last call to GetState().
163 @retval EFI_DEVICE_ERROR A device error occurred while
164 attempting to retrieve the pointer
165 device's current state.
170 (EFIAPI
*EFI_ABSOLUTE_POINTER_GET_STATE
)(
171 IN EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
172 OUT EFI_ABSOLUTE_POINTER_STATE
*State
177 /// The EFI_ABSOLUTE_POINTER_PROTOCOL provides a set of services
178 /// for a pointer device that can be used as an input device from an
179 /// application written to this specification. The services include
180 /// the ability to: reset the pointer device, retrieve the state of
181 /// the pointer device, and retrieve the capabilities of the pointer
182 /// device. The service also provides certain data items describing the device.
184 struct _EFI_ABSOLUTE_POINTER_PROTOCOL
{
185 EFI_ABSOLUTE_POINTER_RESET Reset
;
186 EFI_ABSOLUTE_POINTER_GET_STATE GetState
;
188 /// Event to use with WaitForEvent() to wait for input from the pointer device.
190 EFI_EVENT WaitForInput
;
192 /// Pointer to EFI_ABSOLUTE_POINTER_MODE data.
194 EFI_ABSOLUTE_POINTER_MODE
*Mode
;
198 extern EFI_GUID gEfiAbsolutePointerProtocolGuid
;