Fixed fatbuild.sh script for building on Mac OS X 10.5 SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Fri, 28 Dec 2007 20:39:31 +0000
branchSDL-1.2
changeset 4104e3945f84427f
parent 4103 9df8136abec0
child 4105 84882a89ca50
Fixed fatbuild.sh script for building on Mac OS X 10.5
The minimum PPC SDK is 10.3.9
build-scripts/fatbuild.sh
src/joystick/darwin/10.3.9-FIX/IOHIDLib.h
src/joystick/darwin/SDL_sysjoystick.c
     1.1 --- a/build-scripts/fatbuild.sh	Fri Dec 28 18:15:43 2007 +0000
     1.2 +++ b/build-scripts/fatbuild.sh	Fri Dec 28 20:39:31 2007 +0000
     1.3 @@ -10,26 +10,26 @@
     1.4  # Generic, cross-platform CFLAGS you always want go here.
     1.5  CFLAGS="-O3 -g -pipe"
     1.6  
     1.7 -# PowerPC configure flags (10.2 runtime compatibility)
     1.8 +# PowerPC configure flags (10.3 runtime compatibility)
     1.9  # We dynamically load X11, so using the system X11 headers is fine.
    1.10  CONFIG_PPC="--build=`uname -p`-apple-darwin --host=powerpc-apple-darwin \
    1.11  --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib"
    1.12  
    1.13  # PowerPC compiler flags
    1.14 -CC_PPC="gcc-3.3 -arch ppc"
    1.15 -CXX_PPC="g++-3.3 -arch ppc"
    1.16 +CC_PPC="gcc-4.0 -arch ppc"
    1.17 +CXX_PPC="g++-4.0 -arch ppc"
    1.18  CFLAGS_PPC=""
    1.19 -CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1020 \
    1.20 +CPPFLAGS_PPC="-DMAC_OS_X_VERSION_MIN_REQUIRED=1030 \
    1.21  -nostdinc \
    1.22 --F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks \
    1.23 --I/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/gcc/darwin/3.3 \
    1.24 --isystem /Developer/SDKs/MacOSX10.2.8.sdk/usr/include"
    1.25 +-F/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks \
    1.26 +-I/Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/include \
    1.27 +-isystem /Developer/SDKs/MacOSX10.3.9.sdk/usr/include"
    1.28  
    1.29 -# PowerPC linker flags 
    1.30 -LFLAGS_PPC="-arch ppc \
    1.31 --L/Developer/SDKs/MacOSX10.2.8.sdk/usr/lib/gcc/darwin/3.3 \
    1.32 --F/Developer/SDKs/MacOSX10.2.8.sdk/System/Library/Frameworks \
    1.33 --Wl,-syslibroot,/Developer/SDKs/MacOSX10.2.8.sdk"
    1.34 +# PowerPC linker flags
    1.35 +LFLAGS_PPC="-arch ppc -mmacosx-version-min=10.3 \
    1.36 +-L/Developer/SDKs/MacOSX10.3.9.sdk/usr/lib/gcc/powerpc-apple-darwin9/4.0.1 \
    1.37 +-F/Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks \
    1.38 +-Wl,-syslibroot,/Developer/SDKs/MacOSX10.3.9.sdk"
    1.39  
    1.40  # Intel configure flags (10.4 runtime compatibility)
    1.41  # We dynamically load X11, so using the system X11 headers is fine.
    1.42 @@ -43,12 +43,12 @@
    1.43  CPPFLAGS_X86="-DMAC_OS_X_VERSION_MIN_REQUIRED=1040 \
    1.44  -nostdinc \
    1.45  -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks \
    1.46 --I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.1/include \
    1.47 +-I/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include \
    1.48  -isystem /Developer/SDKs/MacOSX10.4u.sdk/usr/include"
    1.49  
    1.50  # Intel linker flags
    1.51  LFLAGS_X86="-arch i386 -mmacosx-version-min=10.4 \
    1.52 --L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin8/4.0.1 \
    1.53 +-L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1 \
    1.54  -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
    1.55  
    1.56  #
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/src/joystick/darwin/10.3.9-FIX/IOHIDLib.h	Fri Dec 28 20:39:31 2007 +0000
     2.3 @@ -0,0 +1,874 @@
     2.4 +/* *INDENT-OFF* */
     2.5 +/*
     2.6 + *
     2.7 + * @APPLE_LICENSE_HEADER_START@
     2.8 + * 
     2.9 + * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
    2.10 + * 
    2.11 + * This file contains Original Code and/or Modifications of Original Code
    2.12 + * as defined in and that are subject to the Apple Public Source License
    2.13 + * Version 2.0 (the 'License'). You may not use this file except in
    2.14 + * compliance with the License. Please obtain a copy of the License at
    2.15 + * http://www.opensource.apple.com/apsl/ and read it before using this
    2.16 + * file.
    2.17 + * 
    2.18 + * The Original Code and all software distributed under the License are
    2.19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
    2.20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
    2.21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
    2.22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
    2.23 + * Please see the License for the specific language governing rights and
    2.24 + * limitations under the License.
    2.25 + * 
    2.26 + * @APPLE_LICENSE_HEADER_END@
    2.27 + */
    2.28 +
    2.29 +#ifndef _IOKIT_HID_IOHIDLIB_H_
    2.30 +#define _IOKIT_HID_IOHIDLIB_H_
    2.31 +
    2.32 +#include <sys/cdefs.h>
    2.33 +
    2.34 +__BEGIN_DECLS
    2.35 +#include <CoreFoundation/CoreFoundation.h>
    2.36 +#if COREFOUNDATION_CFPLUGINCOM_SEPARATE
    2.37 +#include <CoreFoundation/CFPlugInCOM.h>
    2.38 +#endif
    2.39 +
    2.40 +#include <IOKit/IOTypes.h>
    2.41 +#include <IOKit/IOReturn.h>
    2.42 +
    2.43 +#include <IOKit/hid/IOHIDKeys.h>
    2.44 +
    2.45 +struct IOHIDEventStruct
    2.46 +{
    2.47 +    IOHIDElementType	type;
    2.48 +    IOHIDElementCookie	elementCookie;
    2.49 +    SInt32		value;
    2.50 +    AbsoluteTime	timestamp;
    2.51 +    UInt32		longValueSize;
    2.52 +    void *		longValue;
    2.53 +};
    2.54 +typedef struct IOHIDEventStruct IOHIDEventStruct;
    2.55 +
    2.56 +/* FA12FA38-6F1A-11D4-BA0C-0005028F18D5 */
    2.57 +#define kIOHIDDeviceUserClientTypeID CFUUIDGetConstantUUIDWithBytes(NULL, \
    2.58 +    0xFA, 0x12, 0xFA, 0x38, 0x6F, 0x1A, 0x11, 0xD4,			\
    2.59 +    0xBA, 0x0C, 0x00, 0x05, 0x02, 0x8F, 0x18, 0xD5)
    2.60 +
    2.61 +/* 13AA9C44-6F1B-11D4-907C-0005028F18D5 */
    2.62 +#define kIOHIDDeviceFactoryID CFUUIDGetConstantUUIDWithBytes(NULL,	\
    2.63 +    0x13, 0xAA, 0x9C, 0x44, 0x6F, 0x1B, 0x11, 0xD4,			\
    2.64 +    0x90, 0x7C, 0x00, 0x05, 0x02, 0x8F, 0x18, 0xD5)
    2.65 +
    2.66 +/* 78BD420C-6F14-11D4-9474-0005028F18D5 */
    2.67 +/*! @defined kIOHIDDeviceInterfaceID
    2.68 +    @discussion Interface ID for the IOHIDDeviceInterface. Corresponds to an
    2.69 +                 available HID device. */
    2.70 +#define kIOHIDDeviceInterfaceID CFUUIDGetConstantUUIDWithBytes(NULL, 	\
    2.71 +    0x78, 0xBD, 0x42, 0x0C, 0x6F, 0x14, 0x11, 0xD4,			\
    2.72 +    0x94, 0x74, 0x00, 0x05, 0x02, 0x8F, 0x18, 0xD5)
    2.73 +    
    2.74 +/* 7D0B510E-16D5-11D7-9E9B-000393992E38 */
    2.75 +/*! @defined kIOHIDDeviceInterfaceID121
    2.76 +    @discussion Interface ID for the IOHIDDeviceInterface121. Corresponds to 
    2.77 +                an available HID device that includes methods from
    2.78 +                IOHIDDeviceInterface.  This interface is available on 
    2.79 +                IOHIDLib 1.2.1 and Mac OS X 10.2.3 or later.*/
    2.80 +#define kIOHIDDeviceInterfaceID121 CFUUIDGetConstantUUIDWithBytes(NULL, \
    2.81 +    0x7d, 0xb, 0x51, 0xe, 0x16, 0xd5, 0x11, 0xd7, 			\
    2.82 +    0x9e, 0x9b, 0x0, 0x3, 0x93, 0x99, 0x2e, 0x38)
    2.83 +
    2.84 +/* B70ABF31-16D5-11D7-AB35-000393992E38 */
    2.85 +/*! @defined kIOHIDDeviceInterfaceID122
    2.86 +    @discussion Interface ID for the IOHIDDeviceInterface122. Corresponds to 
    2.87 +                an available HID device that includes methods from
    2.88 +                IOHIDDeviceInterface and IOHIDDeviceInterface121. This 
    2.89 +                interface is available on IOHIDLib 1.2.2 and Mac OS X 10.3
    2.90 +                or later.*/
    2.91 +#define kIOHIDDeviceInterfaceID122 CFUUIDGetConstantUUIDWithBytes(NULL, \
    2.92 +    0xb7, 0xa, 0xbf, 0x31, 0x16, 0xd5, 0x11, 0xd7, 			\
    2.93 +    0xab, 0x35, 0x0, 0x3, 0x93, 0x99, 0x2e, 0x38)
    2.94 +
    2.95 +/* 8138629E-6F14-11D4-970E-0005028F18D5 */
    2.96 +/*! @defined kIOHIDQueueInterfaceID
    2.97 +    @discussion Interface ID for the kIOHIDQueueInterfaceID. Corresponds to a
    2.98 +                queue for a specific HID device. */
    2.99 +#define kIOHIDQueueInterfaceID CFUUIDGetConstantUUIDWithBytes(NULL, 	\
   2.100 +    0x81, 0x38, 0x62, 0x9E, 0x6F, 0x14, 0x11, 0xD4,			\
   2.101 +    0x97, 0x0E, 0x00, 0x05, 0x02, 0x8F, 0x18, 0xD5)
   2.102 +
   2.103 +/* 80CDCC00-755D-11D4-8E0F-0005028F18D5 */
   2.104 +/*! @defined kIOHIDOutputTransactionInterfaceID
   2.105 +    @discussion Interface ID for the kIOHIDOutputTransactionInterfaceID.
   2.106 +                Corresponds to an output transaction for one or more report IDs
   2.107 +                on a specific device. */
   2.108 +#define kIOHIDOutputTransactionInterfaceID CFUUIDGetConstantUUIDWithBytes(NULL,\
   2.109 +    0x80, 0xCD, 0xCC, 0x00, 0x75, 0x5D, 0x11, 0xD4,			\
   2.110 +    0x80, 0xEF, 0x00, 0x05, 0x02, 0x8F, 0x18, 0xD5)
   2.111 +
   2.112 +/*! @typedef IOHIDCallbackFunction
   2.113 +    @discussion Type and arguments of callout C function that is used when a
   2.114 +                completion routine is called, see
   2.115 +                IOHIDLib.h:setRemovalCallback().
   2.116 +    @param target void * pointer to your data, often a pointer to an object.
   2.117 +    @param result Completion result of desired operation.
   2.118 +    @param refcon void * pointer to more data.
   2.119 +    @param sender Interface instance sending the completion routine.
   2.120 +*/
   2.121 +typedef void (*IOHIDCallbackFunction)
   2.122 +              (void * target, IOReturn result, void * refcon, void * sender);
   2.123 +
   2.124 +/*! @typedef IOHIDElementCallbackFunction
   2.125 +    @discussion Type and arguments of callout C function that is used when a
   2.126 +                completion routine is called, see IOHIDLib.h:setElementValue().
   2.127 +    @param target void * pointer to your data, often a pointer to an object.
   2.128 +    @param result Completion result of desired operation.
   2.129 +    @param refcon void * pointer to more data.
   2.130 +    @param sender Interface instance sending the completion routine.
   2.131 +    @param elementCookie Element within interface instance sending completion.
   2.132 +*/
   2.133 +typedef void (*IOHIDElementCallbackFunction)
   2.134 +              (void *	 		target,
   2.135 +               IOReturn 		result,
   2.136 +               void * 			refcon,
   2.137 +               void * 			sender,
   2.138 +               IOHIDElementCookie 	elementCookie);
   2.139 +
   2.140 +/*! @typedef IOHIDReportCallbackFunction
   2.141 +    @discussion Type and arguments of callout C function that is used when a
   2.142 +                completion routine is called, see IOHIDLib.h:setReport().
   2.143 +    @param target void * pointer to your data, often a pointer to an object.
   2.144 +    @param result Completion result of desired operation.
   2.145 +    @param refcon void * pointer to more data.
   2.146 +    @param sender Interface instance sending the completion routine.
   2.147 +    @param bufferSize Size of the buffer received upon completion.
   2.148 +*/
   2.149 +typedef void (*IOHIDReportCallbackFunction)
   2.150 +              (void *	 		target,
   2.151 +               IOReturn 		result,
   2.152 +               void * 			refcon,
   2.153 +               void * 			sender,
   2.154 +               UInt32		 	bufferSize);
   2.155 +               
   2.156 +
   2.157 +/* Forward declarations of the queue and output transaction interfaces */
   2.158 +struct IOHIDQueueInterface;
   2.159 +struct IOHIDOutputTransactionInterface;
   2.160 +typedef struct IOHIDQueueInterface IOHIDQueueInterface;
   2.161 +typedef struct IOHIDOutputTransactionInterface IOHIDOutputTransactionInterface;
   2.162 +
   2.163 +//
   2.164 +// IOHIDDeviceInterface Functions available in version 1.0 (10.0) and higher of Mac OS X
   2.165 +//
   2.166 +#define IOHIDDEVICEINTERFACE_FUNCS_100 							\
   2.167 +    IOReturn (*createAsyncEventSource)(void * self, CFRunLoopSourceRef * source); 	\
   2.168 +    CFRunLoopSourceRef (*getAsyncEventSource)(void * self);				\
   2.169 +    IOReturn (*createAsyncPort)(void * self, mach_port_t * port);			\
   2.170 +    mach_port_t (*getAsyncPort)(void * self);						\
   2.171 +    IOReturn (*open)(void * self, UInt32 flags);					\
   2.172 +    IOReturn (*close)(void * self);							\
   2.173 +    IOReturn (*setRemovalCallback)(void * self, IOHIDCallbackFunction removalCallback,	\
   2.174 +                                   void * removalTarget, void * removalRefcon);		\
   2.175 +    IOReturn (*getElementValue)(void * self, IOHIDElementCookie	elementCookie,		\
   2.176 +                                IOHIDEventStruct * valueEvent);				\
   2.177 +    IOReturn (*setElementValue)(void * self, IOHIDElementCookie elementCookie,		\
   2.178 +                                IOHIDEventStruct * valueEvent, UInt32 timeoutMS,	\
   2.179 +                                IOHIDElementCallbackFunction callback,			\
   2.180 +                                void * callbackTarget, void * callbackRefcon);		\
   2.181 +    IOReturn (*queryElementValue)(void * self, IOHIDElementCookie elementCookie,	\
   2.182 +                                IOHIDEventStruct * valueEvent, UInt32 timeoutMS,	\
   2.183 +                                IOHIDElementCallbackFunction callback,			\
   2.184 +                                void * callbackTarget, void * callbackRefcon);		\
   2.185 +    IOReturn (*startAllQueues)(void * self);						\
   2.186 +    IOReturn (*stopAllQueues)(void * self);						\
   2.187 +    IOHIDQueueInterface ** (*allocQueue) (void *self);					\
   2.188 +    IOHIDOutputTransactionInterface ** (*allocOutputTransaction) (void *self)
   2.189 +    
   2.190 +//
   2.191 +// IOHIDDeviceInterface Functions available in version 1.2.1 (10.2.3) and higher of Mac OS X
   2.192 +//
   2.193 +#define IOHIDDEVICEINTERFACE_FUNCS_121	 						\
   2.194 +    IOReturn (*setReport)(void * self, IOHIDReportType reportType, UInt32 reportID,	\
   2.195 +                                void * reportBuffer, UInt32 reportBufferSize,		\
   2.196 +                                UInt32 timeoutMS, IOHIDReportCallbackFunction callback,	\
   2.197 +                                void * callbackTarget, void * callbackRefcon);		\
   2.198 +    IOReturn (*getReport)(void * self, IOHIDReportType reportType,			\
   2.199 +                                UInt32 reportID, void * reportBuffer,			\
   2.200 +                                UInt32 * reportBufferSize, UInt32 timeoutMS,		\
   2.201 +                                IOHIDReportCallbackFunction callback,			\
   2.202 +                                void * callbackTarget, void * callbackRefcon)
   2.203 +                                
   2.204 +//
   2.205 +// IOHIDDeviceInterface Functions available in version 1.2.2 (10.3) and higher of Mac OS X
   2.206 +//
   2.207 +#define IOHIDDEVICEINTERFACE_FUNCS_122	 						\
   2.208 +    IOReturn (*copyMatchingElements)(void * self, CFDictionaryRef matchingDict, 	\
   2.209 +                                CFArrayRef * elements);					\
   2.210 +    IOReturn (*setInterruptReportHandlerCallback)(void * self, void * reportBuffer, 		\
   2.211 +                                UInt32 reportBufferSize, 				\
   2.212 +                                IOHIDReportCallbackFunction callback,			\
   2.213 +                                void * callbackTarget, void * callbackRefcon)	
   2.214 +
   2.215 +typedef struct IOHIDDeviceInterface
   2.216 +{
   2.217 +    IUNKNOWN_C_GUTS;
   2.218 +    IOHIDDEVICEINTERFACE_FUNCS_100;
   2.219 +    IOHIDDEVICEINTERFACE_FUNCS_121;
   2.220 +} IOHIDDeviceInterface;
   2.221 +
   2.222 +typedef struct IOHIDDeviceInterface121
   2.223 +{
   2.224 +    IUNKNOWN_C_GUTS;
   2.225 +    IOHIDDEVICEINTERFACE_FUNCS_100;
   2.226 +    IOHIDDEVICEINTERFACE_FUNCS_121;
   2.227 +} IOHIDDeviceInterface121;
   2.228 +
   2.229 +typedef struct IOHIDDeviceInterface122
   2.230 +{
   2.231 +    IUNKNOWN_C_GUTS;
   2.232 +    IOHIDDEVICEINTERFACE_FUNCS_100;
   2.233 +    IOHIDDEVICEINTERFACE_FUNCS_121;
   2.234 +    IOHIDDEVICEINTERFACE_FUNCS_122;
   2.235 +} IOHIDDeviceInterface122;
   2.236 +
   2.237 +
   2.238 +//
   2.239 +// IOHIDQueueInterface Functions available in version 1.0 (10.0) and higher of Mac OS X
   2.240 +//
   2.241 +#define IOHIDQUEUEINTERFACE_FUNCS_100							\
   2.242 +    IOReturn (*createAsyncEventSource)(void * self, CFRunLoopSourceRef * source);	\
   2.243 +    CFRunLoopSourceRef (*getAsyncEventSource)(void * self);				\
   2.244 +    IOReturn (*createAsyncPort)(void * self, mach_port_t * port);			\
   2.245 +    mach_port_t (*getAsyncPort)(void * self);						\
   2.246 +    IOReturn (*create)(void * self, UInt32 flags, UInt32 depth);			\
   2.247 +    IOReturn (*dispose)(void * self);							\
   2.248 +    IOReturn (*addElement)(void * self, IOHIDElementCookie elementCookie, UInt32 flags);\
   2.249 +    IOReturn (*removeElement)(void * self, IOHIDElementCookie elementCookie);		\
   2.250 +    Boolean (*hasElement)(void * self, IOHIDElementCookie elementCookie);		\
   2.251 +    IOReturn (*start)(void * self);							\
   2.252 +    IOReturn (*stop)(void * self);							\
   2.253 +    IOReturn (*getNextEvent)(void * self, IOHIDEventStruct * event,			\
   2.254 +                                AbsoluteTime maxTime, UInt32 timeoutMS);		\
   2.255 +    IOReturn (*setEventCallout)(void * self, IOHIDCallbackFunction callback,		\
   2.256 +                                void * callbackTarget,  void * callbackRefcon);		\
   2.257 +    IOReturn (*getEventCallout)(void * self, IOHIDCallbackFunction * outCallback,	\
   2.258 +                                void ** outCallbackTarget, void ** outCallbackRefcon)
   2.259 +
   2.260 +struct IOHIDQueueInterface
   2.261 +{
   2.262 +    IUNKNOWN_C_GUTS;
   2.263 +    IOHIDQUEUEINTERFACE_FUNCS_100;
   2.264 +};
   2.265 +
   2.266 +//
   2.267 +// IOHIDOutputTransactionInterface Functions available in version 1.2 (10.2) and higher of Mac OS X
   2.268 +//
   2.269 +#define IOHIDOUTPUTTRANSACTIONINTERFACE_FUNCS_120 					\
   2.270 +    IOReturn (*createAsyncEventSource)(void * self, CFRunLoopSourceRef * source);	\
   2.271 +    CFRunLoopSourceRef (*getAsyncEventSource)(void * self);				\
   2.272 +    IOReturn (*createAsyncPort)(void * self, mach_port_t * port);			\
   2.273 +    mach_port_t (*getAsyncPort)(void * self);						\
   2.274 +    IOReturn (*create)(void * self);							\
   2.275 +    IOReturn (*dispose)(void * self);							\
   2.276 +    IOReturn (*addElement)(void * self, IOHIDElementCookie elementCookie);		\
   2.277 +    IOReturn (*removeElement)(void * self, IOHIDElementCookie elementCookie);		\
   2.278 +    Boolean  (*hasElement)(void * self, IOHIDElementCookie elementCookie);		\
   2.279 +    IOReturn (*setElementDefault)(void *self, IOHIDElementCookie elementCookie,		\
   2.280 +                                IOHIDEventStruct * valueEvent);				\
   2.281 +    IOReturn (*getElementDefault)(void * self, IOHIDElementCookie elementCookie,	\
   2.282 +                                IOHIDEventStruct * outValueEvent);			\
   2.283 +    IOReturn (*setElementValue)(void * self, IOHIDElementCookie elementCookie,		\
   2.284 +                                IOHIDEventStruct * valueEvent);				\
   2.285 +    IOReturn (*getElementValue)(void * self, IOHIDElementCookie elementCookie,		\
   2.286 +                                IOHIDEventStruct * outValueEvent);			\
   2.287 +    IOReturn (*commit)(void * self, UInt32 timeoutMS, IOHIDCallbackFunction callback,	\
   2.288 +                                void * callbackTarget, void * callbackRefcon);		\
   2.289 +    IOReturn (*clear)(void * self)
   2.290 +
   2.291 +struct IOHIDOutputTransactionInterface
   2.292 +{
   2.293 +    IUNKNOWN_C_GUTS;
   2.294 +    IOHIDOUTPUTTRANSACTIONINTERFACE_FUNCS_120;
   2.295 +};
   2.296 +
   2.297 +
   2.298 +//
   2.299 +//  BEGIN READABLE STRUCTURE DEFINITIONS 
   2.300 +//  
   2.301 +//  This portion of uncompiled code provides a more reader friendly representation of 
   2.302 +//  the CFPlugin methods defined above.
   2.303 +
   2.304 +#if 0
   2.305 +/*! @class IOHIDDeviceInterface
   2.306 +    @discussion CFPlugin object subclass which provides the primary interface to
   2.307 +                HID devices.
   2.308 +*/
   2.309 +typedef struct IOHIDDeviceInterface
   2.310 +{
   2.311 +
   2.312 +    IUNKNOWN_C_GUTS;
   2.313 +
   2.314 +/*! @function createAsyncEventSource
   2.315 +    @abstract Creates async eventsource.
   2.316 +    @discussion This method will create an async mach port, if one
   2.317 +        has not already been created.
   2.318 +    @param source Reference to CFRunLoopSourceRef that is created.
   2.319 +    @result Returns an IOReturn code.
   2.320 +*/
   2.321 +    IOReturn (*createAsyncEventSource)(void * 			self,
   2.322 +                                       CFRunLoopSourceRef * 	source);
   2.323 +
   2.324 +/*! @function getAsyncEventSource
   2.325 +    @abstract Gets the created async event source.
   2.326 +    @result Returns a CFRunLoopSourceRef.
   2.327 +*/
   2.328 +    CFRunLoopSourceRef (*getAsyncEventSource)(void * self);
   2.329 +    
   2.330 +/*! @function createAsyncPort
   2.331 +    @abstract Creates an async port.
   2.332 +    @discussion The port must be created before any callbacks can be used. 
   2.333 +    @param port Reference to mach port that is created. 
   2.334 +    @result Returns an IOReturn code.
   2.335 +*/
   2.336 +    IOReturn (*createAsyncPort)(void * self, mach_port_t * port);
   2.337 +    
   2.338 +/*! @function getAsyncPort
   2.339 +    @abstract Gets the current async port.
   2.340 +    @result Returns a mach_port_t.
   2.341 +*/
   2.342 +    mach_port_t (*getAsyncPort)(void * self);
   2.343 +    
   2.344 +/*! @function open
   2.345 +    @abstract Opens the device.
   2.346 +    @param flags Flags to be passed down to the user client.
   2.347 +    @result Returns an IOReturn code.
   2.348 +*/
   2.349 +    IOReturn (*open)(void * self, UInt32 flags);
   2.350 +    
   2.351 +/*! @function close
   2.352 +    @abstract Closes the device.
   2.353 +    @result Returns an IOReturn code.
   2.354 +*/
   2.355 +    IOReturn (*close)(void * self);
   2.356 +
   2.357 +/*! @function setRemovalCallback
   2.358 +    @abstract Sets callback to be used when device is removed.
   2.359 +    @param removalCallback Called when the device is removed. 
   2.360 +    @param removeTarget Passed to the callback.
   2.361 +    @param removalRefcon Passed to the callback.
   2.362 +    @result Returns an IOReturn code.
   2.363 +*/
   2.364 +    IOReturn (*setRemovalCallback)(void * 			self,
   2.365 +                                   IOHIDCallbackFunction	removalCallback,
   2.366 +                                   void *			removalTarget,
   2.367 +                                   void *			removalRefcon);
   2.368 +
   2.369 +/*! @function getElementValue
   2.370 +    @abstract Obtains the most recent value of an element.
   2.371 +    @discussion This call is most useful for interrupt driven elements,
   2.372 +        such as input type elements.  Since feature type element values 
   2.373 +        need to be polled from the device, it is recommended to use the 
   2.374 +        queryElementValue method to obtain the current value.  The  
   2.375 +        timestamp field in the event details the last time the element 
   2.376 +        value was altered.
   2.377 +    @param elementCookie The element of interest. 
   2.378 +    @param valueEvent The event that will be filled.   If a long value is 
   2.379 +        present, it is up to the caller to deallocate it.
   2.380 +    @result Returns an IOReturn code.
   2.381 +*/
   2.382 +    IOReturn (*getElementValue)(void * 			self,
   2.383 +                                IOHIDElementCookie	elementCookie,
   2.384 +                                IOHIDEventStruct *	valueEvent);
   2.385 +
   2.386 +/*! @function setElementValue
   2.387 +    @abstract Sets an element value on the device.
   2.388 +    @discussion This call is most useful for feature type elements.  It is
   2.389 +        recommended to use IOOutputTransaction for output type elements.
   2.390 +    @param elementCookie The element of interest. 
   2.391 +    @param valueEvent The event that will be filled.  If a long value is
   2.392 +        present, it will be copied.
   2.393 +    @param timeoutMS UNSUPPORTED.
   2.394 +    @param callback UNSUPPORTED.
   2.395 +    @param callbackTarget UNSUPPORTED.
   2.396 +    @param callbackRefcon UNSUPPORTED.
   2.397 +    @result Returns an IOReturn code.
   2.398 +*/
   2.399 +    IOReturn (*setElementValue)(void *	 			self,
   2.400 +                                IOHIDElementCookie		elementCookie,
   2.401 +                                IOHIDEventStruct *		valueEvent,
   2.402 +                                UInt32 				timeoutMS,
   2.403 +                                IOHIDElementCallbackFunction	callback,
   2.404 +                                void * 				callbackTarget,
   2.405 +                                void *				callbackRefcon);
   2.406 +
   2.407 +/*! @function queryElementValue
   2.408 +    @abstract Obtains the current value of an element.
   2.409 +    @discussion This call is most useful for feature type elements.  This
   2.410 +        method will poll the device for the current element value.
   2.411 +    @param elementCookie The element of interest. 
   2.412 +    @param valueEvent The event that will be filled.  If a long value is 
   2.413 +        present, it is up to the caller to deallocate it.
   2.414 +    @param timeoutMS UNSUPPORTED.
   2.415 +    @param callback UNSUPPORTED.
   2.416 +    @param callbackTarget UNSUPPORTED.
   2.417 +    @param callbackRefcon UNSUPPORTED.
   2.418 +    @result Returns an IOReturn code.
   2.419 +*/
   2.420 +    IOReturn (*queryElementValue)(void * 			self,
   2.421 +                                IOHIDElementCookie		elementCookie,
   2.422 +                                IOHIDEventStruct *		valueEvent,
   2.423 +                                UInt32 				timeoutMS,
   2.424 +                                IOHIDElementCallbackFunction	callback,
   2.425 +                                void * 				callbackTarget,
   2.426 +                                void *				callbackRefcon);
   2.427 +
   2.428 +/*! @function startAllQueues
   2.429 +    @abstract Starts data delivery on all queues for this device.
   2.430 +    @result Returns an IOReturn code.
   2.431 +*/
   2.432 +    IOReturn (*startAllQueues)(void * self);
   2.433 +    
   2.434 +/*! @function stopAllQueues
   2.435 +    @abstract Stops data delivery on all queues for this device.
   2.436 +    @result Returns an IOReturn code.
   2.437 +*/
   2.438 +    IOReturn (*stopAllQueues)(void * self);
   2.439 +
   2.440 +/*! @function allocQueue
   2.441 +    @abstract Wrapper to return instances of the IOHIDQueueInterface. 
   2.442 +    @result Returns the created IOHIDQueueInterface.
   2.443 +*/
   2.444 +    IOHIDQueueInterface ** (*allocQueue) (void *self);
   2.445 +    
   2.446 +/*! @function allocOutputTransaction
   2.447 +    @abstract Wrapper to return instances of the IOHIDOutputTransactionInterface. 
   2.448 +    @result Returns the created IOHIDOutputTransactionInterface.
   2.449 +*/
   2.450 +    IOHIDOutputTransactionInterface ** (*allocOutputTransaction) (void *self);
   2.451 +    
   2.452 +} IOHIDDeviceInterface;
   2.453 +
   2.454 +/*! @class IOHIDDeviceInterface121
   2.455 +    @discussion CFPlugin object subclass which provides the primary interface to
   2.456 +                HID devices.  This class is a subclass of IOHIDDeviceInterface.
   2.457 +*/
   2.458 +typedef struct IOHIDDeviceInterface121
   2.459 +{
   2.460 +
   2.461 +    IUNKNOWN_C_GUTS;
   2.462 +    IOHIDDEVICEINTERFACE_FUNCS_100;
   2.463 +
   2.464 +/*! @function setReport
   2.465 +    @abstract Sends a report to the device.
   2.466 +    @param reportType The report type.
   2.467 +    @param reportID The report id.
   2.468 +    @param reportBuffer Pointer to a preallocated buffer.
   2.469 +    @param reportBufferSize Size of the reportBuffer in bytes.
   2.470 +    @param timeoutMS
   2.471 +    @param callback If null, this method will behave synchronously.
   2.472 +    @param callbackTarget The callback target passed to the callback.
   2.473 +    @param callbackRefcon The callback refcon passed to the callback. 
   2.474 +    @result Returns an IOReturn code.
   2.475 +*/
   2.476 +    IOReturn (*setReport)	(void * 			self,
   2.477 +                                IOHIDReportType			reportType,
   2.478 +                                UInt32				reportID,
   2.479 +                                void *				reportBuffer,
   2.480 +                                UInt32				reportBufferSize,
   2.481 +                                UInt32 				timeoutMS,
   2.482 +                                IOHIDReportCallbackFunction	callback,
   2.483 +                                void * 				callbackTarget,
   2.484 +                                void *				callbackRefcon);
   2.485 +
   2.486 +/*! @function getReport
   2.487 +    @abstract Obtains a report from the device.
   2.488 +    @param reportType The report type.
   2.489 +    @param reportID The report ID.
   2.490 +    @param reportBuffer Pointer to a preallocated buffer.
   2.491 +    @param reportBufferSize Size of the reportBuffer in bytes.  
   2.492 +        When finished, will contain the actual size of the report.
   2.493 +    @param timeoutMS
   2.494 +    @param callback If null, this method will behave synchronously.
   2.495 +    @param callbackTarget The callback target passed to the callback.
   2.496 +    @param callbackRefcon The callback refcon passed to the callback. 
   2.497 +    @result Returns an IOReturn code.
   2.498 +*/
   2.499 +    IOReturn (*getReport)	(void * 			self,
   2.500 +                                IOHIDReportType			reportType,
   2.501 +                                UInt32				reportID,
   2.502 +                                void *				reportBuffer,
   2.503 +                                UInt32 *			reportBufferSize,
   2.504 +                                UInt32 				timeoutMS,
   2.505 +                                IOHIDReportCallbackFunction	callback,
   2.506 +                                void * 				callbackTarget,
   2.507 +                                void *				callbackRefcon);
   2.508 +                                
   2.509 +}IOHIDDeviceInterface121;
   2.510 +
   2.511 +/*! @class IOHIDDeviceInterface122
   2.512 +    @discussion CFPlugin object subclass which provides the primary interface to
   2.513 +                HID devices.  This class is a subclass of IOHIDDeviceInterface121.
   2.514 +*/
   2.515 +typedef struct IOHIDDeviceInterface122
   2.516 +{
   2.517 +
   2.518 +    IUNKNOWN_C_GUTS;
   2.519 +    IOHIDDEVICEINTERFACE_FUNCS_100;
   2.520 +    IOHIDDEVICEINTERFACE_FUNCS_121;
   2.521 +
   2.522 +/*! @function copyMatchingElements
   2.523 +    @abstract Obtains specific elements defined by the device.
   2.524 +    @discussion Using keys defined in IOHIDKeys.h for elements, create a 
   2.525 +            matching dictonary containing items that you wish to search for.  
   2.526 +            A null array indicates that no elements matching that criteria 
   2.527 +            were found. Each item in the array is a reference to the same 
   2.528 +            dictionary item that represents each element in the I/O Registry.
   2.529 +            It is up to the caller to release the returned array of elements. 
   2.530 +    @param matchingDict Dictionary containg key/value pairs to match on.  Pass
   2.531 +            a null value to match on all elements.
   2.532 +    @param elements Pointer to a CFArrayRef that will be returned by this
   2.533 +            method.  It is up to the caller to release it when finished. 
   2.534 +    @result Returns an IOReturn code. 
   2.535 +*/
   2.536 +    IOReturn (*copyMatchingElements)(void * 			self, 
   2.537 +                                CFDictionaryRef 		matchingDict, 
   2.538 +                                CFArrayRef * 			elements);
   2.539 +                                
   2.540 +/*! @function setInterruptReportHandlerCallback
   2.541 +    @abstract Sets the report handler callout to be called when the data 
   2.542 +        is received from the Interrupt-In pipe.
   2.543 +    @discussion In order for this to work correctly, you must call
   2.544 +        createAsyncPort and createAsyncEventSource.
   2.545 +    @param reportBuffer Pointer to a preallocated buffer.
   2.546 +    @param reportBufferSize Size of the reportBuffer in bytes.  
   2.547 +    @param callback If non-NULL, is a callback to be called when data 
   2.548 +        is received from the device.
   2.549 +    @param callbackTarget The callback target passed to the callback
   2.550 +    @param callbackRefcon The callback refcon passed to the callback.
   2.551 +    @result Returns an IOReturn code. 
   2.552 +*/
   2.553 +    IOReturn (*setInterruptReportHandlerCallback)(
   2.554 +                            void * 				self,
   2.555 +                            void *				reportBuffer,
   2.556 +                            UInt32				reportBufferSize, 
   2.557 +                            IOHIDReportCallbackFunction 	callback,
   2.558 +                            void * 				callbackTarget, 
   2.559 +                            void * 				callbackRefcon);
   2.560 +    
   2.561 +}IOHIDDeviceInterface122;
   2.562 +
   2.563 +/*! @class IOHIDQueueInterface
   2.564 +    @discussion CFPlugin object subclass which provides an interface for input
   2.565 +                queues from HID devices. Created by an IOHIDDeviceInterface
   2.566 +                object.
   2.567 +*/
   2.568 +typedef struct IOHIDQueueInterface
   2.569 +{
   2.570 +
   2.571 +    IUNKNOWN_C_GUTS;
   2.572 +
   2.573 +/*! @function createAsyncEventSource
   2.574 +    @abstract Creates an async event source.
   2.575 +    @discussion This will be used with setEventCallout.
   2.576 +    @param source The newly created event source.
   2.577 +    @result Returns an IOReturn code. 
   2.578 +*/
   2.579 +    IOReturn (*createAsyncEventSource)(void * 			self, 
   2.580 +                                        CFRunLoopSourceRef * 	source);
   2.581 +
   2.582 +/*! @function getAsyncEventSource
   2.583 +    @abstract Obtains the current event source.
   2.584 +    @result Returns a CFRunLoopSourceRef.
   2.585 +*/
   2.586 +    CFRunLoopSourceRef (*getAsyncEventSource)(void * self);
   2.587 +
   2.588 +/*! @function createAsyncPort
   2.589 +    @abstract Creates an async port.
   2.590 +    @discussion This will be used with createAsyncEventSource.
   2.591 +    @param port The newly created async port.
   2.592 +    @result Returns an IOReturn code.
   2.593 +*/
   2.594 +    IOReturn (*createAsyncPort)(void * self, mach_port_t * port);
   2.595 +    
   2.596 +/*! @function getAsyncPort
   2.597 +    @abstract Obtains the current async port.
   2.598 +    @result Returns a mach_port_t.
   2.599 +*/
   2.600 +    mach_port_t (*getAsyncPort)(void * self);
   2.601 +    
   2.602 +/*! @function create
   2.603 +    @abstract Creates the current queue. 
   2.604 +    @param flags
   2.605 +    @param depth The maximum number of elements in the queue 
   2.606 +        before the oldest elements in the queue begin to be lost.
   2.607 +    @result Returns an IOReturn code. 
   2.608 +*/
   2.609 +    IOReturn (*create)(void * 			self, 
   2.610 +                        UInt32 			flags,
   2.611 +                        UInt32			depth);
   2.612 +
   2.613 +/*! @function create
   2.614 +    @abstract Disposes of the current queue. 
   2.615 +    @result Returns an IOReturn code. 
   2.616 +*/
   2.617 +    IOReturn (*dispose)(void * self);
   2.618 +    
   2.619 +/*! @function addElement
   2.620 +    @abstract Adds an element to the queue.
   2.621 +    @discussion If the element has already been added to queue,
   2.622 +        an error will be returned.
   2.623 +    @param elementCookie The element of interest. 
   2.624 +    @param flags 
   2.625 +    @result Returns an IOReturn code. 
   2.626 +*/
   2.627 +    IOReturn (*addElement)(void * self,
   2.628 +                           IOHIDElementCookie elementCookie,
   2.629 +                           UInt32 flags);
   2.630 +
   2.631 +/*! @function removeElement
   2.632 +    @abstract Removes an element from the queue.
   2.633 +    @discussion If the element has not been added to queue,
   2.634 +        an error will be returned.
   2.635 +    @param elementCookie The element of interest. 
   2.636 +    @result Returns an IOReturn code. 
   2.637 +*/
   2.638 +    IOReturn (*removeElement)(void * self, IOHIDElementCookie elementCookie);
   2.639 +    
   2.640 +/*! @function hasElement
   2.641 +    @abstract Checks whether an element has been added to 
   2.642 +        the queue.
   2.643 +    @discussion Will return true if present, otherwise will return false.
   2.644 +    @param elementCookie The element of interest. 
   2.645 +    @result Returns a Boolean value. 
   2.646 +*/
   2.647 +    Boolean (*hasElement)(void * self, IOHIDElementCookie elementCookie);
   2.648 +
   2.649 +/*! @function start
   2.650 +    @abstract Starts event delivery to the queue. 
   2.651 +    @result Returns an IOReturn code. 
   2.652 +*/
   2.653 +    IOReturn (*start)(void * self);
   2.654 +    
   2.655 +/*! @function stop
   2.656 +    @abstract Stops event delivery to the queue. 
   2.657 +    @result Returns an IOReturn code. 
   2.658 +*/
   2.659 +    IOReturn (*stop)(void * self);
   2.660 +
   2.661 +/*! @function getNextEvent
   2.662 +    @abstract Reads next event from the queue.
   2.663 +    @param event The event that will be filled.  If a long value is
   2.664 +        present, it is up to the caller to deallocate it.
   2.665 +    @param maxtime UNSUPPORTED.  If non-zero, limits read events to 
   2.666 +        those that occured on or before maxTime.
   2.667 +    @param timoutMS UNSUPPORTED.  The timeout in milliseconds, a zero  
   2.668 +        timeout will cause this call to be non-blocking (returning  
   2.669 +        queue empty) if there is a NULL callback, and blocking forever 
   2.670 +        until the queue is non-empty if there is a valid callback.
   2.671 +    @result Returns an IOReturn code. 
   2.672 +*/
   2.673 +    IOReturn (*getNextEvent)(void * 			self,
   2.674 +                            IOHIDEventStruct *		event,
   2.675 +                            AbsoluteTime		maxTime,
   2.676 +                            UInt32 			timeoutMS);
   2.677 +
   2.678 +/*! @function setEventCallout
   2.679 +    @abstract Sets the event callout to be called when the queue 
   2.680 +        transitions to non-empty.
   2.681 +    @discussion In order for this to work correctly, you must call
   2.682 +        createAsyncPort and createAsyncEventSource.
   2.683 +    @param callback if non-NULL is a callback to be called when data 
   2.684 +        is  inserted to the queue
   2.685 +    @param callbackTarget The callback target passed to the callback
   2.686 +    @param callbackRefcon The callback refcon passed to the callback.
   2.687 +    @result Returns an IOReturn code.
   2.688 +*/
   2.689 +    IOReturn (*setEventCallout)(void * 			self,
   2.690 +                                IOHIDCallbackFunction   callback,
   2.691 +                                void * 			callbackTarget,
   2.692 +                                void *			callbackRefcon);
   2.693 +
   2.694 +/*! @function getEventCallout
   2.695 +    @abstract Gets the event callout.
   2.696 +    @discussion This callback will be called the queue transitions
   2.697 +        to non-empty.
   2.698 +    @param callback if non-NULL is a callback to be called when data 
   2.699 +        is  inserted to the queue
   2.700 +    @param callbackTarget The callback target passed to the callback
   2.701 +    @param callbackRefcon The callback refcon passed to the callback 
   2.702 +    @result Returns an IOReturn code. 
   2.703 +*/
   2.704 +    IOReturn (*getEventCallout)(void * 			self,
   2.705 +                                IOHIDCallbackFunction * outCallback,
   2.706 +                                void ** 		outCallbackTarget,
   2.707 +                                void **			outCallbackRefcon);
   2.708 +} IOHIDQueueInterface;
   2.709 +
   2.710 +/*! @class IOHIDOutputTransactionInterface
   2.711 +    @discussion CFPlugin object subclass which privides interface for output
   2.712 +                transactions to HID devices. Created by a IOHIDDeviceInterface
   2.713 +                object. */
   2.714 +
   2.715 +typedef struct IOHIDOutputTransactionInterface
   2.716 +{
   2.717 +    IUNKNOWN_C_GUTS;
   2.718 +                    
   2.719 +/*! @function createAsyncEventSource
   2.720 +    @abstract Creates an async event source.
   2.721 +    @discussion This will be used with setEventCallout.
   2.722 +    @param source The newly created event source 
   2.723 +    @result Returns an IOReturn code. 
   2.724 +*/
   2.725 +    IOReturn (*createAsyncEventSource)(void * 			self, 
   2.726 +                                        CFRunLoopSourceRef * 	source);
   2.727 +
   2.728 +/*! @function getAsyncEventSource
   2.729 +    @abstract Obtains the current event source.
   2.730 +    @result Returns a CFRunLoopSourceRef.
   2.731 +*/
   2.732 +    CFRunLoopSourceRef (*getAsyncEventSource)(void * self);
   2.733 +
   2.734 +/*! @function createAsyncPort
   2.735 +    @abstract Creates an async port.
   2.736 +    @discussion This will be used with createAsyncEventSource.
   2.737 +    @param port The newly created async port. 
   2.738 +    @result Returns an IOReturn code. 
   2.739 +*/
   2.740 +    IOReturn (*createAsyncPort)(void * self, mach_port_t * port);
   2.741 +    
   2.742 +/*! @function getAsyncPort
   2.743 +    @abstract Obtains the current async port. 
   2.744 +    @result Returns a mach_port_t.
   2.745 +*/
   2.746 +    mach_port_t (*getAsyncPort)(void * self);
   2.747 +    
   2.748 +/*! @function create
   2.749 +    @abstract Creates the current transaction.
   2.750 +    @discussion This method will free any memory that has been
   2.751 +        allocated for this transaction. 
   2.752 +    @result Returns an IOReturn code.
   2.753 +*/
   2.754 +    IOReturn (*create)(void * self);
   2.755 +    
   2.756 +/*! @function dispose
   2.757 +    @abstract Disposes of the current transaction.
   2.758 +    @discussion The transaction will have to be recreated, in order
   2.759 +        to perform any operations on the transaction. 
   2.760 +    @result Returns an IOReturn code. 
   2.761 +*/
   2.762 +    IOReturn (*dispose)(void * self);
   2.763 +    
   2.764 +/*! @function addElement
   2.765 +    @abstract Adds an element to the transaction.
   2.766 +    @discussion If the element has already been added to transaction,
   2.767 +        an error will be returned.
   2.768 +    @param elementCookie The element of interest.
   2.769 +    @result Returns an IOReturn code. 
   2.770 +*/
   2.771 +    IOReturn (*addElement)	(void * self, IOHIDElementCookie elementCookie);
   2.772 +    
   2.773 +/*! @function removeElement
   2.774 +    @abstract Removes an element from the transaction.
   2.775 +    @discussion If the element has not been added to transaction,
   2.776 +        an error will be returned.
   2.777 +    @param elementCookie The element of interest. 
   2.778 +    @result Returns an IOReturn code.
   2.779 +*/
   2.780 +    IOReturn (*removeElement)	(void * self, IOHIDElementCookie elementCookie);
   2.781 +    
   2.782 +/*! @function hasElement
   2.783 +    @abstract Checks whether an element has been added to 
   2.784 +        the transaction.
   2.785 +    @discussion Will return true if present, otherwise will return false.
   2.786 +    @param elementCookie The element of interest. 
   2.787 +    @result Returns a Boolean value. 
   2.788 +*/
   2.789 +    Boolean  (*hasElement)	(void * self, IOHIDElementCookie elementCookie);
   2.790 +    
   2.791 +/*! @function setElementDefault
   2.792 +    @abstract Sets the default value of an element in a 
   2.793 +        transaction.
   2.794 +    @discussion An error will be returned if the element has not been
   2.795 +        added to the transaction.
   2.796 +    @param elementCookie The element of interest. 
   2.797 +    @param valueEvent The event that will be filled.  If a long value is
   2.798 +        present, it will be copied. 
   2.799 +    @result Returns an IOReturn code. 
   2.800 +*/
   2.801 +    IOReturn (*setElementDefault)(void *	 	self,
   2.802 +                                    IOHIDElementCookie	elementCookie,
   2.803 +                                    IOHIDEventStruct *	valueEvent);
   2.804 +    
   2.805 +/*! @function getElementDefault
   2.806 +    @abstract Obtains the default value of an element in a 
   2.807 +        transaction.
   2.808 +    @discussion An error will be returned if the element has not been 
   2.809 +        added to the transaction.
   2.810 +    @param elementCookie The element of interest. 
   2.811 +    @param outValueEvent The event that will be filled.  If a long value is 
   2.812 +        present, it is up to the caller to deallocate it. 
   2.813 +    @result Returns an IOReturn code.
   2.814 +*/
   2.815 +    IOReturn (*getElementDefault)(void *	 	self,
   2.816 +                                    IOHIDElementCookie	elementCookie,
   2.817 +                                    IOHIDEventStruct *	outValueEvent);
   2.818 +    
   2.819 +/*! @function setElementValue
   2.820 +    @abstract Sets the value of an element in a transaction.
   2.821 +    @discussion An error will be returned if the element has not been
   2.822 +        added to the transaction.
   2.823 +    @param elementCookie The element of interest. 
   2.824 +    @param valueEvent The event that will be filled.  If a long value is
   2.825 +        present, it will be copied.
   2.826 +    @result Returns an IOReturn code. 
   2.827 +*/
   2.828 +    IOReturn (*setElementValue)(void *	 		self,
   2.829 +                                IOHIDElementCookie	elementCookie,
   2.830 +                                IOHIDEventStruct *	valueEvent);
   2.831 +    
   2.832 +/*! @function getElementValue
   2.833 +    @abstract Obtains the value of an element in a transaction.
   2.834 +    @discussion An error will be returned if the element has not been 
   2.835 +        added to the transaction.
   2.836 +    @param elementCookie The element of interest. 
   2.837 +    @param outValueEvent The event that will be filled.  If a long value is 
   2.838 +        present, it is up to the caller to deallocate it. 
   2.839 +    @result Returns an IOReturn code.
   2.840 +*/
   2.841 +    IOReturn (*getElementValue)(void *	 		self,
   2.842 +                                IOHIDElementCookie	elementCookie,
   2.843 +                                IOHIDEventStruct *	outValueEvent);
   2.844 +    
   2.845 +/*! @function commit
   2.846 +    @abstract Commits the transaction.
   2.847 +    @discussion Transaction element values, if set, will be sent to the 
   2.848 +        device.  Otherwise, the default element value will be used.  If
   2.849 +        neither are set, that element will be omitted from the commit.
   2.850 +        After a transaction is committed, transaction element values 
   2.851 +        will be cleared.  Default values will be preserved.
   2.852 +    @param timeoutMS UNSUPPORTED
   2.853 +    @param callback UNSUPPORTED
   2.854 +    @param callbackTarget UNSUPPORTED
   2.855 +    @param callbackRefcon UNSUPPORTED 
   2.856 +    @result Returns an IOReturn code.
   2.857 +*/
   2.858 +    IOReturn (*commit)(void * 			self,
   2.859 +                        UInt32 			timeoutMS,
   2.860 +                        IOHIDCallbackFunction   callback,
   2.861 +                        void * 			callbackTarget,
   2.862 +                        void *			callbackRefcon);
   2.863 +    
   2.864 +/*! @function clear
   2.865 +    @abstract Clears the transaction.
   2.866 +    @discussion Transaction element values will cleared.   Default 
   2.867 +        values will be preserved. 
   2.868 +    @result Returns an IOReturn code. 
   2.869 +*/
   2.870 +    IOReturn (*clear)(void * self);
   2.871 +} IOHIDOutputTransactionInterface;
   2.872 +
   2.873 +#endif
   2.874 +
   2.875 +__END_DECLS
   2.876 +
   2.877 +#endif /* !_IOKIT_HID_IOHIDLIB_H_ */
     3.1 --- a/src/joystick/darwin/SDL_sysjoystick.c	Fri Dec 28 18:15:43 2007 +0000
     3.2 +++ b/src/joystick/darwin/SDL_sysjoystick.c	Fri Dec 28 20:39:31 2007 +0000
     3.3 @@ -39,7 +39,11 @@
     3.4  /* The header was moved here in Mac OS X 10.1 */
     3.5  #include <Kernel/IOKit/hidsystem/IOHIDUsageTables.h>
     3.6  #endif
     3.7 +#if MAC_OS_X_VERSION_MIN_REQUIRED == 1030
     3.8 +#include "10.3.9-FIX/IOHIDLib.h"
     3.9 +#else
    3.10  #include <IOKit/hid/IOHIDLib.h>
    3.11 +#endif
    3.12  #include <IOKit/hid/IOHIDKeys.h>
    3.13  #include <CoreFoundation/CoreFoundation.h>
    3.14  #include <Carbon/Carbon.h> /* for NewPtrClear, DisposePtr */