2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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.
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
20 * @APPLE_LICENSE_HEADER_END@
22 /* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved.
24 * evsio.h - Get/Set parameter calls for Event Status Driver.
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
32 * 22 May 1992 Mike Paquette at NeXT
38 /* Public type definitions. */
39 #include <IOKit/hidsystem/IOHIDTypes.h>
40 #include <IOKit/hidsystem/IOLLEvent.h>
43 * Identify this driver as one that uses the new driverkit and messaging API
45 #ifndef _NeXT_MACH_EVENT_DRIVER_
46 #define _NeXT_MACH_EVENT_DRIVER_ (1)
47 #endif /* !_NeXT_MACH_EVENT_DRIVER_ */
51 #define kIOHIDKindKey "HIDKind"
52 #define kIOHIDInterfaceIDKey "HIDInterfaceID"
53 #define kIOHIDSubinterfaceIDKey "HIDSubinterfaceID"
55 #define kIOHIDKeyRepeatKey "HIDKeyRepeat"
56 #define kIOHIDInitialKeyRepeatKey "HIDInitialKeyRepeat"
57 #define kIOHIDKeyMappingKey "HIDKeyMapping"
58 #define kIOHIDResetKeyboardKey "HIDResetKeyboard"
60 #define kIOHIDPointerResolutionKey "HIDPointerResolution"
61 #define kIOHIDPointerAccelerationKey "HIDPointerAcceleration"
62 #define kIOHIDResetPointerKey "HIDResetPointer"
63 #define kIOHIDPointerConvertAbsoluteKey "HIDPointerConvertAbsolute"
64 #define kIOHIDPointerContactToMoveKey "HIDPointerContactToMove"
65 #define kIOHIDPointerPressureToClickKey "HIDPointerPressureToClick"
67 #define kIOHIDClickTimeKey "HIDClickTime"
68 #define kIOHIDClickSpaceKey "HIDClickSpace"
70 #define kIOHIDAutoDimThresholdKey "HIDAutoDimThreshold"
71 #define kIOHIDAutoDimStateKey "HIDAutoDimState"
72 #define kIOHIDAutoDimTimeKey "HIDAutoDimTime"
73 #define kIOHIDIdleTimeKey "HIDIdleTime"
75 #define kIOHIDBrightnessKey "HIDBrightness"
76 #define kIOHIDAutoDimBrightnessKey "HIDAutoDimBrightness"
79 #define EVS_PREFIX "Evs_" /* All EVS calls start with this string */
81 /* WaitCursor-related ioctls */
83 #define EVSIOSWT "Evs_SetWaitThreshold"
84 #define EVSIOSWT_SIZE EVS_PACKED_TIME_SIZE
86 #define EVSIOSWS "Evs_SetWaitSustain"
87 #define EVSIOSWS_SIZE EVS_PACKED_TIME_SIZE
89 #define EVSIOSWFI "Evs_SetWaitFrameInterval"
90 #define EVSIOSWFI_SIZE EVS_PACKED_TIME_SIZE
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)
99 #define EVS_PACKED_TIME_SIZE (sizeof(UInt64) / sizeof( unsigned int))
101 /* Device control ioctls. Levels specified may be in the range 0 - 64. */
103 #define EVSIOSB kIOHIDBrightnessKey
104 #define EVSIOSB_SIZE 1
106 #define EVSIOSADB kIOHIDAutoDimBrightnessKey
107 #define EVSIOSADB_SIZE 1
110 #define EVSIOSA "Evs_SetAttenuation"
111 #define EVIOSA_SIZE 1
113 #define EVSIO_DCTLINFO "Evs_DeviceControlInfo"
115 EVSIO_DCTLINFO_BRIGHT
,
116 EVSIO_DCTLINFO_ATTEN
,
117 EVSIO_DCTLINFO_AUTODIMBRIGHT
118 } evsio_DCTLINFOIndices
;
119 #define EVSIO_DCTLINFO_SIZE (EVSIO_DCTLINFO_AUTODIMBRIGHT + 1)
123 * Device status request
125 #define EVSIOINFO NX_EVS_DEVICE_INFO
128 /* Keyboard-related ioctls - implemented within Event Sources */
130 #define EVSIOSKR kIOHIDKeyRepeatKey
131 #define EVSIOSKR_SIZE EVS_PACKED_TIME_SIZE
133 #define EVSIOSIKR kIOHIDInitialKeyRepeatKey
134 #define EVSIOSIKR_SIZE EVS_PACKED_TIME_SIZE
136 #define EVSIORKBD kIOHIDResetKeyboardKey
137 #define EVSIORKBD_SIZE 1
139 #define EVSIOCKR_SIZE EVS_PACKED_TIME_SIZE
141 #define EVSIOCKML kIOHIDKeyMappingKey
142 #define EVSIOCKML_SIZE 1
144 /* The following two tokens are for use with the get/set character routines. */
145 #define EVSIOSKM kIOHIDKeyMappingKey
146 #define EVSIOSKM_SIZE 4096
148 #define EVSIOCKM kIOHIDKeyMappingKey
149 #define EVSIOCKM_SIZE 4096
151 /* Mouse-related ioctls - implemented within Event Sources */
153 #define EVSIOSMS kIOHIDPointerAccelerationKey
154 #define EVSIOSMS_SIZE (1)
156 #define EVSIOCMS kIOHIDPointerAccelerationKey
157 #define EVSIOCMS_SIZE (1)
160 #define EVSIOSMH "Evs_SetMouseHandedness"
161 #define EVSIOSMH_SIZE 1 // value from NXMouseButton enum
163 #define EVSIOCMH "Evs_CurrentMouseHandedness"
164 #define EVSIOCMH_SIZE 1
167 /* Generic pointer device controls, implemented by the Event Driver. */
168 #define EVSIOSCT kIOHIDClickTimeKey
169 #define EVSIOSCT_SIZE EVS_PACKED_TIME_SIZE
171 #define EVSIOSCS kIOHIDClickSpaceKey
175 } evsioEVSIOSCSIndices
;
176 #define EVSIOSCS_SIZE (EVSIOSCS_Y + 1)
178 #define EVSIOSADT kIOHIDAutoDimThresholdKey
179 #define EVSIOSADT_SIZE EVS_PACKED_TIME_SIZE
181 #define EVSIOSADS kIOHIDAutoDimStateKey
182 #define EVSIOSADS_SIZE 1
184 #define EVSIORMS kIOHIDResetPointerKey
185 #define EVSIORMS_SIZE 1
187 #define EVSIOCCT kIOHIDClickTimeKey
188 #define EVSIOCCT_SIZE EVS_PACKED_TIME_SIZE
190 #define EVSIOCADT kIOHIDAutoDimThresholdKey
191 #define EVSIOCADT_SIZE EVS_PACKED_TIME_SIZE
193 #define EVSIOGDADT kIOHIDAutoDimTimeKey
194 #define EVSIOGDADT_SIZE EVS_PACKED_TIME_SIZE
196 #define EVSIOIDLE kIOHIDIdleTimeKey
197 #define EVSIOIDLE_SIZE EVS_PACKED_TIME_SIZE
199 #define EVSIOCCS kIOHIDClickSpaceKey
203 } evsioEVSIOCCSIndices
;
204 #define EVSIOCCS_SIZE (EVSIOCCS_Y + 1)
206 #define EVSIOCADS kIOHIDAutoDimStateKey
207 #define EVSIOCADS_SIZE 1
209 #endif /* !_DEV_EVSIO_H */