1/* 2 * Copyright (c) 1999-2008 Apple Computer, Inc. All Rights Reserved. 3 * 4 * @APPLE_LICENSE_HEADER_START@ 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 24#ifndef _IOKIT_HID_IOHIDLIBPRIVATE_H 25#define _IOKIT_HID_IOHIDLIBPRIVATE_H 26 27#include <IOKit/hid/IOHIDLib.h> 28#include <IOKit/hid/IOHIDDevicePlugIn.h> 29#include <IOKit/hid/IOHIDLibUserClient.h> 30#include <Availability.h> 31 32__BEGIN_DECLS 33 34typedef struct _IOHIDCalibrationStruct { 35 CFIndex satMin; 36 CFIndex satMax; 37 CFIndex dzMin; 38 CFIndex dzMax; 39 CFIndex min; 40 CFIndex max; 41 double_t gran; 42} IOHIDCalibrationInfo; 43 44typedef struct _IOHIDCallbackApplierContext { 45 IOReturn result; 46 void * sender; 47} IOHIDCallbackApplierContext; 48 49extern void _IOObjectCFRelease(CFAllocatorRef allocator, const void * value); 50 51extern const void * _IOObjectCFRetain(CFAllocatorRef allocator, const void *value); 52 53CF_EXPORT 54IOHIDElementRef _IOHIDElementCreateWithParentAndData(CFAllocatorRef allocator, IOHIDElementRef parent, CFDataRef dataStore, IOHIDElementStruct * elementStruct, uint32_t index); 55 56CF_EXPORT 57void _IOHIDElementSetDevice(IOHIDElementRef element, IOHIDDeviceRef device); 58 59CF_EXPORT 60void _IOHIDElementSetDeviceInterface(IOHIDElementRef element, IOHIDDeviceDeviceInterface ** interface); 61 62CF_EXPORT 63uint32_t _IOHIDElementGetFlags(IOHIDElementRef element); 64 65CF_EXPORT 66CFIndex _IOHIDElementGetLength(IOHIDElementRef element); 67 68CF_EXPORT 69IOHIDValueRef _IOHIDElementGetValue(IOHIDElementRef element); 70 71CF_EXPORT 72IOHIDCalibrationInfo * _IOHIDElementGetCalibrationInfo(IOHIDElementRef element); 73 74CF_EXPORT 75void _IOHIDElementSetValue(IOHIDElementRef element, IOHIDValueRef value); 76 77CF_EXPORT 78IOHIDValueRef _IOHIDValueCreateWithStruct(CFAllocatorRef allocator, IOHIDElementRef element, IOHIDEventStruct * pEventStruct); 79 80CF_EXPORT 81IOHIDValueRef _IOHIDValueCreateWithElementValuePtr(CFAllocatorRef allocator, IOHIDElementRef element, IOHIDElementValue * pEventValue); 82 83CF_EXPORT 84void _IOHIDValueCopyToElementValuePtr(IOHIDValueRef value, IOHIDElementValue * pElementValue); 85 86CF_EXPORT 87IOCFPlugInInterface ** _IOHIDDeviceGetIOCFPlugInInterface( 88 IOHIDDeviceRef device); 89 90CF_EXPORT 91CFArrayRef _IOHIDQueueCopyElements(IOHIDQueueRef queue); 92 93CF_EXPORT 94void _IOHIDCallbackApplier(const void *callback, const void *callbackContext, void *applierContext); 95 96CF_EXPORT 97void _IOHIDLog(int level, const char *format, ...) __printflike(2, 3); 98 99CF_EXPORT 100kern_return_t IOHIDSetFixedMouseLocation(io_connect_t connect, 101 int32_t x, int32_t y) AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER; 102 103__END_DECLS 104 105#endif /* _IOKIT_HID_IOHIDLIBPRIVATE_H */ 106