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.
16 #ifndef __ABSOLUTE_POINTER_H__
17 #define __ABSOLUTE_POINTER_H__
20 #define EFI_ABSOLUTE_POINTER_PROTOCOL_GUID \
21 { 0x8D59D32B, 0xC655, 0x4AE9, { 0x9B, 0x15, 0xF2, 0x59, 0x04, 0x99, 0x2A, 0x43 } }
24 typedef struct _EFI_ABSOLUTE_POINTER_PROTOCOL EFI_ABSOLUTE_POINTER_PROTOCOL
;
27 //*******************************************************
28 // EFI_ABSOLUTE_POINTER_MODE
29 //*******************************************************
33 The following data values in the EFI_ABSOLUTE_POINTER_MODE
34 interface are read-only and are changed by using the appropriate
36 Attributes The following bits are set as needed (or'd
37 together) to indicate the capabilities of the device
38 supported. The remaining bits are undefined and should be
42 @param AbsoluteMinX The Absolute Minimum of the device on the
45 @param AbsoluteMinY The Absolute Minimum of the device on the
48 @param AbsoluteMinZ The Absolute Minimum of the device on the
51 @param AbsoluteMaxX The Absolute Maximum of the device on the
52 x-axis. If 0, and the AbsoluteMinX is 0,
53 then the pointer device does not support a
56 @param AbsoluteMaxY The Absolute Maximum of the device on the
57 y -axis. If 0,, and the AbsoluteMinX is 0,
58 then the pointer device does not support a
61 @param AbsoluteMaxZ The Absolute Maximum of the device on the
62 z-axis. If 0 , and the AbsoluteMinX is 0,
63 then the pointer device does not support a
75 } EFI_ABSOLUTE_POINTER_MODE
;
78 // If set, indicates this device supports an alternate button input.
80 #define EFI_ABSP_SupportsAltActive 0x00000001
83 // If set, indicates this device returns pressure data in parameter CurrentZ.
85 #define EFI_ABSP_SupportsPressureAsZ 0x00000002
89 This function resets the pointer device hardware. As part of
90 initialization process, the firmware/device will make a quick
91 but reasonable attempt to verify that the device is
92 functioning. If the ExtendedVerification flag is TRUE the
93 firmware may take an extended amount of time to verify the
94 device is operating on reset. Otherwise the reset operation is
95 to occur as quickly as possible. The hardware verification
96 process is not defined by this specification and is left up to
97 the platform firmware or driver to implement.
99 @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL
102 @param ExtendedVerification Indicates that the driver may
103 perform a more exhaustive
104 verification operation of the
107 @retval EFI_SUCCESS The device was reset.
109 @retval EFI_DEVICE_ERROR The device is not functioning
110 correctly and could not be reset.
115 (EFIAPI
*EFI_ABSOLUTE_POINTER_RESET
) (
116 IN CONST EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
117 IN CONST BOOLEAN ExtendedVerification
124 Definitions of bits within ActiveButtons.
126 @param EFI_ABSP_TouchActive This bit is set if the touch
129 @param EFI_ABS_AltActive This bit is set if the alt sensor,
130 such as pen-side button, is
133 #define EFI_ABSP_TouchActive 0x00000001
134 #define EFI_ABS_AltActive 0x00000002
138 Definition of EFI_ABSOLUTE_POINTER_STATE.
140 @param CurrentX The unsigned position of the activation on the
141 x axis If the AboluteMinX and the AboluteMaxX
142 fields of the EFI_ABSOLUTE_POINTER_MODE
143 structure are both 0, then this pointer device
144 does not support an x-axis, and this field
147 @param CurrentY The unsigned position of the activation on the
148 x axis If the AboluteMinY and the AboluteMaxY
149 fields of the EFI_ABSOLUTE_POINTER_MODE
150 structure are both 0, then this pointer device
151 does not support an y-axis, and this field
154 @param CurrentZ The unsigned position of the activation on the
155 x axis, or the pressure measurement. If the
156 AboluteMinZ and the AboluteMaxZ fields of the
157 EFI_ABSOLUTE_POINTER_MODE structure are
158 both 0, then this pointer device does not
159 support an z-axis, and this field must be
162 @param ActiveButtons Bits are set to 1 in this structure item
163 to indicate that device buttons are
171 UINT32 ActiveButtons
;
172 } EFI_ABSOLUTE_POINTER_STATE
;
175 The GetState() function retrieves the current state of a pointer
176 device. This includes information on the active state associated
177 with the pointer device and the current position of the axes
178 associated with the pointer device. If the state of the pointer
179 device has not changed since the last call to GetState(), then
180 EFI_NOT_READY is returned. If the state of the pointer device
181 has changed since the last call to GetState(), then the state
182 information is placed in State, and EFI_SUCCESS is returned. If
183 a device error occurs while attempting to retrieve the state
184 information, then EFI_DEVICE_ERROR is returned.
187 @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL
190 @param State A pointer to the state information on the
193 @retval EFI_SUCCESS The state of the pointer device was
196 @retval EFI_NOT_READY The state of the pointer device has not
197 changed since the last call to GetState().
199 @retval EFI_DEVICE_ERROR A device error occurred while
200 attempting to retrieve the pointer
201 device's current state.
206 (EFIAPI
*EFI_ABSOLUTE_POINTER_GET_STATE
) (
207 IN CONST EFI_ABSOLUTE_POINTER_PROTOCOL
*This
,
208 IN OUT EFI_ABSOLUTE_POINTER_STATE
*State
213 The EFI_ABSOLUTE_POINTER_PROTOCOL provides a set of services
214 for a pointer device that can be used as an input device from an
215 application written to this specification. The services include
216 the ability to reset the pointer device, retrieve the state of
217 the pointer device, and retrieve the capabilities of the pointer
218 device. In addition certain data items describing the device are
222 @param Reset Resets the pointer device.
224 @param GetState Retrieves the current state of the pointer
227 @param WaitForInput Event to use with WaitForEvent() to wait
228 for input from the pointer device.
229 @param Mode Pointer to EFI_ABSOLUTE_POINTER_MODE data.
232 struct _EFI_ABSOLUTE_POINTER_PROTOCOL
{
233 EFI_ABSOLUTE_POINTER_RESET Reset
;
234 EFI_ABSOLUTE_POINTER_GET_STATE GetState
;
235 EFI_EVENT WaitForInput
;
236 EFI_ABSOLUTE_POINTER_MODE
*Mode
;
240 extern EFI_GUID gEfiAbsolutePointerProtocolGuid
;