]>
Commit | Line | Data |
---|---|---|
d1f95000 | 1 | /** @file\r |
2 | The file provides services that allow information about a\r | |
3 | absolute pointer device to be retrieved.\r | |
4 | \r | |
5 | Copyright (c) 2006 - 2007, Intel Corporation\r | |
6 | All rights reserved. This program and the accompanying materials \r | |
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 | |
24 | typedef 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 | |
35 | interface functions:\r | |
36 | Attributes The following bits are set as needed (or'd\r | |
37 | together) to indicate the capabilities of the device\r | |
38 | supported. The remaining bits are undefined and should be\r | |
39 | returned as 0.\r | |
40 | \r | |
41 | \r | |
42 | @param AbsoluteMinX The Absolute Minimum of the device on the\r | |
43 | x-axis.\r | |
44 | \r | |
45 | @param AbsoluteMinY The Absolute Minimum of the device on the\r | |
46 | y axis.\r | |
47 | \r | |
48 | @param AbsoluteMinZ The Absolute Minimum of the device on the\r | |
49 | z-axis.\r | |
50 | \r | |
51 | @param AbsoluteMaxX The Absolute Maximum of the device on the\r | |
52 | x-axis. If 0, and the AbsoluteMinX is 0,\r | |
53 | then the pointer device does not support a\r | |
54 | xaxis.\r | |
55 | \r | |
56 | @param AbsoluteMaxY The Absolute Maximum of the device on the\r | |
57 | y -axis. If 0,, and the AbsoluteMinX is 0,\r | |
58 | then the pointer device does not support a\r | |
59 | yaxis.\r | |
60 | \r | |
61 | @param AbsoluteMaxZ The Absolute Maximum of the device on the\r | |
62 | z-axis. If 0 , and the AbsoluteMinX is 0,\r | |
63 | then the pointer device does not support a\r | |
64 | zaxis. \r | |
65 | \r | |
66 | **/\r | |
67 | typedef struct {\r | |
68 | UINT64 AbsoluteMinX;\r | |
69 | UINT64 AbsoluteMinY;\r | |
70 | UINT64 AbsoluteMinZ;\r | |
71 | UINT64 AbsoluteMaxX;\r | |
72 | UINT64 AbsoluteMaxY;\r | |
73 | UINT64 AbsoluteMaxZ;\r | |
74 | UINT32 Attributes;\r | |
75 | } EFI_ABSOLUTE_POINTER_MODE;\r | |
76 | \r | |
77 | //\r | |
78 | // If set, indicates this device supports an alternate button input. \r | |
79 | // \r | |
80 | #define EFI_ABSP_SupportsAltActive 0x00000001\r | |
81 | \r | |
82 | //\r | |
83 | // If set, indicates this device returns pressure data in parameter CurrentZ.\r | |
84 | // \r | |
85 | #define EFI_ABSP_SupportsPressureAsZ 0x00000002\r | |
86 | \r | |
87 | \r | |
88 | /**\r | |
89 | This function resets the pointer device hardware. As part of\r | |
90 | initialization process, the firmware/device will make a quick\r | |
91 | but reasonable attempt to verify that the device is\r | |
92 | functioning. If the ExtendedVerification flag is TRUE the\r | |
93 | firmware may take an extended amount of time to verify the\r | |
94 | device is operating on reset. Otherwise the reset operation is\r | |
95 | to occur as quickly as possible. The hardware verification\r | |
96 | process is not defined by this specification and is left up to\r | |
97 | the platform firmware or driver to implement.\r | |
98 | \r | |
99 | @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL\r | |
100 | instance.\r | |
101 | \r | |
102 | @param ExtendedVerification Indicates that the driver may\r | |
103 | perform a more exhaustive\r | |
104 | verification operation of the\r | |
105 | device during reset.\r | |
106 | \r | |
107 | @retval EFI_SUCCESS The device was reset.\r | |
108 | \r | |
109 | @retval EFI_DEVICE_ERROR The device is not functioning\r | |
110 | correctly and could not be reset.\r | |
111 | \r | |
112 | **/\r | |
113 | typedef\r | |
114 | EFI_STATUS\r | |
115 | (EFIAPI *EFI_ABSOLUTE_POINTER_RESET) (\r | |
116 | IN CONST EFI_ABSOLUTE_POINTER_PROTOCOL *This,\r | |
117 | IN CONST BOOLEAN ExtendedVerification\r | |
118 | );\r | |
119 | \r | |
120 | \r | |
121 | \r | |
122 | \r | |
123 | /**\r | |
124 | Definitions of bits within ActiveButtons.\r | |
125 | \r | |
126 | @param EFI_ABSP_TouchActive This bit is set if the touch\r | |
127 | sensor is active.\r | |
128 | \r | |
129 | @param EFI_ABS_AltActive This bit is set if the alt sensor,\r | |
130 | such as pen-side button, is\r | |
131 | active.\r | |
132 | **/\r | |
133 | #define EFI_ABSP_TouchActive 0x00000001\r | |
134 | #define EFI_ABS_AltActive 0x00000002\r | |
135 | \r | |
136 | \r | |
137 | /**\r | |
138 | Definition of EFI_ABSOLUTE_POINTER_STATE.\r | |
139 | \r | |
140 | @param CurrentX The unsigned position of the activation on the\r | |
141 | x axis If the AboluteMinX and the AboluteMaxX\r | |
142 | fields of the EFI_ABSOLUTE_POINTER_MODE\r | |
143 | structure are both 0, then this pointer device\r | |
144 | does not support an x-axis, and this field\r | |
145 | must be ignored.\r | |
146 | \r | |
147 | @param CurrentY The unsigned position of the activation on the\r | |
148 | x axis If the AboluteMinY and the AboluteMaxY\r | |
149 | fields of the EFI_ABSOLUTE_POINTER_MODE\r | |
150 | structure are both 0, then this pointer device\r | |
151 | does not support an y-axis, and this field\r | |
152 | must be ignored.\r | |
153 | \r | |
154 | @param CurrentZ The unsigned position of the activation on the\r | |
155 | x axis, or the pressure measurement. If the\r | |
156 | AboluteMinZ and the AboluteMaxZ fields of the\r | |
157 | EFI_ABSOLUTE_POINTER_MODE structure are\r | |
158 | both 0, then this pointer device does not\r | |
159 | support an z-axis, and this field must be\r | |
160 | ignored.\r | |
161 | \r | |
162 | @param ActiveButtons Bits are set to 1 in this structure item\r | |
163 | to indicate that device buttons are\r | |
164 | active.\r | |
165 | \r | |
166 | **/\r | |
167 | typedef struct {\r | |
168 | UINT64 CurrentX;\r | |
169 | UINT64 CurrentY;\r | |
170 | UINT64 CurrentZ;\r | |
171 | UINT32 ActiveButtons;\r | |
172 | } EFI_ABSOLUTE_POINTER_STATE;\r | |
173 | \r | |
174 | /**\r | |
175 | The GetState() function retrieves the current state of a pointer\r | |
176 | device. This includes information on the active state associated\r | |
177 | with the pointer device and the current position of the axes\r | |
178 | associated with the pointer device. If the state of the pointer\r | |
179 | device has not changed since the last call to GetState(), then\r | |
180 | EFI_NOT_READY is returned. If the state of the pointer device\r | |
181 | has changed since the last call to GetState(), then the state\r | |
182 | information is placed in State, and EFI_SUCCESS is returned. If\r | |
183 | a device error occurs while attempting to retrieve the state\r | |
184 | information, then EFI_DEVICE_ERROR is returned.\r | |
185 | \r | |
186 | \r | |
187 | @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL\r | |
188 | instance.\r | |
189 | \r | |
190 | @param State A pointer to the state information on the\r | |
191 | pointer device.\r | |
192 | \r | |
193 | @retval EFI_SUCCESS The state of the pointer device was\r | |
194 | returned in State.\r | |
195 | \r | |
196 | @retval EFI_NOT_READY The state of the pointer device has not\r | |
197 | changed since the last call to GetState().\r | |
198 | \r | |
199 | @retval EFI_DEVICE_ERROR A device error occurred while\r | |
200 | attempting to retrieve the pointer\r | |
201 | device's current state.\r | |
202 | \r | |
203 | **/\r | |
204 | typedef\r | |
205 | EFI_STATUS\r | |
206 | (EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE) (\r | |
207 | IN CONST EFI_ABSOLUTE_POINTER_PROTOCOL *This,\r | |
208 | IN OUT EFI_ABSOLUTE_POINTER_STATE *State\r | |
209 | );\r | |
210 | \r | |
211 | \r | |
212 | /**\r | |
213 | The EFI_ABSOLUTE_POINTER_PROTOCOL provides a set of services\r | |
214 | for a pointer device that can be used as an input device from an\r | |
215 | application written to this specification. The services include\r | |
216 | the ability to reset the pointer device, retrieve the state of\r | |
217 | the pointer device, and retrieve the capabilities of the pointer\r | |
218 | device. In addition certain data items describing the device are\r | |
219 | provided.\r | |
220 | \r | |
221 | \r | |
222 | @param Reset Resets the pointer device.\r | |
223 | \r | |
224 | @param GetState Retrieves the current state of the pointer\r | |
225 | device.\r | |
226 | \r | |
227 | @param WaitForInput Event to use with WaitForEvent() to wait\r | |
228 | for input from the pointer device.\r | |
229 | @param Mode Pointer to EFI_ABSOLUTE_POINTER_MODE data.\r | |
230 | \r | |
231 | **/\r | |
232 | struct _EFI_ABSOLUTE_POINTER_PROTOCOL {\r | |
233 | EFI_ABSOLUTE_POINTER_RESET Reset;\r | |
234 | EFI_ABSOLUTE_POINTER_GET_STATE GetState;\r | |
235 | EFI_EVENT WaitForInput;\r | |
236 | EFI_ABSOLUTE_POINTER_MODE *Mode;\r | |
237 | };\r | |
238 | \r | |
239 | \r | |
240 | extern EFI_GUID gEfiAbsolutePointerProtocolGuid;\r | |
241 | \r | |
242 | \r | |
243 | #endif\r | |
244 | \r |