Root/
Source at commit 2056 created 11 years 10 months ago. By cosmo1t, fixed indent and added X79 && 7 series http://forge.voodooprojects.org/p/chameleon/issues/284/ | |
---|---|
1 | /*␊ |
2 | * @APPLE_LICENSE_HEADER_START@␊ |
3 | * ␊ |
4 | * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.␊ |
5 | * ␊ |
6 | * This file contains Original Code and/or Modifications of Original Code␊ |
7 | * as defined in and that are subject to the Apple Public Source License␊ |
8 | * Version 2.0 (the 'License'). You may not use this file except in␊ |
9 | * compliance with the License. Please obtain a copy of the License at␊ |
10 | * http://www.opensource.apple.com/apsl/ and read it before using this␊ |
11 | * file.␊ |
12 | * ␊ |
13 | * The Original Code and all software distributed under the License are␊ |
14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.␊ |
18 | * Please see the License for the specific language governing rights and␊ |
19 | * limitations under the License.␊ |
20 | * ␊ |
21 | * @APPLE_LICENSE_HEADER_END@␊ |
22 | */␊ |
23 | /* ␉Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. ␊ |
24 | *␊ |
25 | * evsio.h - Get/Set parameter calls for Event Status Driver.␊ |
26 | *␊ |
27 | *␉CAUTION: Developers should stick to the API exported in␊ |
28 | *␉␉<drivers/event_status_driver.h> to guarantee␊ |
29 | *␉␉binary compatability of their applications in future␊ |
30 | *␉␉releases.␊ |
31 | *␊ |
32 | * HISTORY␊ |
33 | * 22 May 1992 Mike Paquette at NeXT␊ |
34 | * Created. ␊ |
35 | */␊ |
36 | #ifndef _DEV_EVSIO_H␊ |
37 | #define _DEV_EVSIO_H␊ |
38 | ␊ |
39 | /* Public type definitions. */␊ |
40 | #include <IOKit/hidsystem/IOHIDTypes.h>␊ |
41 | #include <IOKit/hidsystem/IOLLEvent.h>␊ |
42 | ␊ |
43 | /*␊ |
44 | * Identify this driver as one that uses the new driverkit and messaging API␊ |
45 | */␊ |
46 | #ifndef _NeXT_MACH_EVENT_DRIVER_␊ |
47 | #define _NeXT_MACH_EVENT_DRIVER_␉(1)␊ |
48 | #endif /* !_NeXT_MACH_EVENT_DRIVER_ */␊ |
49 | ␊ |
50 | /* * */␊ |
51 | ␊ |
52 | #define kIOHIDKindKey␉␉␉␉␉"HIDKind"␊ |
53 | #define kIOHIDInterfaceIDKey␉␉␉"HIDInterfaceID"␊ |
54 | #define kIOHIDSubinterfaceIDKey␉␉␉"HIDSubinterfaceID"␊ |
55 | ␊ |
56 | #define kIOHIDParametersKey␉␉␉␉"HIDParameters"␊ |
57 | ␊ |
58 | #define kIOHIDVirtualHIDevice "HIDVirtualDevice"␊ |
59 | ␊ |
60 | #define kIOHIDKeyRepeatKey␉␉␉␉"HIDKeyRepeat"␊ |
61 | #define kIOHIDInitialKeyRepeatKey␉␉"HIDInitialKeyRepeat"␊ |
62 | #define kIOHIDKeyMappingKey␉␉␉␉"HIDKeyMapping"␊ |
63 | #define kIOHIDResetKeyboardKey␉␉␉"HIDResetKeyboard"␊ |
64 | ␊ |
65 | #define kIOHIDKeyboardModifierMappingPairsKey "HIDKeyboardModifierMappingPairs"␊ |
66 | #define kIOHIDKeyboardModifierMappingSrcKey "HIDKeyboardModifierMappingSrc"␊ |
67 | #define kIOHIDKeyboardModifierMappingDstKey "HIDKeyboardModifierMappingDst"␊ |
68 | ␊ |
69 | #define kIOHIDKeyboardCapsLockDoesLockKey "HIDKeyboardCapsLockDoesLock"␊ |
70 | #define kIOHIDKeyboardSupportsF12EjectKey "HIDKeyboardSupportsF12Eject"␊ |
71 | #define kIOHIDKeyboardSupportedModifiersKey "HIDKeyboardSupportedModifiers"␊ |
72 | ␊ |
73 | #define kIOHIDPointerResolutionKey␉␉"HIDPointerResolution"␊ |
74 | #define kIOHIDResetPointerKey␉␉␉"HIDResetPointer"␊ |
75 | #define kIOHIDPointerConvertAbsoluteKey␉"HIDPointerConvertAbsolute"␊ |
76 | #define kIOHIDPointerContactToMoveKey␉"HIDPointerContactToMove"␊ |
77 | #define kIOHIDPointerPressureToClickKey␉"HIDPointerPressureToClick"␊ |
78 | #define kIOHIDPointerButtonMode␉␉␉"HIDPointerButtonMode"␊ |
79 | #define kIOHIDPointerButtonCountKey␉"HIDPointerButtonCount"␊ |
80 | ␊ |
81 | #define kIOHIDPointerAccelerationKey␉"HIDPointerAcceleration"␊ |
82 | #define kIOHIDPointerAccelerationSettingsKey␉"HIDPointerAccelerationSettings"␊ |
83 | #define kIOHIDPointerAccelerationTypeKey␉"HIDPointerAccelerationType"␊ |
84 | #define kIOHIDPointerAccelerationTableKey "HIDPointerAccelerationTable"␊ |
85 | ␊ |
86 | #define kIOHIDScrollResetKey␉␉␉"HIDScrollReset"␊ |
87 | #define kIOHIDScrollResolutionKey␉␉"HIDScrollResolution"␊ |
88 | #define kIOHIDScrollReportRateKey "HIDScrollReportRate"␊ |
89 | #define kIOHIDScrollAccelerationKey␉␉"HIDScrollAcceleration"␊ |
90 | #define kIOHIDScrollAccelerationTypeKey "HIDScrollAccelerationType"␊ |
91 | #define kIOHIDScrollAccelerationTableKey␉"HIDScrollAccelerationTable"␊ |
92 | ␊ |
93 | #define kIOHIDScrollResolutionXKey␉␉"HIDScrollResolutionX"␊ |
94 | #define kIOHIDScrollResolutionYKey␉␉"HIDScrollResolutionY"␊ |
95 | #define kIOHIDScrollResolutionZKey␉␉"HIDScrollResolutionZ"␊ |
96 | ␊ |
97 | #define kIOHIDScrollAccelerationTableXKey␉"HIDScrollAccelerationTableX"␊ |
98 | #define kIOHIDScrollAccelerationTableYKey␉"HIDScrollAccelerationTableY"␊ |
99 | #define kIOHIDScrollAccelerationTableZKey␉"HIDScrollAccelerationTableZ"␊ |
100 | ␊ |
101 | #define kIOHIDScrollMouseButtonKey "HIDScrollMouseButton"␊ |
102 | ␊ |
103 | #define kIOHIDScrollZoomModifierMaskKey "HIDScrollZoomModifierMask"␊ |
104 | ␊ |
105 | #define kIOHIDTrackpadScrollAccelerationKey "HIDTrackpadScrollAcceleration"␊ |
106 | #define kIOHIDMouseScrollAccelerationKey "HIDMouseScrollAcceleration"␊ |
107 | ␊ |
108 | #define kIOHIDTrackpadAccelerationType␉"HIDTrackpadAcceleration"␊ |
109 | #define kIOHIDMouseAccelerationType␉␉"HIDMouseAcceleration"␊ |
110 | ␊ |
111 | #define kIOHIDClickTimeKey␉␉␉␉"HIDClickTime"␊ |
112 | #define kIOHIDClickSpaceKey␉␉␉␉"HIDClickSpace"␊ |
113 | ␊ |
114 | #define kIOHIDWaitCursorFrameIntervalKey␉"HIDWaitCursorFrameInterval"␊ |
115 | ␊ |
116 | #define kIOHIDAutoDimThresholdKey␉␉"HIDAutoDimThreshold"␊ |
117 | #define kIOHIDAutoDimStateKey␉␉␉"HIDAutoDimState"␊ |
118 | #define kIOHIDAutoDimTimeKey␉␉␉"HIDAutoDimTime"␊ |
119 | #define kIOHIDIdleTimeKey␉␉␉␉"HIDIdleTime"␊ |
120 | ␊ |
121 | #define kIOHIDBrightnessKey␉␉␉␉"HIDBrightness"␊ |
122 | #define kIOHIDAutoDimBrightnessKey␉␉"HIDAutoDimBrightness"␊ |
123 | ␊ |
124 | #define kIOHIDFKeyModeKey␉␉␉"HIDFKeyMode"␊ |
125 | ␊ |
126 | // if kIOHIDStickyKeysDisabledKey is 1, then all sticky keys functionality␊ |
127 | // is completely turned off. Multiple shifts will have no effect.␊ |
128 | #define kIOHIDStickyKeysDisabledKey␉␉"HIDStickyKeysDisabled"␊ |
129 | ␊ |
130 | // if kIOHIDStickyKeysOnKey is 1 then a depressed modifier will stay down␊ |
131 | // until a non-modifer key is pressed (or sticky keys is turned off)␊ |
132 | #define kIOHIDStickyKeysOnKey␉␉␉"HIDStickyKeysOn"␊ |
133 | ␊ |
134 | // if kIOHIDStickyKeysShiftTogglesKey is 1, then a sequence of five␊ |
135 | // shift keys in sequence will toggle sticky keys on or off␊ |
136 | #define kIOHIDStickyKeysShiftTogglesKey␉"HIDStickyKeysShiftToggles"␊ |
137 | ␊ |
138 | // if kIOHIDMouseKeysOptionTogglesKey is 1, then a sequence of five␊ |
139 | // option keys in sequence will toggle mouse keys on or off␊ |
140 | #define kIOHIDMouseKeysOptionTogglesKey␉"HIDMouseKeysOptionToggles"␊ |
141 | ␊ |
142 | // kIOHIDSlowKeysDelayKey represents the delay used for slow keys.␊ |
143 | // if kIOHIDSlowKeysDelayKey is 0, then slow keys off␊ |
144 | #define kIOHIDSlowKeysDelayKey␉␉␉"HIDSlowKeysDelay"␊ |
145 | ␊ |
146 | #define kIOHIDF12EjectDelayKey␉␉␉"HIDF12EjectDelay"␊ |
147 | ␊ |
148 | #define kIOHIDMouseKeysOnKey␉␉␉"HIDMouseKeysOn"␊ |
149 | ␊ |
150 | #define kIOHIDUseKeyswitchKey "HIDUseKeyswitch"␊ |
151 | ␊ |
152 | #define kIOHIDDisallowRemappingOfPrimaryClickKey␉"HIDDisallowRemappingOfPrimaryClick"␊ |
153 | #define kIOHIDMouseKeysEnablesVirtualNumPadKey␉"HIDMouseKeysEnablesVirtualNumPad"␊ |
154 | ␊ |
155 | #define kIOHIDResetLEDsKey "HIDResetLEDs"␊ |
156 | ␊ |
157 | ␊ |
158 | #ifdef __ppc__␊ |
159 | // the following are misspelled keys present in the system␊ |
160 | // they are being kept around, but will eventually be deprecated␊ |
161 | #define kIOHIDSickyKeysDisabledKey␉␉kIOHIDStickyKeysDisabledKey␊ |
162 | #define kIOHIDSickyKeysOnKey␉␉␉kIOHIDStickyKeysOnKey␊ |
163 | #define kIOHIDSickyKeysShiftTogglesKey␉kIOHIDStickyKeysShiftTogglesKey␊ |
164 | #endif␊ |
165 | ␊ |
166 | // the following values are used in kIOHIDPointerButtonMode␊ |
167 | typedef enum {␊ |
168 | ␉kIOHIDButtonMode_BothLeftClicks = 0,␊ |
169 | ␉kIOHIDButtonMode_ReverseLeftRightClicks = 1,␊ |
170 | ␉kIOHIDButtonMode_EnableRightClick = 2␊ |
171 | } IOHIDButtonModes;␊ |
172 | ␊ |
173 | #ifdef _undef␊ |
174 | #define EVS_PREFIX␉"Evs_"␉/* All EVS calls start with this string */␊ |
175 | ␊ |
176 | /* WaitCursor-related ioctls */␊ |
177 | ␊ |
178 | #define EVSIOSWT "Evs_SetWaitThreshold"␊ |
179 | #define EVSIOSWT_SIZE␉EVS_PACKED_TIME_SIZE␊ |
180 | ␊ |
181 | #define EVSIOSWS "Evs_SetWaitSustain"␊ |
182 | #define EVSIOSWS_SIZE␉EVS_PACKED_TIME_SIZE␊ |
183 | ␊ |
184 | #define EVSIOSWFI "Evs_SetWaitFrameInterval"␊ |
185 | #define EVSIOSWFI_SIZE␉EVS_PACKED_TIME_SIZE␊ |
186 | ␊ |
187 | #define EVSIOCWINFO␉"Evs_CurrentWaitCursorInfo"␊ |
188 | #define EVSIOCWINFO_THRESH␉0␊ |
189 | #define EVSIOCWINFO_SUSTAIN␉(EVSIOCWINFO_THRESH + EVS_PACKED_TIME_SIZE)␊ |
190 | #define EVSIOCWINFO_FINTERVAL␉(EVSIOCWINFO_SUSTAIN + EVS_PACKED_TIME_SIZE)␊ |
191 | #define EVSIOCWINFO_SIZE␉(EVSIOCWINFO_FINTERVAL + EVS_PACKED_TIME_SIZE)␊ |
192 | #endif␊ |
193 | ␊ |
194 | #define EVS_PACKED_TIME_SIZE (sizeof(UInt64) / sizeof( unsigned int))␊ |
195 | ␊ |
196 | /* Device control ioctls. Levels specified may be in the range 0 - 64. */␊ |
197 | ␊ |
198 | #define EVSIOSB␉ ␉kIOHIDBrightnessKey␊ |
199 | #define EVSIOSB_SIZE␉1␊ |
200 | ␊ |
201 | #define EVSIOSADB ␉kIOHIDAutoDimBrightnessKey␊ |
202 | #define EVSIOSADB_SIZE␉1␊ |
203 | ␊ |
204 | #ifdef _undef␊ |
205 | #define EVSIOSA␉ "Evs_SetAttenuation"␊ |
206 | #define EVIOSA_SIZE␉1␊ |
207 | ␊ |
208 | #define EVSIO_DCTLINFO␉"Evs_DeviceControlInfo"␊ |
209 | typedef enum {␊ |
210 | ␉EVSIO_DCTLINFO_BRIGHT,␊ |
211 | ␉EVSIO_DCTLINFO_ATTEN,␊ |
212 | ␉EVSIO_DCTLINFO_AUTODIMBRIGHT␊ |
213 | } evsio_DCTLINFOIndices;␊ |
214 | #define EVSIO_DCTLINFO_SIZE␉(EVSIO_DCTLINFO_AUTODIMBRIGHT + 1)␊ |
215 | #endif␊ |
216 | ␊ |
217 | /*␊ |
218 | * Device status request␊ |
219 | */␊ |
220 | #define␉EVSIOINFO NX_EVS_DEVICE_INFO␊ |
221 | ␊ |
222 | ␊ |
223 | /* Keyboard-related ioctls - implemented within Event Sources */␊ |
224 | ␊ |
225 | #define EVSIOSKR ␉kIOHIDKeyRepeatKey␊ |
226 | #define EVSIOSKR_SIZE␉EVS_PACKED_TIME_SIZE␊ |
227 | ␊ |
228 | #define EVSIOSIKR ␉kIOHIDInitialKeyRepeatKey␊ |
229 | #define EVSIOSIKR_SIZE␉EVS_PACKED_TIME_SIZE␊ |
230 | ␊ |
231 | #define EVSIORKBD ␉kIOHIDResetKeyboardKey␊ |
232 | #define EVSIORKBD_SIZE␉1␊ |
233 | ␊ |
234 | #define EVSIOCKR_SIZE␉EVS_PACKED_TIME_SIZE␊ |
235 | ␊ |
236 | #define␉EVSIOCKML ␉kIOHIDKeyMappingKey␊ |
237 | #define EVSIOCKML_SIZE␉1␊ |
238 | ␊ |
239 | /* The following two tokens are for use with the get/set character routines. */␊ |
240 | #define EVSIOSKM ␉kIOHIDKeyMappingKey␊ |
241 | #define EVSIOSKM_SIZE␉4096␊ |
242 | ␊ |
243 | #define␉EVSIOCKM ␉kIOHIDKeyMappingKey␊ |
244 | #define EVSIOCKM_SIZE␉4096␊ |
245 | ␊ |
246 | /* Mouse-related ioctls - implemented within Event Sources */␊ |
247 | ␊ |
248 | #define␉EVSIOSMS ␉kIOHIDPointerAccelerationKey␊ |
249 | #define␉EVSIOSMS_SIZE␉␉(1)␊ |
250 | ␊ |
251 | #define␉EVSIOCMS ␉kIOHIDPointerAccelerationKey␊ |
252 | #define␉EVSIOCMS_SIZE␉␉(1)␊ |
253 | ␊ |
254 | #ifdef _undef␊ |
255 | #define EVSIOSMH "Evs_SetMouseHandedness"␊ |
256 | #define EVSIOSMH_SIZE␉1␉␉// value from NXMouseButton enum␊ |
257 | ␊ |
258 | #define EVSIOCMH "Evs_CurrentMouseHandedness"␊ |
259 | #define EVSIOCMH_SIZE␉1␊ |
260 | #endif␊ |
261 | ␊ |
262 | /* Generic pointer device controls, implemented by the Event Driver. */␊ |
263 | #define␉EVSIOSCT ␉kIOHIDClickTimeKey␊ |
264 | #define EVSIOSCT_SIZE␉EVS_PACKED_TIME_SIZE␊ |
265 | ␊ |
266 | #define␉EVSIOSCS ␉kIOHIDClickSpaceKey␊ |
267 | typedef enum {␊ |
268 | ␉EVSIOSCS_X,␊ |
269 | ␉EVSIOSCS_Y␊ |
270 | } evsioEVSIOSCSIndices;␊ |
271 | #define EVSIOSCS_SIZE␉(EVSIOSCS_Y + 1)␊ |
272 | ␊ |
273 | #define EVSIOSADT␉ kIOHIDAutoDimThresholdKey␊ |
274 | #define EVSIOSADT_SIZE␉EVS_PACKED_TIME_SIZE␊ |
275 | ␊ |
276 | #define EVSIOSADS ␉kIOHIDAutoDimStateKey␊ |
277 | #define EVSIOSADS_SIZE␉1␊ |
278 | ␊ |
279 | #define EVSIORMS ␉kIOHIDResetPointerKey␊ |
280 | #define EVSIORMS_SIZE␉1␊ |
281 | ␊ |
282 | #define␉EVSIOCCT ␉kIOHIDClickTimeKey␊ |
283 | #define EVSIOCCT_SIZE␉EVS_PACKED_TIME_SIZE␊ |
284 | ␊ |
285 | #define EVSIOCADT ␉kIOHIDAutoDimThresholdKey␊ |
286 | #define EVSIOCADT_SIZE␉EVS_PACKED_TIME_SIZE␊ |
287 | ␊ |
288 | #define EVSIOGDADT ␉kIOHIDAutoDimTimeKey␊ |
289 | #define EVSIOGDADT_SIZE␉EVS_PACKED_TIME_SIZE␊ |
290 | ␊ |
291 | #define EVSIOIDLE ␉kIOHIDIdleTimeKey␊ |
292 | #define EVSIOIDLE_SIZE␉EVS_PACKED_TIME_SIZE␊ |
293 | ␊ |
294 | #define␉EVSIOCCS ␉kIOHIDClickSpaceKey␊ |
295 | typedef enum {␊ |
296 | ␉EVSIOCCS_X,␊ |
297 | ␉EVSIOCCS_Y␊ |
298 | } evsioEVSIOCCSIndices;␊ |
299 | #define EVSIOCCS_SIZE␉(EVSIOCCS_Y + 1)␊ |
300 | ␊ |
301 | #define EVSIOCADS ␉kIOHIDAutoDimStateKey␊ |
302 | #define EVSIOCADS_SIZE␉1␊ |
303 | ␊ |
304 | enum {␊ |
305 | // Selectors for IOHIDGetModifierLockState and IOHIDSetModifierLockState␊ |
306 | kIOHIDCapsLockState = 0x00000001,␊ |
307 | kIOHIDNumLockState = 0x00000002,␊ |
308 | };␊ |
309 | ␊ |
310 | #endif /* !_DEV_EVSIO_H */␊ |
311 |