1 USING: iokit alien alien.syntax alien.c-types kernel
2 system core-foundation ;
5 : kIOHIDDeviceKey "IOHIDDevice" ; inline
7 : kIOHIDTransportKey "Transport" ; inline
8 : kIOHIDVendorIDKey "VendorID" ; inline
9 : kIOHIDVendorIDSourceKey "VendorIDSource" ; inline
10 : kIOHIDProductIDKey "ProductID" ; inline
11 : kIOHIDVersionNumberKey "VersionNumber" ; inline
12 : kIOHIDManufacturerKey "Manufacturer" ; inline
13 : kIOHIDProductKey "Product" ; inline
14 : kIOHIDSerialNumberKey "SerialNumber" ; inline
15 : kIOHIDCountryCodeKey "CountryCode" ; inline
16 : kIOHIDLocationIDKey "LocationID" ; inline
17 : kIOHIDDeviceUsageKey "DeviceUsage" ; inline
18 : kIOHIDDeviceUsagePageKey "DeviceUsagePage" ; inline
19 : kIOHIDDeviceUsagePairsKey "DeviceUsagePairs" ; inline
20 : kIOHIDPrimaryUsageKey "PrimaryUsage" ; inline
21 : kIOHIDPrimaryUsagePageKey "PrimaryUsagePage" ; inline
22 : kIOHIDMaxInputReportSizeKey "MaxInputReportSize" ; inline
23 : kIOHIDMaxOutputReportSizeKey "MaxOutputReportSize" ; inline
24 : kIOHIDMaxFeatureReportSizeKey "MaxFeatureReportSize" ; inline
25 : kIOHIDReportIntervalKey "ReportInterval" ; inline
27 : kIOHIDElementKey "Elements" ; inline
29 : kIOHIDElementCookieKey "ElementCookie" ; inline
30 : kIOHIDElementTypeKey "Type" ; inline
31 : kIOHIDElementCollectionTypeKey "CollectionType" ; inline
32 : kIOHIDElementUsageKey "Usage" ; inline
33 : kIOHIDElementUsagePageKey "UsagePage" ; inline
34 : kIOHIDElementMinKey "Min" ; inline
35 : kIOHIDElementMaxKey "Max" ; inline
36 : kIOHIDElementScaledMinKey "ScaledMin" ; inline
37 : kIOHIDElementScaledMaxKey "ScaledMax" ; inline
38 : kIOHIDElementSizeKey "Size" ; inline
39 : kIOHIDElementReportSizeKey "ReportSize" ; inline
40 : kIOHIDElementReportCountKey "ReportCount" ; inline
41 : kIOHIDElementReportIDKey "ReportID" ; inline
42 : kIOHIDElementIsArrayKey "IsArray" ; inline
43 : kIOHIDElementIsRelativeKey "IsRelative" ; inline
44 : kIOHIDElementIsWrappingKey "IsWrapping" ; inline
45 : kIOHIDElementIsNonLinearKey "IsNonLinear" ; inline
46 : kIOHIDElementHasPreferredStateKey "HasPreferredState" ; inline
47 : kIOHIDElementHasNullStateKey "HasNullState" ; inline
48 : kIOHIDElementFlagsKey "Flags" ; inline
49 : kIOHIDElementUnitKey "Unit" ; inline
50 : kIOHIDElementUnitExponentKey "UnitExponent" ; inline
51 : kIOHIDElementNameKey "Name" ; inline
52 : kIOHIDElementValueLocationKey "ValueLocation" ; inline
53 : kIOHIDElementDuplicateIndexKey "DuplicateIndex" ; inline
54 : kIOHIDElementParentCollectionKey "ParentCollection" ; inline
56 : kIOHIDElementVendorSpecificKey ( -- str )
57 cpu ppc? "VendorSpecifc" "VendorSpecific" ? ; inline
59 : kIOHIDElementCookieMinKey "ElementCookieMin" ; inline
60 : kIOHIDElementCookieMaxKey "ElementCookieMax" ; inline
61 : kIOHIDElementUsageMinKey "UsageMin" ; inline
62 : kIOHIDElementUsageMaxKey "UsageMax" ; inline
64 : kIOHIDElementCalibrationMinKey "CalibrationMin" ; inline
65 : kIOHIDElementCalibrationMaxKey "CalibrationMax" ; inline
66 : kIOHIDElementCalibrationSaturationMinKey "CalibrationSaturationMin" ; inline
67 : kIOHIDElementCalibrationSaturationMaxKey "CalibrationSaturationMax" ; inline
68 : kIOHIDElementCalibrationDeadZoneMinKey "CalibrationDeadZoneMin" ; inline
69 : kIOHIDElementCalibrationDeadZoneMaxKey "CalibrationDeadZoneMax" ; inline
70 : kIOHIDElementCalibrationGranularityKey "CalibrationGranularity" ; inline
72 : kIOHIDElementTypeInput_Misc 1 ; inline
73 : kIOHIDElementTypeInput_Button 2 ; inline
74 : kIOHIDElementTypeInput_Axis 3 ; inline
75 : kIOHIDElementTypeInput_ScanCodes 4 ; inline
76 : kIOHIDElementTypeOutput 129 ; inline
77 : kIOHIDElementTypeFeature 257 ; inline
78 : kIOHIDElementTypeCollection 513 ; inline
80 : kIOHIDElementCollectionTypePhysical HEX: 00 ; inline
81 : kIOHIDElementCollectionTypeApplication HEX: 01 ; inline
82 : kIOHIDElementCollectionTypeLogical HEX: 02 ; inline
83 : kIOHIDElementCollectionTypeReport HEX: 03 ; inline
84 : kIOHIDElementCollectionTypeNamedArray HEX: 04 ; inline
85 : kIOHIDElementCollectionTypeUsageSwitch HEX: 05 ; inline
86 : kIOHIDElementCollectionTypeUsageModifier HEX: 06 ; inline
88 : kIOHIDReportTypeInput 0 ; inline
89 : kIOHIDReportTypeOutput 1 ; inline
90 : kIOHIDReportTypeFeature 2 ; inline
91 : kIOHIDReportTypeCount 3 ; inline
93 : kIOHIDOptionsTypeNone HEX: 00 ; inline
94 : kIOHIDOptionsTypeSeizeDevice HEX: 01 ; inline
96 : kIOHIDQueueOptionsTypeNone HEX: 00 ; inline
97 : kIOHIDQueueOptionsTypeEnqueueAll HEX: 01 ; inline
99 : kIOHIDElementFlagsConstantMask HEX: 0001 ; inline
100 : kIOHIDElementFlagsVariableMask HEX: 0002 ; inline
101 : kIOHIDElementFlagsRelativeMask HEX: 0004 ; inline
102 : kIOHIDElementFlagsWrapMask HEX: 0008 ; inline
103 : kIOHIDElementFlagsNonLinearMask HEX: 0010 ; inline
104 : kIOHIDElementFlagsNoPreferredMask HEX: 0020 ; inline
105 : kIOHIDElementFlagsNullStateMask HEX: 0040 ; inline
106 : kIOHIDElementFlagsVolativeMask HEX: 0080 ; inline
107 : kIOHIDElementFlagsBufferedByteMask HEX: 0100 ; inline
109 : kIOHIDValueScaleTypeCalibrated 0 ; inline
110 : kIOHIDValueScaleTypePhysical 1 ; inline
112 : kIOHIDTransactionDirectionTypeInput 0 ; inline
113 : kIOHIDTransactionDirectionTypeOutput 1 ; inline
115 : kIOHIDTransactionOptionDefaultOutputValue 1 ; inline
117 TYPEDEF: ptrdiff_t IOHIDElementCookie
118 TYPEDEF: int IOHIDElementType
119 TYPEDEF: int IOHIDElementCollectionType
120 TYPEDEF: int IOHIDReportType
121 TYPEDEF: uint IOHIDOptionsType
122 TYPEDEF: uint IOHIDQueueOptionsType
123 TYPEDEF: uint IOHIDElementFlags
124 TYPEDEF: void* IOHIDDeviceRef
125 TYPEDEF: void* IOHIDElementRef
126 TYPEDEF: void* IOHIDValueRef
127 TYPEDEF: void* IOHIDManagerRef
128 TYPEDEF: void* IOHIDTransactionRef
129 TYPEDEF: UInt32 IOHIDValueScaleType
130 TYPEDEF: UInt32 IOHIDTransactionDirectionType
132 TYPEDEF: void* IOHIDCallback
133 : IOHIDCallback ( quot -- alien )
134 [ "void" { "void*" "IOReturn" "void*" } "cdecl" ]
135 dip alien-callback ; inline
137 TYPEDEF: void* IOHIDReportCallback
138 : IOHIDReportCallback ( quot -- alien )
139 [ "void" { "void*" "IOReturn" "void*" "IOHIDReportType" "UInt32" "uchar*" "CFIndex" } "cdecl" ]
140 dip alien-callback ; inline
142 TYPEDEF: void* IOHIDValueCallback
143 : IOHIDValueCallback ( quot -- alien )
144 [ "void" { "void*" "IOReturn" "void*" "IOHIDValueRef" } "cdecl" ]
145 dip alien-callback ; inline
147 TYPEDEF: void* IOHIDValueMultipleCallback
148 : IOHIDValueMultipleCallback ( quot -- alien )
149 [ "void" { "void*" "IOReturn" "void*" "CFDictionaryRef" } "cdecl" ]
150 dip alien-callback ; inline
152 TYPEDEF: void* IOHIDDeviceCallback
153 : IOHIDDeviceCallback ( quot -- alien )
154 [ "void" { "void*" "IOReturn" "void*" "IOHIDDeviceRef" } "cdecl" ]
155 dip alien-callback ; inline
159 FUNCTION: CFTypeID IOHIDDeviceGetTypeID ( ) ;
160 FUNCTION: IOHIDDeviceRef IOHIDDeviceCreate ( CFAllocatorRef allocator, io_service_t service ) ;
161 FUNCTION: IOReturn IOHIDDeviceOpen ( IOHIDDeviceRef device, IOOptionBits options ) ;
162 FUNCTION: IOReturn IOHIDDeviceClose ( IOHIDDeviceRef device, IOOptionBits options ) ;
163 FUNCTION: Boolean IOHIDDeviceConformsTo ( IOHIDDeviceRef device, UInt32 usagePage, UInt32 usage ) ;
164 FUNCTION: CFTypeRef IOHIDDeviceGetProperty ( IOHIDDeviceRef device, CFStringRef key ) ;
165 FUNCTION: Boolean IOHIDDeviceSetProperty ( IOHIDDeviceRef device, CFStringRef key, CFTypeRef property ) ;
166 FUNCTION: CFArrayRef IOHIDDeviceCopyMatchingElements ( IOHIDDeviceRef device, CFDictionaryRef matching, IOOptionBits options ) ;
167 FUNCTION: void IOHIDDeviceScheduleWithRunLoop ( IOHIDDeviceRef device, CFRunLoopRef runLoop, CFStringRef runLoopMode ) ;
168 FUNCTION: void IOHIDDeviceUnscheduleFromRunLoop ( IOHIDDeviceRef device, CFRunLoopRef runLoop, CFStringRef runLoopMode ) ;
169 FUNCTION: void IOHIDDeviceRegisterRemovalCallback ( IOHIDDeviceRef device, IOHIDCallback callback, void* context ) ;
170 FUNCTION: void IOHIDDeviceRegisterInputValueCallback ( IOHIDDeviceRef device, IOHIDValueCallback callback, void* context ) ;
171 FUNCTION: void IOHIDDeviceRegisterInputReportCallback ( IOHIDDeviceRef device, uchar* report, CFIndex reportLength, IOHIDReportCallback callback, void* context ) ;
172 FUNCTION: void IOHIDDeviceSetInputValueMatching ( IOHIDDeviceRef device, CFDictionaryRef matching ) ;
173 FUNCTION: void IOHIDDeviceSetInputValueMatchingMultiple ( IOHIDDeviceRef device, CFArrayRef multiple ) ;
174 FUNCTION: IOReturn IOHIDDeviceSetValue ( IOHIDDeviceRef device, IOHIDElementRef element, IOHIDValueRef value ) ;
175 FUNCTION: IOReturn IOHIDDeviceSetValueMultiple ( IOHIDDeviceRef device, CFDictionaryRef multiple ) ;
176 FUNCTION: IOReturn IOHIDDeviceSetValueWithCallback ( IOHIDDeviceRef device, IOHIDElementRef element, IOHIDValueRef value, CFTimeInterval timeout, IOHIDValueCallback callback, void* context ) ;
177 FUNCTION: IOReturn IOHIDDeviceSetValueMultipleWithCallback ( IOHIDDeviceRef device, CFDictionaryRef multiple, CFTimeInterval timeout, IOHIDValueMultipleCallback callback, void* context ) ;
178 FUNCTION: IOReturn IOHIDDeviceGetValue ( IOHIDDeviceRef device, IOHIDElementRef element, IOHIDValueRef* pValue ) ;
179 FUNCTION: IOReturn IOHIDDeviceCopyValueMultiple ( IOHIDDeviceRef device, CFArrayRef elements, CFDictionaryRef* pMultiple ) ;
180 FUNCTION: IOReturn IOHIDDeviceGetValueWithCallback ( IOHIDDeviceRef device, IOHIDElementRef element, IOHIDValueRef* pValue, CFTimeInterval timeout, IOHIDValueCallback callback, void* context ) ;
181 FUNCTION: IOReturn IOHIDDeviceCopyValueMultipleWithCallback ( IOHIDDeviceRef device, CFArrayRef elements, CFDictionaryRef* pMultiple, CFTimeInterval timeout, IOHIDValueMultipleCallback callback, void* context ) ;
182 FUNCTION: IOReturn IOHIDDeviceSetReport ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, uchar* report, CFIndex reportLength ) ;
183 FUNCTION: IOReturn IOHIDDeviceSetReportWithCallback ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, uchar* report, CFIndex reportLength, CFTimeInterval timeout, IOHIDReportCallback callback, void* context ) ;
184 FUNCTION: IOReturn IOHIDDeviceGetReport ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, uchar* report, CFIndex* pReportLength ) ;
185 FUNCTION: IOReturn IOHIDDeviceGetReportWithCallback ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, uchar* report, CFIndex* pReportLength, CFTimeInterval timeout, IOHIDReportCallback callback, void* context ) ;
189 FUNCTION: CFTypeID IOHIDManagerGetTypeID ( ) ;
190 FUNCTION: IOHIDManagerRef IOHIDManagerCreate ( CFAllocatorRef allocator, IOOptionBits options ) ;
191 FUNCTION: IOReturn IOHIDManagerOpen ( IOHIDManagerRef manager, IOOptionBits options ) ;
192 FUNCTION: IOReturn IOHIDManagerClose ( IOHIDManagerRef manager, IOOptionBits options ) ;
193 FUNCTION: CFTypeRef IOHIDManagerGetProperty ( IOHIDManagerRef manager, CFStringRef key ) ;
194 FUNCTION: Boolean IOHIDManagerSetProperty ( IOHIDManagerRef manager, CFStringRef key, CFTypeRef value ) ;
195 FUNCTION: void IOHIDManagerScheduleWithRunLoop ( IOHIDManagerRef manager, CFRunLoopRef runLoop, CFStringRef runLoopMode ) ;
196 FUNCTION: void IOHIDManagerUnscheduleFromRunLoop ( IOHIDManagerRef manager, CFRunLoopRef runLoop, CFStringRef runLoopMode ) ;
197 FUNCTION: void IOHIDManagerSetDeviceMatching ( IOHIDManagerRef manager, CFDictionaryRef matching ) ;
198 FUNCTION: void IOHIDManagerSetDeviceMatchingMultiple ( IOHIDManagerRef manager, CFArrayRef multiple ) ;
199 FUNCTION: CFSetRef IOHIDManagerCopyDevices ( IOHIDManagerRef manager ) ;
200 FUNCTION: void IOHIDManagerRegisterDeviceMatchingCallback ( IOHIDManagerRef manager, IOHIDDeviceCallback callback, void* context ) ;
201 FUNCTION: void IOHIDManagerRegisterDeviceRemovalCallback ( IOHIDManagerRef manager, IOHIDDeviceCallback callback, void* context ) ;
202 FUNCTION: void IOHIDManagerRegisterInputReportCallback ( IOHIDManagerRef manager, IOHIDReportCallback callback, void* context ) ;
203 FUNCTION: void IOHIDManagerRegisterInputValueCallback ( IOHIDManagerRef manager, IOHIDValueCallback callback, void* context ) ;
204 FUNCTION: void IOHIDManagerSetInputValueMatching ( IOHIDManagerRef manager, CFDictionaryRef matching ) ;
205 FUNCTION: void IOHIDManagerSetInputValueMatchingMultiple ( IOHIDManagerRef manager, CFArrayRef multiple ) ;
209 FUNCTION: CFTypeID IOHIDElementGetTypeID ( ) ;
210 FUNCTION: IOHIDElementRef IOHIDElementCreateWithDictionary ( CFAllocatorRef allocator, CFDictionaryRef dictionary ) ;
211 FUNCTION: IOHIDDeviceRef IOHIDElementGetDevice ( IOHIDElementRef element ) ;
212 FUNCTION: IOHIDElementRef IOHIDElementGetParent ( IOHIDElementRef element ) ;
213 FUNCTION: CFArrayRef IOHIDElementGetChildren ( IOHIDElementRef element ) ;
214 FUNCTION: void IOHIDElementAttach ( IOHIDElementRef element, IOHIDElementRef toAttach ) ;
215 FUNCTION: void IOHIDElementDetach ( IOHIDElementRef element, IOHIDElementRef toDetach ) ;
216 FUNCTION: CFArrayRef IOHIDElementCopyAttached ( IOHIDElementRef element ) ;
217 FUNCTION: IOHIDElementCookie IOHIDElementGetCookie ( IOHIDElementRef element ) ;
218 FUNCTION: IOHIDElementType IOHIDElementGetType ( IOHIDElementRef element ) ;
219 FUNCTION: IOHIDElementCollectionType IOHIDElementGetCollectionType ( IOHIDElementRef element ) ;
220 FUNCTION: UInt32 IOHIDElementGetUsagePage ( IOHIDElementRef element ) ;
221 FUNCTION: UInt32 IOHIDElementGetUsage ( IOHIDElementRef element ) ;
222 FUNCTION: Boolean IOHIDElementIsVirtual ( IOHIDElementRef element ) ;
223 FUNCTION: Boolean IOHIDElementIsRelative ( IOHIDElementRef element ) ;
224 FUNCTION: Boolean IOHIDElementIsWrapping ( IOHIDElementRef element ) ;
225 FUNCTION: Boolean IOHIDElementIsArray ( IOHIDElementRef element ) ;
226 FUNCTION: Boolean IOHIDElementIsNonLinear ( IOHIDElementRef element ) ;
227 FUNCTION: Boolean IOHIDElementHasPreferredState ( IOHIDElementRef element ) ;
228 FUNCTION: Boolean IOHIDElementHasNullState ( IOHIDElementRef element ) ;
229 FUNCTION: CFStringRef IOHIDElementGetName ( IOHIDElementRef element ) ;
230 FUNCTION: UInt32 IOHIDElementGetReportID ( IOHIDElementRef element ) ;
231 FUNCTION: UInt32 IOHIDElementGetReportSize ( IOHIDElementRef element ) ;
232 FUNCTION: UInt32 IOHIDElementGetReportCount ( IOHIDElementRef element ) ;
233 FUNCTION: UInt32 IOHIDElementGetUnit ( IOHIDElementRef element ) ;
234 FUNCTION: UInt32 IOHIDElementGetUnitExponent ( IOHIDElementRef element ) ;
235 FUNCTION: CFIndex IOHIDElementGetLogicalMin ( IOHIDElementRef element ) ;
236 FUNCTION: CFIndex IOHIDElementGetLogicalMax ( IOHIDElementRef element ) ;
237 FUNCTION: CFIndex IOHIDElementGetPhysicalMin ( IOHIDElementRef element ) ;
238 FUNCTION: CFIndex IOHIDElementGetPhysicalMax ( IOHIDElementRef element ) ;
239 FUNCTION: CFTypeRef IOHIDElementGetProperty ( IOHIDElementRef element, CFStringRef key ) ;
240 FUNCTION: Boolean IOHIDElementSetProperty ( IOHIDElementRef element, CFStringRef key, CFTypeRef property ) ;
244 FUNCTION: CFTypeID IOHIDValueGetTypeID ( ) ;
245 FUNCTION: IOHIDValueRef IOHIDValueCreateWithIntegerValue ( CFAllocatorRef allocator, IOHIDElementRef element, ulonglong timeStamp, CFIndex value ) ;
246 FUNCTION: IOHIDValueRef IOHIDValueCreateWithBytes ( CFAllocatorRef allocator, IOHIDElementRef element, ulonglong timeStamp, uchar* bytes, CFIndex length ) ;
247 FUNCTION: IOHIDValueRef IOHIDValueCreateWithBytesNoCopy ( CFAllocatorRef allocator, IOHIDElementRef element, ulonglong timeStamp, uchar* bytes, CFIndex length ) ;
248 FUNCTION: IOHIDElementRef IOHIDValueGetElement ( IOHIDValueRef value ) ;
249 FUNCTION: ulonglong IOHIDValueGetTimeStamp ( IOHIDValueRef value ) ;
250 FUNCTION: CFIndex IOHIDValueGetLength ( IOHIDValueRef value ) ;
251 FUNCTION: uchar* IOHIDValueGetBytePtr ( IOHIDValueRef value ) ;
252 FUNCTION: CFIndex IOHIDValueGetIntegerValue ( IOHIDValueRef value ) ;
253 FUNCTION: double IOHIDValueGetScaledValue ( IOHIDValueRef value, IOHIDValueScaleType type ) ;
257 FUNCTION: CFTypeID IOHIDTransactionGetTypeID ( ) ;
258 FUNCTION: IOHIDTransactionRef IOHIDTransactionCreate ( CFAllocatorRef allocator, IOHIDDeviceRef device, IOHIDTransactionDirectionType direction, IOOptionBits options ) ;
259 FUNCTION: IOHIDDeviceRef IOHIDTransactionGetDevice ( IOHIDTransactionRef transaction ) ;
260 FUNCTION: IOHIDTransactionDirectionType IOHIDTransactionGetDirection ( IOHIDTransactionRef transaction ) ;
261 FUNCTION: void IOHIDTransactionSetDirection ( IOHIDTransactionRef transaction, IOHIDTransactionDirectionType direction ) ;
262 FUNCTION: void IOHIDTransactionAddElement ( IOHIDTransactionRef transaction, IOHIDElementRef element ) ;
263 FUNCTION: void IOHIDTransactionRemoveElement ( IOHIDTransactionRef transaction, IOHIDElementRef element ) ;
264 FUNCTION: Boolean IOHIDTransactionContainsElement ( IOHIDTransactionRef transaction, IOHIDElementRef element ) ;
265 FUNCTION: void IOHIDTransactionScheduleWithRunLoop ( IOHIDTransactionRef transaction, CFRunLoopRef runLoop, CFStringRef runLoopMode ) ;
266 FUNCTION: void IOHIDTransactionUnscheduleFromRunLoop ( IOHIDTransactionRef transaction, CFRunLoopRef runLoop, CFStringRef runLoopMode ) ;
267 FUNCTION: void IOHIDTransactionSetValue ( IOHIDTransactionRef transaction, IOHIDElementRef element, IOHIDValueRef value, IOOptionBits options ) ;
268 FUNCTION: IOHIDValueRef IOHIDTransactionGetValue ( IOHIDTransactionRef transaction, IOHIDElementRef element, IOOptionBits options ) ;
269 FUNCTION: IOReturn IOHIDTransactionCommit ( IOHIDTransactionRef transaction ) ;
270 FUNCTION: IOReturn IOHIDTransactionCommitWithCallback ( IOHIDTransactionRef transaction, CFTimeInterval timeout, IOHIDCallback callback, void* context ) ;
271 FUNCTION: void IOHIDTransactionClear ( IOHIDTransactionRef transaction ) ;