USING: iokit alien alien.syntax alien.c-types kernel system
core-foundation core-foundation.arrays core-foundation.data
core-foundation.dictionaries core-foundation.run-loop
-core-foundation.strings core-foundation.time ;
+core-foundation.strings core-foundation.time unix.types ;
IN: iokit.hid
CONSTANT: kIOHIDDeviceKey "IOHIDDevice"
CONSTANT: kIOHIDElementTypeFeature 257
CONSTANT: kIOHIDElementTypeCollection 513
-CONSTANT: kIOHIDElementCollectionTypePhysical HEX: 00
-CONSTANT: kIOHIDElementCollectionTypeApplication HEX: 01
-CONSTANT: kIOHIDElementCollectionTypeLogical HEX: 02
-CONSTANT: kIOHIDElementCollectionTypeReport HEX: 03
-CONSTANT: kIOHIDElementCollectionTypeNamedArray HEX: 04
-CONSTANT: kIOHIDElementCollectionTypeUsageSwitch HEX: 05
-CONSTANT: kIOHIDElementCollectionTypeUsageModifier HEX: 06
+CONSTANT: kIOHIDElementCollectionTypePhysical 0x00
+CONSTANT: kIOHIDElementCollectionTypeApplication 0x01
+CONSTANT: kIOHIDElementCollectionTypeLogical 0x02
+CONSTANT: kIOHIDElementCollectionTypeReport 0x03
+CONSTANT: kIOHIDElementCollectionTypeNamedArray 0x04
+CONSTANT: kIOHIDElementCollectionTypeUsageSwitch 0x05
+CONSTANT: kIOHIDElementCollectionTypeUsageModifier 0x06
CONSTANT: kIOHIDReportTypeInput 0
CONSTANT: kIOHIDReportTypeOutput 1
CONSTANT: kIOHIDReportTypeFeature 2
CONSTANT: kIOHIDReportTypeCount 3
-CONSTANT: kIOHIDOptionsTypeNone HEX: 00
-CONSTANT: kIOHIDOptionsTypeSeizeDevice HEX: 01
+CONSTANT: kIOHIDOptionsTypeNone 0x00
+CONSTANT: kIOHIDOptionsTypeSeizeDevice 0x01
-CONSTANT: kIOHIDQueueOptionsTypeNone HEX: 00
-CONSTANT: kIOHIDQueueOptionsTypeEnqueueAll HEX: 01
+CONSTANT: kIOHIDQueueOptionsTypeNone 0x00
+CONSTANT: kIOHIDQueueOptionsTypeEnqueueAll 0x01
-CONSTANT: kIOHIDElementFlagsConstantMask HEX: 0001
-CONSTANT: kIOHIDElementFlagsVariableMask HEX: 0002
-CONSTANT: kIOHIDElementFlagsRelativeMask HEX: 0004
-CONSTANT: kIOHIDElementFlagsWrapMask HEX: 0008
-CONSTANT: kIOHIDElementFlagsNonLinearMask HEX: 0010
-CONSTANT: kIOHIDElementFlagsNoPreferredMask HEX: 0020
-CONSTANT: kIOHIDElementFlagsNullStateMask HEX: 0040
-CONSTANT: kIOHIDElementFlagsVolativeMask HEX: 0080
-CONSTANT: kIOHIDElementFlagsBufferedByteMask HEX: 0100
+CONSTANT: kIOHIDElementFlagsConstantMask 0x0001
+CONSTANT: kIOHIDElementFlagsVariableMask 0x0002
+CONSTANT: kIOHIDElementFlagsRelativeMask 0x0004
+CONSTANT: kIOHIDElementFlagsWrapMask 0x0008
+CONSTANT: kIOHIDElementFlagsNonLinearMask 0x0010
+CONSTANT: kIOHIDElementFlagsNoPreferredMask 0x0020
+CONSTANT: kIOHIDElementFlagsNullStateMask 0x0040
+CONSTANT: kIOHIDElementFlagsVolativeMask 0x0080
+CONSTANT: kIOHIDElementFlagsBufferedByteMask 0x0100
CONSTANT: kIOHIDValueScaleTypeCalibrated 0
CONSTANT: kIOHIDValueScaleTypePhysical 1
TYPEDEF: uint IOHIDElementFlags
TYPEDEF: void* IOHIDDeviceRef
TYPEDEF: void* IOHIDElementRef
+TYPEDEF: void* IOHIDQueueRef
TYPEDEF: void* IOHIDValueRef
TYPEDEF: void* IOHIDManagerRef
TYPEDEF: void* IOHIDTransactionRef
FUNCTION: IOReturn IOHIDDeviceCopyValueMultiple ( IOHIDDeviceRef device, CFArrayRef elements, CFDictionaryRef* pMultiple ) ;
FUNCTION: IOReturn IOHIDDeviceGetValueWithCallback ( IOHIDDeviceRef device, IOHIDElementRef element, IOHIDValueRef* pValue, CFTimeInterval timeout, IOHIDValueCallback callback, void* context ) ;
FUNCTION: IOReturn IOHIDDeviceCopyValueMultipleWithCallback ( IOHIDDeviceRef device, CFArrayRef elements, CFDictionaryRef* pMultiple, CFTimeInterval timeout, IOHIDValueMultipleCallback callback, void* context ) ;
-FUNCTION: IOReturn IOHIDDeviceSetReport ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, uchar* report, CFIndex reportLength ) ;
-FUNCTION: IOReturn IOHIDDeviceSetReportWithCallback ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, uchar* report, CFIndex reportLength, CFTimeInterval timeout, IOHIDReportCallback callback, void* context ) ;
-FUNCTION: IOReturn IOHIDDeviceGetReport ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, uchar* report, CFIndex* pReportLength ) ;
-FUNCTION: IOReturn IOHIDDeviceGetReportWithCallback ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, uchar* report, CFIndex* pReportLength, CFTimeInterval timeout, IOHIDReportCallback callback, void* context ) ;
+FUNCTION: IOReturn IOHIDDeviceSetReport ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, char* report, CFIndex reportLength ) ;
+FUNCTION: IOReturn IOHIDDeviceSetReportWithCallback ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, char* report, CFIndex reportLength, CFTimeInterval timeout, IOHIDReportCallback callback, void* context ) ;
+FUNCTION: IOReturn IOHIDDeviceGetReport ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, char* report, CFIndex* pReportLength ) ;
+FUNCTION: IOReturn IOHIDDeviceGetReportWithCallback ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, char* report, CFIndex* pReportLength, CFTimeInterval timeout, IOHIDReportCallback callback, void* context ) ;
! IOHIDManager
FUNCTION: CFTypeID IOHIDValueGetTypeID ( ) ;
FUNCTION: IOHIDValueRef IOHIDValueCreateWithIntegerValue ( CFAllocatorRef allocator, IOHIDElementRef element, ulonglong timeStamp, CFIndex value ) ;
-FUNCTION: IOHIDValueRef IOHIDValueCreateWithBytes ( CFAllocatorRef allocator, IOHIDElementRef element, ulonglong timeStamp, uchar* bytes, CFIndex length ) ;
-FUNCTION: IOHIDValueRef IOHIDValueCreateWithBytesNoCopy ( CFAllocatorRef allocator, IOHIDElementRef element, ulonglong timeStamp, uchar* bytes, CFIndex length ) ;
+FUNCTION: IOHIDValueRef IOHIDValueCreateWithBytes ( CFAllocatorRef allocator, IOHIDElementRef element, ulonglong timeStamp, c-string bytes, CFIndex length ) ;
+FUNCTION: IOHIDValueRef IOHIDValueCreateWithBytesNoCopy ( CFAllocatorRef allocator, IOHIDElementRef element, ulonglong timeStamp, c-string bytes, CFIndex length ) ;
FUNCTION: IOHIDElementRef IOHIDValueGetElement ( IOHIDValueRef value ) ;
FUNCTION: ulonglong IOHIDValueGetTimeStamp ( IOHIDValueRef value ) ;
FUNCTION: CFIndex IOHIDValueGetLength ( IOHIDValueRef value ) ;
FUNCTION: IOReturn IOHIDTransactionCommitWithCallback ( IOHIDTransactionRef transaction, CFTimeInterval timeout, IOHIDCallback callback, void* context ) ;
FUNCTION: void IOHIDTransactionClear ( IOHIDTransactionRef transaction ) ;
+! IOHIDQueue
+
+FUNCTION: CFTypeID IOHIDQueueGetTypeID ( ) ;
+FUNCTION: IOHIDDeviceRef IOHIDQueueGetDevice ( IOHIDQueueRef queue ) ;