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