]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | The file provides services that allow information about an\r | |
3 | absolute pointer device to be retrieved.\r | |
4 | \r | |
5 | Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r | |
6 | 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 | |
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 | **/\r | |
37 | typedef struct {\r | |
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 | |
50 | } EFI_ABSOLUTE_POINTER_MODE;\r | |
51 | \r | |
52 | ///\r | |
53 | /// If set, indicates this device supports an alternate button input. \r | |
54 | /// \r | |
55 | #define EFI_ABSP_SupportsAltActive 0x00000001\r | |
56 | \r | |
57 | ///\r | |
58 | /// If set, indicates this device returns pressure data in parameter CurrentZ.\r | |
59 | /// \r | |
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 | |
74 | @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL\r | |
75 | instance.\r | |
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 | |
82 | @retval EFI_SUCCESS The device was reset.\r | |
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 | |
88 | typedef\r | |
89 | EFI_STATUS\r | |
90 | (EFIAPI *EFI_ABSOLUTE_POINTER_RESET)(\r | |
91 | IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,\r | |
92 | IN BOOLEAN ExtendedVerification\r | |
93 | );\r | |
94 | \r | |
95 | ///\r | |
96 | /// This bit is set if the touch sensor is active.\r | |
97 | ///\r | |
98 | #define EFI_ABSP_TouchActive 0x00000001 \r | |
99 | \r | |
100 | ///\r | |
101 | /// This bit is set if the alt sensor, such as pen-side button, is active\r | |
102 | /// \r | |
103 | #define EFI_ABS_AltActive 0x00000002\r | |
104 | \r | |
105 | \r | |
106 | /**\r | |
107 | Definition of EFI_ABSOLUTE_POINTER_STATE.\r | |
108 | **/\r | |
109 | typedef struct {\r | |
110 | ///\r | |
111 | /// The unsigned position of the activation on the x axis. If the AboluteMinX \r | |
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 | |
116 | UINT64 CurrentX;\r | |
117 | \r | |
118 | ///\r | |
119 | /// The unsigned position of the activation on the y axis. If the AboluteMinY \r | |
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 | |
124 | UINT64 CurrentY;\r | |
125 | \r | |
126 | ///\r | |
127 | /// The unsigned position of the activation on the z axis, or the pressure \r | |
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 | |
132 | UINT64 CurrentZ;\r | |
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 | |
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 | |
154 | @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL\r | |
155 | instance.\r | |
156 | \r | |
157 | @param State A pointer to the state information on the\r | |
158 | pointer device.\r | |
159 | \r | |
160 | @retval EFI_SUCCESS The state of the pointer device was\r | |
161 | returned in State.\r | |
162 | \r | |
163 | @retval EFI_NOT_READY The state of the pointer device has not\r | |
164 | changed since the last call to GetState().\r | |
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 | |
171 | typedef\r | |
172 | EFI_STATUS\r | |
173 | (EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE)(\r | |
174 | IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,\r | |
175 | IN OUT EFI_ABSOLUTE_POINTER_STATE *State\r | |
176 | );\r | |
177 | \r | |
178 | \r | |
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 | |
183 | /// the ability to: reset the pointer device, retrieve the state of\r | |
184 | /// the pointer device, and retrieve the capabilities of the pointer\r | |
185 | /// device. The service also provides certain data items describing the device.\r | |
186 | ///\r | |
187 | struct _EFI_ABSOLUTE_POINTER_PROTOCOL {\r | |
188 | EFI_ABSOLUTE_POINTER_RESET Reset;\r | |
189 | EFI_ABSOLUTE_POINTER_GET_STATE GetState;\r | |
190 | ///\r | |
191 | /// Event to use with WaitForEvent() to wait for input from the pointer device. \r | |
192 | ///\r | |
193 | EFI_EVENT WaitForInput;\r | |
194 | ///\r | |
195 | /// Pointer to EFI_ABSOLUTE_POINTER_MODE data.\r | |
196 | ///\r | |
197 | EFI_ABSOLUTE_POINTER_MODE *Mode;\r | |
198 | };\r | |
199 | \r | |
200 | \r | |
201 | extern EFI_GUID gEfiAbsolutePointerProtocolGuid;\r | |
202 | \r | |
203 | \r | |
204 | #endif\r | |
205 | \r |