]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/AbsolutePointer.h
MdePkg FirmwareManagement.h: Fix typo EFI_SECURITY_VIOLATIO
[mirror_edk2.git] / MdePkg / Include / Protocol / AbsolutePointer.h
CommitLineData
d1f95000 1/** @file\r
630b4187 2 The file provides services that allow information about an\r
d1f95000 3 absolute pointer device to be retrieved.\r
4 \r
b37aa2c6 5 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
9df063a0 6 This program and the accompanying materials \r
d1f95000 7 are licensed and made available under the terms and conditions of the BSD License \r
8 which accompanies this distribution. The full text of the license may be found at \r
9 http://opensource.org/licenses/bsd-license.php \r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
13\r
d1f95000 14**/\r
15\r
16#ifndef __ABSOLUTE_POINTER_H__\r
17#define __ABSOLUTE_POINTER_H__\r
18\r
19\r
20#define EFI_ABSOLUTE_POINTER_PROTOCOL_GUID \\r
21 { 0x8D59D32B, 0xC655, 0x4AE9, { 0x9B, 0x15, 0xF2, 0x59, 0x04, 0x99, 0x2A, 0x43 } }\r
22\r
23\r
24typedef struct _EFI_ABSOLUTE_POINTER_PROTOCOL EFI_ABSOLUTE_POINTER_PROTOCOL;\r
25\r
26\r
27//*******************************************************\r
28// EFI_ABSOLUTE_POINTER_MODE\r
29//*******************************************************\r
30\r
31\r
32/**\r
33 The following data values in the EFI_ABSOLUTE_POINTER_MODE\r
34 interface are read-only and are changed by using the appropriate\r
4ca9b6c4 35 interface functions.\r
d1f95000 36**/\r
37typedef struct {\r
7b98db89 38 UINT64 AbsoluteMinX; ///< The Absolute Minimum of the device on the x-axis\r
39 UINT64 AbsoluteMinY; ///< The Absolute Minimum of the device on the y axis.\r
40 UINT64 AbsoluteMinZ; ///< The Absolute Minimum of the device on the z-axis\r
41 UINT64 AbsoluteMaxX; ///< The Absolute Maximum of the device on the x-axis. If 0, and the \r
42 ///< AbsoluteMinX is 0, then the pointer device does not support a xaxis\r
43 UINT64 AbsoluteMaxY; ///< The Absolute Maximum of the device on the y -axis. If 0, and the \r
44 ///< AbsoluteMinX is 0, then the pointer device does not support a yaxis.\r
45 UINT64 AbsoluteMaxZ; ///< The Absolute Maximum of the device on the z-axis. If 0 , and the \r
46 ///< AbsoluteMinX is 0, then the pointer device does not support a zaxis\r
47 UINT32 Attributes; ///< The following bits are set as needed (or'd together) to indicate the \r
48 ///< capabilities of the device supported. The remaining bits are undefined \r
49 ///< and should be 0\r
d1f95000 50} EFI_ABSOLUTE_POINTER_MODE;\r
51\r
99e8ed21 52///\r
53/// If set, indicates this device supports an alternate button input. \r
54/// \r
d1f95000 55#define EFI_ABSP_SupportsAltActive 0x00000001\r
56\r
99e8ed21 57///\r
58/// If set, indicates this device returns pressure data in parameter CurrentZ.\r
59/// \r
d1f95000 60#define EFI_ABSP_SupportsPressureAsZ 0x00000002\r
61\r
62\r
63/**\r
64 This function resets the pointer device hardware. As part of\r
65 initialization process, the firmware/device will make a quick\r
66 but reasonable attempt to verify that the device is\r
67 functioning. If the ExtendedVerification flag is TRUE the\r
68 firmware may take an extended amount of time to verify the\r
69 device is operating on reset. Otherwise the reset operation is\r
70 to occur as quickly as possible. The hardware verification\r
71 process is not defined by this specification and is left up to\r
72 the platform firmware or driver to implement.\r
73\r
4ca9b6c4
LG
74 @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL\r
75 instance.\r
d1f95000 76\r
77 @param ExtendedVerification Indicates that the driver may\r
78 perform a more exhaustive\r
79 verification operation of the\r
80 device during reset.\r
81\r
4ca9b6c4 82 @retval EFI_SUCCESS The device was reset.\r
d1f95000 83 \r
84 @retval EFI_DEVICE_ERROR The device is not functioning\r
85 correctly and could not be reset.\r
86\r
87**/\r
88typedef\r
89EFI_STATUS\r
8b13229b 90(EFIAPI *EFI_ABSOLUTE_POINTER_RESET)(\r
8ae0b360 91 IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,\r
92 IN BOOLEAN ExtendedVerification\r
d1f95000 93);\r
94\r
7b98db89 95///\r
96/// This bit is set if the touch sensor is active.\r
97///\r
98#define EFI_ABSP_TouchActive 0x00000001 \r
d1f95000 99\r
7b98db89 100///\r
101/// This bit is set if the alt sensor, such as pen-side button, is active\r
102/// \r
d1f95000 103#define EFI_ABS_AltActive 0x00000002\r
104\r
105\r
106/**\r
107 Definition of EFI_ABSOLUTE_POINTER_STATE.\r
d1f95000 108**/\r
109typedef struct {\r
7b98db89 110 ///\r
630b4187 111 /// The unsigned position of the activation on the x axis. If the AboluteMinX \r
7b98db89 112 /// and the AboluteMaxX fields of the EFI_ABSOLUTE_POINTER_MODE structure are \r
113 /// both 0, then this pointer device does not support an x-axis, and this field\r
114 /// must be ignored.\r
115 ///\r
d1f95000 116 UINT64 CurrentX;\r
7b98db89 117 \r
118 ///\r
b37aa2c6 119 /// The unsigned position of the activation on the y axis. If the AboluteMinY \r
7b98db89 120 /// and the AboluteMaxY fields of the EFI_ABSOLUTE_POINTER_MODE structure are \r
121 /// both 0, then this pointer device does not support an y-axis, and this field\r
122 /// must be ignored. \r
123 ///\r
d1f95000 124 UINT64 CurrentY;\r
7b98db89 125 \r
126 ///\r
b37aa2c6 127 /// The unsigned position of the activation on the z axis, or the pressure \r
7b98db89 128 /// measurement. If the AboluteMinZ and the AboluteMaxZ fields of the \r
129 /// EFI_ABSOLUTE_POINTER_MODE structure are both 0, then this pointer device \r
130 /// does not support an z-axis, and this field must be ignored. \r
131 ///\r
d1f95000 132 UINT64 CurrentZ;\r
7b98db89 133 \r
134 ///\r
135 /// Bits are set to 1 in this structure item to indicate that device buttons are\r
136 /// active.\r
137 ///\r
d1f95000 138 UINT32 ActiveButtons;\r
139} EFI_ABSOLUTE_POINTER_STATE;\r
140\r
141/**\r
142 The GetState() function retrieves the current state of a pointer\r
143 device. This includes information on the active state associated\r
144 with the pointer device and the current position of the axes\r
145 associated with the pointer device. If the state of the pointer\r
146 device has not changed since the last call to GetState(), then\r
147 EFI_NOT_READY is returned. If the state of the pointer device\r
148 has changed since the last call to GetState(), then the state\r
149 information is placed in State, and EFI_SUCCESS is returned. If\r
150 a device error occurs while attempting to retrieve the state\r
151 information, then EFI_DEVICE_ERROR is returned.\r
152\r
153\r
4ca9b6c4
LG
154 @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL\r
155 instance.\r
d1f95000 156\r
157 @param State A pointer to the state information on the\r
158 pointer device.\r
159\r
4ca9b6c4
LG
160 @retval EFI_SUCCESS The state of the pointer device was\r
161 returned in State.\r
d1f95000 162\r
4ca9b6c4
LG
163 @retval EFI_NOT_READY The state of the pointer device has not\r
164 changed since the last call to GetState().\r
d1f95000 165\r
166 @retval EFI_DEVICE_ERROR A device error occurred while\r
167 attempting to retrieve the pointer\r
168 device's current state.\r
169\r
170**/\r
171typedef\r
172EFI_STATUS\r
8b13229b 173(EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE)(\r
ee6c452c 174 IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,\r
175 IN OUT EFI_ABSOLUTE_POINTER_STATE *State\r
d1f95000 176);\r
177\r
178\r
44717a39 179///\r
180/// The EFI_ABSOLUTE_POINTER_PROTOCOL provides a set of services\r
181/// for a pointer device that can be used as an input device from an\r
182/// application written to this specification. The services include\r
630b4187 183/// the ability to: reset the pointer device, retrieve the state of\r
44717a39 184/// the pointer device, and retrieve the capabilities of the pointer\r
630b4187 185/// device. The service also provides certain data items describing the device.\r
44717a39 186///\r
d1f95000 187struct _EFI_ABSOLUTE_POINTER_PROTOCOL {\r
188 EFI_ABSOLUTE_POINTER_RESET Reset;\r
189 EFI_ABSOLUTE_POINTER_GET_STATE GetState;\r
7b98db89 190 ///\r
191 /// Event to use with WaitForEvent() to wait for input from the pointer device. \r
192 ///\r
d1f95000 193 EFI_EVENT WaitForInput;\r
44717a39 194 ///\r
195 /// Pointer to EFI_ABSOLUTE_POINTER_MODE data.\r
196 ///\r
d1f95000 197 EFI_ABSOLUTE_POINTER_MODE *Mode;\r
198};\r
199\r
200\r
201extern EFI_GUID gEfiAbsolutePointerProtocolGuid;\r
202\r
203\r
204#endif\r
205\r