]> git.saurik.com Git - apple/xnu.git/blob - iokit/IOKit/hidsystem/IOHIDParameter.h
xnu-124.13.tar.gz
[apple/xnu.git] / iokit / IOKit / hidsystem / IOHIDParameter.h
1 /*
2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22 /* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved.
23 *
24 * evsio.h - Get/Set parameter calls for Event Status Driver.
25 *
26 * CAUTION: Developers should stick to the API exported in
27 * <drivers/event_status_driver.h> to guarantee
28 * binary compatability of their applications in future
29 * releases.
30 *
31 * HISTORY
32 * 22 May 1992 Mike Paquette at NeXT
33 * Created.
34 */
35 #ifndef _DEV_EVSIO_H
36 #define _DEV_EVSIO_H
37
38 /* Public type definitions. */
39 #include <IOKit/hidsystem/IOHIDTypes.h>
40 #include <IOKit/hidsystem/IOLLEvent.h>
41
42 /*
43 * Identify this driver as one that uses the new driverkit and messaging API
44 */
45 #ifndef _NeXT_MACH_EVENT_DRIVER_
46 #define _NeXT_MACH_EVENT_DRIVER_ (1)
47 #endif /* !_NeXT_MACH_EVENT_DRIVER_ */
48
49 /* * */
50
51 #define kIOHIDKindKey "HIDKind"
52 #define kIOHIDInterfaceIDKey "HIDInterfaceID"
53 #define kIOHIDSubinterfaceIDKey "HIDSubinterfaceID"
54
55 #define kIOHIDKeyRepeatKey "HIDKeyRepeat"
56 #define kIOHIDInitialKeyRepeatKey "HIDInitialKeyRepeat"
57 #define kIOHIDKeyMappingKey "HIDKeyMapping"
58 #define kIOHIDResetKeyboardKey "HIDResetKeyboard"
59
60 #define kIOHIDPointerResolutionKey "HIDPointerResolution"
61 #define kIOHIDPointerAccelerationKey "HIDPointerAcceleration"
62 #define kIOHIDResetPointerKey "HIDResetPointer"
63 #define kIOHIDPointerConvertAbsoluteKey "HIDPointerConvertAbsolute"
64 #define kIOHIDPointerContactToMoveKey "HIDPointerContactToMove"
65 #define kIOHIDPointerPressureToClickKey "HIDPointerPressureToClick"
66
67 #define kIOHIDClickTimeKey "HIDClickTime"
68 #define kIOHIDClickSpaceKey "HIDClickSpace"
69
70 #define kIOHIDAutoDimThresholdKey "HIDAutoDimThreshold"
71 #define kIOHIDAutoDimStateKey "HIDAutoDimState"
72 #define kIOHIDAutoDimTimeKey "HIDAutoDimTime"
73 #define kIOHIDIdleTimeKey "HIDIdleTime"
74
75 #define kIOHIDBrightnessKey "HIDBrightness"
76 #define kIOHIDAutoDimBrightnessKey "HIDAutoDimBrightness"
77
78 #ifdef _undef
79 #define EVS_PREFIX "Evs_" /* All EVS calls start with this string */
80
81 /* WaitCursor-related ioctls */
82
83 #define EVSIOSWT "Evs_SetWaitThreshold"
84 #define EVSIOSWT_SIZE EVS_PACKED_TIME_SIZE
85
86 #define EVSIOSWS "Evs_SetWaitSustain"
87 #define EVSIOSWS_SIZE EVS_PACKED_TIME_SIZE
88
89 #define EVSIOSWFI "Evs_SetWaitFrameInterval"
90 #define EVSIOSWFI_SIZE EVS_PACKED_TIME_SIZE
91
92 #define EVSIOCWINFO "Evs_CurrentWaitCursorInfo"
93 #define EVSIOCWINFO_THRESH 0
94 #define EVSIOCWINFO_SUSTAIN (EVSIOCWINFO_THRESH + EVS_PACKED_TIME_SIZE)
95 #define EVSIOCWINFO_FINTERVAL (EVSIOCWINFO_SUSTAIN + EVS_PACKED_TIME_SIZE)
96 #define EVSIOCWINFO_SIZE (EVSIOCWINFO_FINTERVAL + EVS_PACKED_TIME_SIZE)
97 #endif
98
99 #define EVS_PACKED_TIME_SIZE (sizeof(UInt64) / sizeof( unsigned int))
100
101 /* Device control ioctls. Levels specified may be in the range 0 - 64. */
102
103 #define EVSIOSB kIOHIDBrightnessKey
104 #define EVSIOSB_SIZE 1
105
106 #define EVSIOSADB kIOHIDAutoDimBrightnessKey
107 #define EVSIOSADB_SIZE 1
108
109 #ifdef _undef
110 #define EVSIOSA "Evs_SetAttenuation"
111 #define EVIOSA_SIZE 1
112
113 #define EVSIO_DCTLINFO "Evs_DeviceControlInfo"
114 typedef enum {
115 EVSIO_DCTLINFO_BRIGHT,
116 EVSIO_DCTLINFO_ATTEN,
117 EVSIO_DCTLINFO_AUTODIMBRIGHT
118 } evsio_DCTLINFOIndices;
119 #define EVSIO_DCTLINFO_SIZE (EVSIO_DCTLINFO_AUTODIMBRIGHT + 1)
120 #endif
121
122 /*
123 * Device status request
124 */
125 #define EVSIOINFO NX_EVS_DEVICE_INFO
126
127
128 /* Keyboard-related ioctls - implemented within Event Sources */
129
130 #define EVSIOSKR kIOHIDKeyRepeatKey
131 #define EVSIOSKR_SIZE EVS_PACKED_TIME_SIZE
132
133 #define EVSIOSIKR kIOHIDInitialKeyRepeatKey
134 #define EVSIOSIKR_SIZE EVS_PACKED_TIME_SIZE
135
136 #define EVSIORKBD kIOHIDResetKeyboardKey
137 #define EVSIORKBD_SIZE 1
138
139 #define EVSIOCKR_SIZE EVS_PACKED_TIME_SIZE
140
141 #define EVSIOCKML kIOHIDKeyMappingKey
142 #define EVSIOCKML_SIZE 1
143
144 /* The following two tokens are for use with the get/set character routines. */
145 #define EVSIOSKM kIOHIDKeyMappingKey
146 #define EVSIOSKM_SIZE 4096
147
148 #define EVSIOCKM kIOHIDKeyMappingKey
149 #define EVSIOCKM_SIZE 4096
150
151 /* Mouse-related ioctls - implemented within Event Sources */
152
153 #define EVSIOSMS kIOHIDPointerAccelerationKey
154 #define EVSIOSMS_SIZE (1)
155
156 #define EVSIOCMS kIOHIDPointerAccelerationKey
157 #define EVSIOCMS_SIZE (1)
158
159 #ifdef _undef
160 #define EVSIOSMH "Evs_SetMouseHandedness"
161 #define EVSIOSMH_SIZE 1 // value from NXMouseButton enum
162
163 #define EVSIOCMH "Evs_CurrentMouseHandedness"
164 #define EVSIOCMH_SIZE 1
165 #endif
166
167 /* Generic pointer device controls, implemented by the Event Driver. */
168 #define EVSIOSCT kIOHIDClickTimeKey
169 #define EVSIOSCT_SIZE EVS_PACKED_TIME_SIZE
170
171 #define EVSIOSCS kIOHIDClickSpaceKey
172 typedef enum {
173 EVSIOSCS_X,
174 EVSIOSCS_Y
175 } evsioEVSIOSCSIndices;
176 #define EVSIOSCS_SIZE (EVSIOSCS_Y + 1)
177
178 #define EVSIOSADT kIOHIDAutoDimThresholdKey
179 #define EVSIOSADT_SIZE EVS_PACKED_TIME_SIZE
180
181 #define EVSIOSADS kIOHIDAutoDimStateKey
182 #define EVSIOSADS_SIZE 1
183
184 #define EVSIORMS kIOHIDResetPointerKey
185 #define EVSIORMS_SIZE 1
186
187 #define EVSIOCCT kIOHIDClickTimeKey
188 #define EVSIOCCT_SIZE EVS_PACKED_TIME_SIZE
189
190 #define EVSIOCADT kIOHIDAutoDimThresholdKey
191 #define EVSIOCADT_SIZE EVS_PACKED_TIME_SIZE
192
193 #define EVSIOGDADT kIOHIDAutoDimTimeKey
194 #define EVSIOGDADT_SIZE EVS_PACKED_TIME_SIZE
195
196 #define EVSIOIDLE kIOHIDIdleTimeKey
197 #define EVSIOIDLE_SIZE EVS_PACKED_TIME_SIZE
198
199 #define EVSIOCCS kIOHIDClickSpaceKey
200 typedef enum {
201 EVSIOCCS_X,
202 EVSIOCCS_Y
203 } evsioEVSIOCCSIndices;
204 #define EVSIOCCS_SIZE (EVSIOCCS_Y + 1)
205
206 #define EVSIOCADS kIOHIDAutoDimStateKey
207 #define EVSIOCADS_SIZE 1
208
209 #endif /* !_DEV_EVSIO_H */