2 The file provides services that allow information about a
3 absolute pointer device to be retrieved.
5 Copyright (c) 2006 - 2007, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 Module Name: AbsolutePointer.h
18 #ifndef __ABSOLUTE_POINTER_H__
19 #define __ABSOLUTE_POINTER_H__
22 #define EFI_ABSOLUTE_POINTER_PROTOCOL_GUID \
23 { 0x8D59D32B, 0xC655, 0x4AE9, { 0x9B, 0x15, 0xF2, 0x59, 0x04, 0x99, 0x2A, 0x43 } }
26 typedef struct _EFI_ABSOLUTE_POINTER_PROTOCOL EFI_ABSOLUTE_POINTER_PROTOCOL
;
29 //*******************************************************
30 // EFI_ABSOLUTE_POINTER_MODE
31 //*******************************************************
35 The following data values in the EFI_ABSOLUTE_POINTER_MODE
36 interface are read-only and are changed by using the appropriate
38 Attributes The following bits are set as needed (or'd
39 together) to indicate the capabilities of the device
40 supported. The remaining bits are undefined and should be
44 @param AbsoluteMinX The Absolute Minimum of the device on the
47 @param AbsoluteMinY The Absolute Minimum of the device on the
50 @param AbsoluteMinZ The Absolute Minimum of the device on the
53 @param AbsoluteMaxX The Absolute Maximum of the device on the
54 x-axis. If 0, and the AbsoluteMinX is 0,
55 then the pointer device does not support a
58 @param AbsoluteMaxY The Absolute Maximum of the device on the
59 y -axis. If 0,, and the AbsoluteMinX is 0,
60 then the pointer device does not support a
63 @param AbsoluteMaxZ The Absolute Maximum of the device on the
64 z-axis. If 0 , and the AbsoluteMinX is 0,
65 then the pointer device does not support a
77 } EFI_ABSOLUTE_POINTER_MODE
;
80 // If set, indicates this device supports an alternate button input.
82 #define EFI_ABSP_SupportsAltActive 0x00000001
85 // If set, indicates this device returns pressure data in parameter CurrentZ.
87 #define EFI_ABSP_SupportsPressureAsZ 0x00000002
91 This function resets the pointer device hardware. As part of
92 initialization process, the firmware/device will make a quick
93 but reasonable attempt to verify that the device is
94 functioning. If the ExtendedVerification flag is TRUE the
95 firmware may take an extended amount of time to verify the
96 device is operating on reset. Otherwise the reset operation is
97 to occur as quickly as possible. The hardware verification
98 process is not defined by this specification and is left up to
99 the platform firmware or driver to implement.
101 @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL
104 @param ExtendedVerification Indicates that the driver may
105 perform a more exhaustive
106 verification operation of the
109 @retval EFI_SUCCESS The device was reset.
111 @retval EFI_DEVICE_ERROR The device is not functioning
112 correctly and could not be reset.
117 (EFIAPI
*EFI_ABSOLUTE_POINTER_RESET
) (
118 IN CONST EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
119 IN CONST BOOLEAN ExtendedVerification
126 Definitions of bits within ActiveButtons.
128 @param EFI_ABSP_TouchActive This bit is set if the touch
131 @param EFI_ABS_AltActive This bit is set if the alt sensor,
132 such as pen-side button, is
135 #define EFI_ABSP_TouchActive 0x00000001
136 #define EFI_ABS_AltActive 0x00000002
140 Definition of EFI_ABSOLUTE_POINTER_STATE.
142 @param CurrentX The unsigned position of the activation on the
143 x axis If the AboluteMinX and the AboluteMaxX
144 fields of the EFI_ABSOLUTE_POINTER_MODE
145 structure are both 0, then this pointer device
146 does not support an x-axis, and this field
149 @param CurrentY The unsigned position of the activation on the
150 x axis If the AboluteMinY and the AboluteMaxY
151 fields of the EFI_ABSOLUTE_POINTER_MODE
152 structure are both 0, then this pointer device
153 does not support an y-axis, and this field
156 @param CurrentZ The unsigned position of the activation on the
157 x axis, or the pressure measurement. If the
158 AboluteMinZ and the AboluteMaxZ fields of the
159 EFI_ABSOLUTE_POINTER_MODE structure are
160 both 0, then this pointer device does not
161 support an z-axis, and this field must be
164 @param ActiveButtons Bits are set to 1 in this structure item
165 to indicate that device buttons are
173 UINT32 ActiveButtons
;
174 } EFI_ABSOLUTE_POINTER_STATE
;
177 The GetState() function retrieves the current state of a pointer
178 device. This includes information on the active state associated
179 with the pointer device and the current position of the axes
180 associated with the pointer device. If the state of the pointer
181 device has not changed since the last call to GetState(), then
182 EFI_NOT_READY is returned. If the state of the pointer device
183 has changed since the last call to GetState(), then the state
184 information is placed in State, and EFI_SUCCESS is returned. If
185 a device error occurs while attempting to retrieve the state
186 information, then EFI_DEVICE_ERROR is returned.
189 @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL
192 @param State A pointer to the state information on the
195 @retval EFI_SUCCESS The state of the pointer device was
198 @retval EFI_NOT_READY The state of the pointer device has not
199 changed since the last call to GetState().
201 @retval EFI_DEVICE_ERROR A device error occurred while
202 attempting to retrieve the pointer
203 device's current state.
208 (EFIAPI
*EFI_ABSOLUTE_POINTER_GET_STATE
) (
209 IN CONST EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
210 IN OUT EFI_ABSOLUTE_POINTER_STATE
*State
215 The EFI_ABSOLUTE_POINTER_PROTOCOL provides a set of services
216 for a pointer device that can be used as an input device from an
217 application written to this specification. The services include
218 the ability to reset the pointer device, retrieve the state of
219 the pointer device, and retrieve the capabilities of the pointer
220 device. In addition certain data items describing the device are
224 @param Reset Resets the pointer device.
226 @param GetState Retrieves the current state of the pointer
229 @param WaitForInput Event to use with WaitForEvent() to wait
230 for input from the pointer device.
231 @param Mode Pointer to EFI_ABSOLUTE_POINTER_MODE data.
234 struct _EFI_ABSOLUTE_POINTER_PROTOCOL
{
235 EFI_ABSOLUTE_POINTER_RESET Reset
;
236 EFI_ABSOLUTE_POINTER_GET_STATE GetState
;
237 EFI_EVENT WaitForInput
;
238 EFI_ABSOLUTE_POINTER_MODE
*Mode
;
242 extern EFI_GUID gEfiAbsolutePointerProtocolGuid
;