Root/
Source at commit 1902 created 12 years 4 months ago. By ifabio, Package: - Added fa.po: Farsi Language (44% Completed) - Update ro.po: Russian Language (93% Completed) | |
---|---|
1 | /*␊ |
2 | *␊ |
3 | * @APPLE_LICENSE_HEADER_START@␊ |
4 | * ␊ |
5 | * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.␊ |
6 | * ␊ |
7 | * This file contains Original Code and/or Modifications of Original Code␊ |
8 | * as defined in and that are subject to the Apple Public Source License␊ |
9 | * Version 2.0 (the 'License'). You may not use this file except in␊ |
10 | * compliance with the License. Please obtain a copy of the License at␊ |
11 | * http://www.opensource.apple.com/apsl/ and read it before using this␊ |
12 | * file.␊ |
13 | * ␊ |
14 | * The Original Code and all software distributed under the License are␊ |
15 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
16 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
17 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
18 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.␊ |
19 | * Please see the License for the specific language governing rights and␊ |
20 | * limitations under the License.␊ |
21 | * ␊ |
22 | * @APPLE_LICENSE_HEADER_END@␊ |
23 | */␊ |
24 | ␊ |
25 | #ifndef _IOKIT_HID_IOHIDKEYS_H_␊ |
26 | #define _IOKIT_HID_IOHIDKEYS_H_␊ |
27 | ␊ |
28 | #include <sys/cdefs.h>␊ |
29 | #include <IOKit/hidsystem/IOHIDParameter.h>␊ |
30 | ␊ |
31 | __BEGIN_DECLS␊ |
32 | ␊ |
33 | /* The following keys are used to search the IORegistry for HID related services␊ |
34 | */␊ |
35 | ␊ |
36 | /* This is used to find HID Devices in the IORegistry */␊ |
37 | #define kIOHIDDeviceKey "IOHIDDevice"␊ |
38 | ␊ |
39 | /*!␊ |
40 | @defined HID Device Property Keys␊ |
41 | @abstract Keys that represent properties of a paticular device.␊ |
42 | @discussion Keys that represent properties of a paticular device. Can be added␊ |
43 | to your matching dictionary when refining searches for HID devices.␊ |
44 | <br><br>␊ |
45 | <b>Please note:</b><br>␊ |
46 | kIOHIDPrimaryUsageKey and kIOHIDPrimaryUsagePageKey are no longer ␊ |
47 | rich enough to describe a device's capabilities. Take, for example, a␊ |
48 | device that describes both a keyboard and a mouse in the same descriptor. ␊ |
49 | The previous behavior was to only describe the keyboard behavior with the ␊ |
50 | primary usage and usage page. Needless to say, this would sometimes cause ␊ |
51 | a program interested in mice to skip this device when matching. ␊ |
52 | <br>␊ |
53 | Thus we have added 3 ␊ |
54 | additional keys:␊ |
55 | <ul>␊ |
56 | <li>kIOHIDDeviceUsageKey</li>␊ |
57 | <li>kIOHIDDeviceUsagePageKey</li>␊ |
58 | <li>kIOHIDDeviceUsagePairsKey</li>␊ |
59 | </ul>␊ |
60 | kIOHIDDeviceUsagePairsKey is used to represent an array of dictionaries containing ␊ |
61 | key/value pairs referenced by kIOHIDDeviceUsageKey and kIOHIDDeviceUsagePageKey. ␊ |
62 | These usage pairs describe all application type collections (behaviors) defined ␊ |
63 | by the device.␊ |
64 | <br><br>␊ |
65 | An application intersted in only matching on one criteria would only add the ␊ |
66 | kIOHIDDeviceUsageKey and kIOHIDDeviceUsagePageKey keys to the matching dictionary.␊ |
67 | If it is interested in a device that has multiple behaviors, the application would␊ |
68 | instead add an array or dictionaries referenced by kIOHIDDeviceUsagePairsKey to his ␊ |
69 | matching dictionary.␊ |
70 | */␊ |
71 | #define kIOHIDTransportKey "Transport"␊ |
72 | #define kIOHIDVendorIDKey "VendorID"␊ |
73 | #define kIOHIDVendorIDSourceKey "VendorIDSource"␊ |
74 | #define kIOHIDProductIDKey "ProductID"␊ |
75 | #define kIOHIDVersionNumberKey "VersionNumber"␊ |
76 | #define kIOHIDManufacturerKey "Manufacturer"␊ |
77 | #define kIOHIDProductKey "Product"␊ |
78 | #define kIOHIDSerialNumberKey "SerialNumber"␊ |
79 | #define kIOHIDCountryCodeKey "CountryCode"␊ |
80 | #define kIOHIDStandardTypeKey "StandardType"␊ |
81 | #define kIOHIDLocationIDKey "LocationID"␊ |
82 | #define kIOHIDDeviceUsageKey "DeviceUsage"␊ |
83 | #define kIOHIDDeviceUsagePageKey "DeviceUsagePage"␊ |
84 | #define kIOHIDDeviceUsagePairsKey "DeviceUsagePairs"␊ |
85 | #define kIOHIDPrimaryUsageKey "PrimaryUsage"␊ |
86 | #define kIOHIDPrimaryUsagePageKey "PrimaryUsagePage"␊ |
87 | #define kIOHIDMaxInputReportSizeKey "MaxInputReportSize"␊ |
88 | #define kIOHIDMaxOutputReportSizeKey␉ "MaxOutputReportSize"␊ |
89 | #define kIOHIDMaxFeatureReportSizeKey␉ "MaxFeatureReportSize"␊ |
90 | #define kIOHIDReportIntervalKey "ReportInterval"␊ |
91 | #define kIOHIDReportDescriptorKey "ReportDescriptor"␊ |
92 | ␊ |
93 | /*!␊ |
94 | @define kIOHIDElementKey␊ |
95 | @abstract Keys that represents an element property.␊ |
96 | @discussion Property for a HID Device or element dictionary.␊ |
97 | Elements can be heirarchical, so they can contain other elements.␊ |
98 | */␊ |
99 | #define kIOHIDElementKey "Elements"␊ |
100 | ␊ |
101 | /*!␊ |
102 | @defined HID Element Dictionary Keys␊ |
103 | @abstract Keys that represent properties of a particular elements.␊ |
104 | @discussion These keys can also be added to a matching dictionary ␊ |
105 | when searching for elements via copyMatchingElements. ␊ |
106 | */␊ |
107 | #define kIOHIDElementCookieKey "ElementCookie"␊ |
108 | #define kIOHIDElementTypeKey "Type"␊ |
109 | #define kIOHIDElementCollectionTypeKey "CollectionType"␊ |
110 | #define kIOHIDElementUsageKey "Usage"␊ |
111 | #define kIOHIDElementUsagePageKey "UsagePage"␊ |
112 | #define kIOHIDElementMinKey "Min"␊ |
113 | #define kIOHIDElementMaxKey "Max"␊ |
114 | #define kIOHIDElementScaledMinKey "ScaledMin"␊ |
115 | #define kIOHIDElementScaledMaxKey "ScaledMax"␊ |
116 | #define kIOHIDElementSizeKey "Size"␊ |
117 | #define kIOHIDElementReportSizeKey "ReportSize"␊ |
118 | #define kIOHIDElementReportCountKey "ReportCount"␊ |
119 | #define kIOHIDElementReportIDKey "ReportID"␊ |
120 | #define kIOHIDElementIsArrayKey "IsArray"␊ |
121 | #define kIOHIDElementIsRelativeKey "IsRelative"␊ |
122 | #define kIOHIDElementIsWrappingKey "IsWrapping"␊ |
123 | #define kIOHIDElementIsNonLinearKey "IsNonLinear"␊ |
124 | #define kIOHIDElementHasPreferredStateKey "HasPreferredState"␊ |
125 | #define kIOHIDElementHasNullStateKey "HasNullState"␊ |
126 | #define kIOHIDElementFlagsKey "Flags"␊ |
127 | #define kIOHIDElementUnitKey "Unit"␊ |
128 | #define kIOHIDElementUnitExponentKey "UnitExponent"␊ |
129 | #define kIOHIDElementNameKey "Name"␊ |
130 | #define kIOHIDElementValueLocationKey "ValueLocation"␊ |
131 | #define kIOHIDElementDuplicateIndexKey "DuplicateIndex"␊ |
132 | #define kIOHIDElementParentCollectionKey "ParentCollection"␊ |
133 | ␊ |
134 | #ifndef __ppc__␊ |
135 | #define kIOHIDElementVendorSpecificKey "VendorSpecific"␊ |
136 | #else␊ |
137 | #define kIOHIDElementVendorSpecificKey "VendorSpecifc"␊ |
138 | #endif␊ |
139 | ␊ |
140 | /*!␊ |
141 | @defined HID Element Match Keys␊ |
142 | @abstract Keys used for matching particular elements.␊ |
143 | @discussion These keys should only be used with a matching ␊ |
144 | dictionary when searching for elements via copyMatchingElements. ␊ |
145 | */␊ |
146 | #define kIOHIDElementCookieMinKey "ElementCookieMin"␊ |
147 | #define kIOHIDElementCookieMaxKey "ElementCookieMax"␊ |
148 | #define kIOHIDElementUsageMinKey "UsageMin"␊ |
149 | #define kIOHIDElementUsageMaxKey "UsageMax"␊ |
150 | ␊ |
151 | /*!␊ |
152 | @defined kIOHIDElementCalibrationMinKey␊ |
153 | @abstract The minimum bounds for a calibrated value. ␊ |
154 | */␊ |
155 | #define kIOHIDElementCalibrationMinKey "CalibrationMin"␊ |
156 | ␊ |
157 | /*!␊ |
158 | @defined kIOHIDElementCalibrationMaxKey␊ |
159 | @abstract The maximum bounds for a calibrated value. ␊ |
160 | */␊ |
161 | #define kIOHIDElementCalibrationMaxKey "CalibrationMax"␊ |
162 | ␊ |
163 | /*!␊ |
164 | @defined kIOHIDElementCalibrationSaturationMinKey␊ |
165 | @abstract The mininum tolerance to be used when calibrating a logical element value. ␊ |
166 | @discussion The saturation property is used to allow for slight differences in the minimum and maximum value returned by an element. ␊ |
167 | */␊ |
168 | #define kIOHIDElementCalibrationSaturationMinKey "CalibrationSaturationMin"␊ |
169 | ␊ |
170 | /*!␊ |
171 | @defined kIOHIDElementCalibrationSaturationMaxKey␊ |
172 | @abstract The maximum tolerance to be used when calibrating a logical element value. ␊ |
173 | @discussion The saturation property is used to allow for slight differences in the minimum and maximum value returned by an element. ␊ |
174 | */␊ |
175 | #define kIOHIDElementCalibrationSaturationMaxKey "CalibrationSaturationMax"␊ |
176 | ␊ |
177 | /*!␊ |
178 | @defined kIOHIDElementCalibrationDeadZoneMinKey␊ |
179 | @abstract The minimum bounds near the midpoint of a logical value in which the value is ignored. ␊ |
180 | @discussion The dead zone property is used to allow for slight differences in the idle value returned by an element. ␊ |
181 | */␊ |
182 | #define kIOHIDElementCalibrationDeadZoneMinKey "CalibrationDeadZoneMin"␊ |
183 | ␊ |
184 | /*!␊ |
185 | @defined kIOHIDElementCalibrationDeadZoneMinKey␊ |
186 | @abstract The maximum bounds near the midpoint of a logical value in which the value is ignored. ␊ |
187 | @discussion The dead zone property is used to allow for slight differences in the idle value returned by an element. ␊ |
188 | */␊ |
189 | #define kIOHIDElementCalibrationDeadZoneMaxKey "CalibrationDeadZoneMax"␊ |
190 | ␊ |
191 | /*!␊ |
192 | @defined kIOHIDElementCalibrationGranularityKey␊ |
193 | @abstract The scale or level of detail returned in a calibrated element value. ␊ |
194 | @discussion Values are rounded off such that if granularity=0.1, values after calibration are 0, 0.1, 0.2, 0.3, etc.␊ |
195 | */␊ |
196 | #define kIOHIDElementCalibrationGranularityKey "CalibrationGranularity"␊ |
197 | ␊ |
198 | /*!␊ |
199 | @typedef IOHIDElementCookie␊ |
200 | @abstract Abstract data type used as a unique identifier for an element.␊ |
201 | */␊ |
202 | #ifdef __LP64__␊ |
203 | typedef uint32_t IOHIDElementCookie;␊ |
204 | #else␊ |
205 | typedef void * IOHIDElementCookie;␊ |
206 | #endif␊ |
207 | ␊ |
208 | /*!␊ |
209 | @typedef IOHIDElementType␊ |
210 | @abstract Describes different types of HID elements.␊ |
211 | @discussion Used by the IOHIDFamily to identify the type of␊ |
212 | element processed. Represented by the key kIOHIDElementTypeKey in the ␊ |
213 | dictionary describing the element.␊ |
214 | @constant kIOHIDElementTypeInput_Misc␊ |
215 | Misc input data field or varying size.␊ |
216 | @constant kIOHIDElementTypeInput_Button ␊ |
217 | One bit input data field.␊ |
218 | @constant kIOHIDElementTypeInput_Axis ␊ |
219 | Input data field used to represent an axis.␊ |
220 | @constant kIOHIDElementTypeInput_ScanCodes␊ |
221 | Input data field used to represent a scan code or usage selector.␊ |
222 | @constant kIOHIDElementTypeOutput␊ |
223 | Used to represent an output data field in a report.␊ |
224 | @constant kIOHIDElementTypeFeature␊ |
225 | Describes input and output elements not intended for ␊ |
226 | consumption by the end user.␊ |
227 | @constant kIOHIDElementTypeCollection␊ |
228 | Element used to identify a relationship between two or more elements.␊ |
229 | */␊ |
230 | enum IOHIDElementType {␊ |
231 | ␉kIOHIDElementTypeInput_Misc = 1,␊ |
232 | ␉kIOHIDElementTypeInput_Button = 2,␊ |
233 | ␉kIOHIDElementTypeInput_Axis = 3,␊ |
234 | ␉kIOHIDElementTypeInput_ScanCodes = 4,␊ |
235 | ␉kIOHIDElementTypeOutput = 129,␊ |
236 | ␉kIOHIDElementTypeFeature = 257,␊ |
237 | ␉kIOHIDElementTypeCollection = 513␊ |
238 | };␊ |
239 | typedef enum IOHIDElementType IOHIDElementType;␊ |
240 | ␊ |
241 | /*!␊ |
242 | @typedef IOHIDElementCollectionType␊ |
243 | @abstract Describes different types of HID collections.␊ |
244 | @discussion Collections identify a relationship between two or more␊ |
245 | elements.␊ |
246 | @constant kIOHIDElementCollectionTypePhysical ␊ |
247 | Used for a set of data items that represent data points ␊ |
248 | collected at one geometric point.␊ |
249 | @constant kIOHIDElementCollectionTypeApplication ␊ |
250 | Identifies item groups serving different purposes in a single device.␊ |
251 | @constant kIOHIDElementCollectionTypeLogical␊ |
252 | Used when a set of data items form a composite data structure.␊ |
253 | @constant kIOHIDElementCollectionTypeReport ␊ |
254 | Wraps all the fields in a report.␊ |
255 | @constant kIOHIDElementCollectionTypeNamedArray ␊ |
256 | Contains an array of selector usages.␊ |
257 | @constant kIOHIDElementCollectionTypeUsageSwitch ␊ |
258 | Modifies the meaning of the usage it contains.␊ |
259 | @constant kIOHIDElementCollectionTypeUsageModifier ␊ |
260 | Modifies the meaning of the usage attached to the encompassing collection.␊ |
261 | */␊ |
262 | enum IOHIDElementCollectionType{␊ |
263 | ␉kIOHIDElementCollectionTypePhysical␉= 0x00,␊ |
264 | ␉kIOHIDElementCollectionTypeApplication,␊ |
265 | kIOHIDElementCollectionTypeLogical,␊ |
266 | kIOHIDElementCollectionTypeReport,␊ |
267 | kIOHIDElementCollectionTypeNamedArray,␊ |
268 | kIOHIDElementCollectionTypeUsageSwitch,␊ |
269 | kIOHIDElementCollectionTypeUsageModifier␊ |
270 | };␊ |
271 | typedef enum IOHIDElementCollectionType IOHIDElementCollectionType;␊ |
272 | ␊ |
273 | ␊ |
274 | /*!␊ |
275 | @typedef IOHIDReportType␊ |
276 | @abstract Describes different type of HID reports.␊ |
277 | @discussion Used by the IOHIDFamily to identify the type of␊ |
278 | report being processed.␊ |
279 | @constant kIOHIDReportTypeInput Input report.␊ |
280 | @constant kIOHIDReportTypeOutput Output report.␊ |
281 | @constant kIOHIDReportTypeFeature Feature report.␊ |
282 | */␊ |
283 | enum IOHIDReportType{␊ |
284 | kIOHIDReportTypeInput = 0,␊ |
285 | kIOHIDReportTypeOutput,␊ |
286 | kIOHIDReportTypeFeature,␊ |
287 | kIOHIDReportTypeCount␊ |
288 | };␊ |
289 | typedef enum IOHIDReportType IOHIDReportType;␊ |
290 | ␊ |
291 | /*!␊ |
292 | @typedef IOHIDOptionsType␊ |
293 | @abstract Options for opening a device via IOHIDLib.␊ |
294 | @constant kIOHIDOptionsTypeNone Default option.␊ |
295 | @constant kIOHIDOptionsTypeSeizeDevice Used to open exclusive␊ |
296 | communication with the device. This will prevent the system␊ |
297 | and other clients from receiving events from the device.␊ |
298 | */␊ |
299 | enum {␊ |
300 | kIOHIDOptionsTypeNone␉ = 0x00,␊ |
301 | kIOHIDOptionsTypeSeizeDevice = 0x01␊ |
302 | };␊ |
303 | typedef uint32_t IOHIDOptionsType;␊ |
304 | ␊ |
305 | ␊ |
306 | /*!␊ |
307 | @typedef IOHIDQueueOptionsType␊ |
308 | @abstract Options for creating a queue via IOHIDLib.␊ |
309 | @constant kIOHIDQueueOptionsTypeNone Default option.␊ |
310 | @constant kIOHIDQueueOptionsTypeEnqueueAll Force the IOHIDQueue␊ |
311 | to enqueue all events, relative or absolute, regardless of change.␊ |
312 | */␊ |
313 | enum {␊ |
314 | kIOHIDQueueOptionsTypeNone␉ = 0x00,␊ |
315 | kIOHIDQueueOptionsTypeEnqueueAll = 0x01␊ |
316 | };␊ |
317 | typedef uint32_t IOHIDQueueOptionsType;␊ |
318 | ␊ |
319 | ␊ |
320 | enum {␊ |
321 | kIOHIDElementFlagsConstantMask = 0x0001,␊ |
322 | kIOHIDElementFlagsVariableMask = 0x0002,␊ |
323 | kIOHIDElementFlagsRelativeMask = 0x0004,␊ |
324 | kIOHIDElementFlagsWrapMask = 0x0008,␊ |
325 | kIOHIDElementFlagsNonLinearMask = 0x0010,␊ |
326 | kIOHIDElementFlagsNoPreferredMask = 0x0020,␊ |
327 | kIOHIDElementFlagsNullStateMask = 0x0040,␊ |
328 | kIOHIDElementFlagsVolativeMask = 0x0080,␊ |
329 | kIOHIDElementFlagsBufferedByteMask = 0x0100␊ |
330 | };␊ |
331 | typedef uint32_t IOHIDElementFlags;␊ |
332 | ␊ |
333 | /*!␊ |
334 | @typedef IOHIDStandardType␊ |
335 | @abstract Type to define what industrial standard the device is referencing.␊ |
336 | @constant kIOHIDStandardTypeANSI ANSI.␊ |
337 | @constant kIOHIDStandardTypeISO ISO.␊ |
338 | @constant kIOHIDStandardTypeJIS JIS.␊ |
339 | */␊ |
340 | enum {␊ |
341 | kIOHIDStandardTypeANSI = 0,␊ |
342 | kIOHIDStandardTypeISO = 1,␊ |
343 | kIOHIDStandardTypeJIS = 2␊ |
344 | };␊ |
345 | typedef uint32_t IOHIDStandardType;␊ |
346 | ␊ |
347 | __END_DECLS␊ |
348 | ␊ |
349 | #endif /* !_IOKIT_HID_IOHIDKEYS_H_ */␊ |
350 |