Removed support for 10.3.9
authorSam Lantinga <slouken@libsdl.org>
Wed, 01 Dec 2010 12:23:16 -0800
changeset 4925514f811a4887
parent 4924 455c0dad84df
child 4926 ab02a7242f08
Removed support for 10.3.9
Fixed building on Mac OS X 10.5
include/SDL_platform.h
src/audio/macosx/SDL_coreaudio.c
src/joystick/darwin/10.3.9-FIX/IOHIDLib.h
src/joystick/darwin/SDL_sysjoystick.c
src/joystick/darwin/SDL_sysjoystick_c.h
src/video/cocoa/SDL_cocoaclipboard.m
src/video/cocoa/SDL_cocoaevents.m
src/video/cocoa/SDL_cocoakeyboard.m
src/video/cocoa/SDL_cocoamodes.m
src/video/cocoa/SDL_cocoaopengl.m
src/video/cocoa/SDL_cocoashape.m
src/video/cocoa/SDL_cocoavideo.h
src/video/cocoa/SDL_cocoawindow.h
src/video/cocoa/SDL_cocoawindow.m
     1.1 --- a/include/SDL_platform.h	Wed Dec 01 12:22:29 2010 -0800
     1.2 +++ b/include/SDL_platform.h	Wed Dec 01 12:23:16 2010 -0800
     1.3 @@ -74,8 +74,16 @@
     1.4  #if defined(__APPLE__)
     1.5  /* lets us know what version of Mac OS X we're compiling on */
     1.6  #include "AvailabilityMacros.h"
     1.7 -#ifdef MAC_OS_X_VERSION_10_3
     1.8 -#include "TargetConditionals.h" /* this header is in 10.3 or later */
     1.9 +#include "TargetConditionals.h"
    1.10 +#ifndef MAC_OS_X_VERSION_10_4
    1.11 +#define MAC_OS_X_VERSION_10_4 1040
    1.12 +#endif
    1.13 +#ifndef MAC_OS_X_VERSION_10_5
    1.14 +#define MAC_OS_X_VERSION_10_5 1050
    1.15 +#endif
    1.16 +#ifndef MAC_OS_X_VERSION_10_6
    1.17 +#define MAC_OS_X_VERSION_10_6 1060
    1.18 +#endif
    1.19  #if TARGET_OS_IPHONE
    1.20  /* if compiling for iPhone */
    1.21  #undef __IPHONEOS__
    1.22 @@ -86,12 +94,6 @@
    1.23  #undef __MACOSX__
    1.24  #define __MACOSX__	1
    1.25  #endif /* TARGET_OS_IPHONE */
    1.26 -#else
    1.27 -/* if earlier verion of Mac OS X than version 10.3 */
    1.28 -#undef __MACOSX__
    1.29 -#define __MACOSX__	1
    1.30 -#endif
    1.31 -
    1.32  #endif /* defined(__APPLE__) */
    1.33  
    1.34  #if defined(__NetBSD__)
     2.1 --- a/src/audio/macosx/SDL_coreaudio.c	Wed Dec 01 12:22:29 2010 -0800
     2.2 +++ b/src/audio/macosx/SDL_coreaudio.c	Wed Dec 01 12:23:16 2010 -0800
     2.3 @@ -24,7 +24,7 @@
     2.4  #include <CoreAudio/CoreAudio.h>
     2.5  #include <CoreServices/CoreServices.h>
     2.6  #include <AudioUnit/AudioUnit.h>
     2.7 -#if MAC_OS_X_VERSION_MAX_ALLOWED <= 1050
     2.8 +#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_5
     2.9  #include <AudioUnit/AUNTComponent.h>
    2.10  #endif
    2.11  
     3.1 --- a/src/joystick/darwin/10.3.9-FIX/IOHIDLib.h	Wed Dec 01 12:22:29 2010 -0800
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,874 +0,0 @@
     3.4 -/* *INDENT-OFF* */
     3.5 -/*
     3.6 - *
     3.7 - * @APPLE_LICENSE_HEADER_START@
     3.8 - * 
     3.9 - * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
    3.10 - * 
    3.11 - * This file contains Original Code and/or Modifications of Original Code
    3.12 - * as defined in and that are subject to the Apple Public Source License
    3.13 - * Version 2.0 (the 'License'). You may not use this file except in
    3.14 - * compliance with the License. Please obtain a copy of the License at
    3.15 - * http://www.opensource.apple.com/apsl/ and read it before using this
    3.16 - * file.
    3.17 - * 
    3.18 - * The Original Code and all software distributed under the License are
    3.19 - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
    3.20 - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
    3.21 - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
    3.22 - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
    3.23 - * Please see the License for the specific language governing rights and
    3.24 - * limitations under the License.
    3.25 - * 
    3.26 - * @APPLE_LICENSE_HEADER_END@
    3.27 - */
    3.28 -
    3.29 -#ifndef _IOKIT_HID_IOHIDLIB_H_
    3.30 -#define _IOKIT_HID_IOHIDLIB_H_
    3.31 -
    3.32 -#include <sys/cdefs.h>
    3.33 -
    3.34 -__BEGIN_DECLS
    3.35 -#include <CoreFoundation/CoreFoundation.h>
    3.36 -#if COREFOUNDATION_CFPLUGINCOM_SEPARATE
    3.37 -#include <CoreFoundation/CFPlugInCOM.h>
    3.38 -#endif
    3.39 -
    3.40 -#include <IOKit/IOTypes.h>
    3.41 -#include <IOKit/IOReturn.h>
    3.42 -
    3.43 -#include <IOKit/hid/IOHIDKeys.h>
    3.44 -
    3.45 -struct IOHIDEventStruct
    3.46 -{
    3.47 -    IOHIDElementType	type;
    3.48 -    IOHIDElementCookie	elementCookie;
    3.49 -    SInt32		value;
    3.50 -    AbsoluteTime	timestamp;
    3.51 -    UInt32		longValueSize;
    3.52 -    void *		longValue;
    3.53 -};
    3.54 -typedef struct IOHIDEventStruct IOHIDEventStruct;
    3.55 -
    3.56 -/* FA12FA38-6F1A-11D4-BA0C-0005028F18D5 */
    3.57 -#define kIOHIDDeviceUserClientTypeID CFUUIDGetConstantUUIDWithBytes(NULL, \
    3.58 -    0xFA, 0x12, 0xFA, 0x38, 0x6F, 0x1A, 0x11, 0xD4,			\
    3.59 -    0xBA, 0x0C, 0x00, 0x05, 0x02, 0x8F, 0x18, 0xD5)
    3.60 -
    3.61 -/* 13AA9C44-6F1B-11D4-907C-0005028F18D5 */
    3.62 -#define kIOHIDDeviceFactoryID CFUUIDGetConstantUUIDWithBytes(NULL,	\
    3.63 -    0x13, 0xAA, 0x9C, 0x44, 0x6F, 0x1B, 0x11, 0xD4,			\
    3.64 -    0x90, 0x7C, 0x00, 0x05, 0x02, 0x8F, 0x18, 0xD5)
    3.65 -
    3.66 -/* 78BD420C-6F14-11D4-9474-0005028F18D5 */
    3.67 -/*! @defined kIOHIDDeviceInterfaceID
    3.68 -    @discussion Interface ID for the IOHIDDeviceInterface. Corresponds to an
    3.69 -                 available HID device. */
    3.70 -#define kIOHIDDeviceInterfaceID CFUUIDGetConstantUUIDWithBytes(NULL, 	\
    3.71 -    0x78, 0xBD, 0x42, 0x0C, 0x6F, 0x14, 0x11, 0xD4,			\
    3.72 -    0x94, 0x74, 0x00, 0x05, 0x02, 0x8F, 0x18, 0xD5)
    3.73 -    
    3.74 -/* 7D0B510E-16D5-11D7-9E9B-000393992E38 */
    3.75 -/*! @defined kIOHIDDeviceInterfaceID121
    3.76 -    @discussion Interface ID for the IOHIDDeviceInterface121. Corresponds to 
    3.77 -                an available HID device that includes methods from
    3.78 -                IOHIDDeviceInterface.  This interface is available on 
    3.79 -                IOHIDLib 1.2.1 and Mac OS X 10.2.3 or later.*/
    3.80 -#define kIOHIDDeviceInterfaceID121 CFUUIDGetConstantUUIDWithBytes(NULL, \
    3.81 -    0x7d, 0xb, 0x51, 0xe, 0x16, 0xd5, 0x11, 0xd7, 			\
    3.82 -    0x9e, 0x9b, 0x0, 0x3, 0x93, 0x99, 0x2e, 0x38)
    3.83 -
    3.84 -/* B70ABF31-16D5-11D7-AB35-000393992E38 */
    3.85 -/*! @defined kIOHIDDeviceInterfaceID122
    3.86 -    @discussion Interface ID for the IOHIDDeviceInterface122. Corresponds to 
    3.87 -                an available HID device that includes methods from
    3.88 -                IOHIDDeviceInterface and IOHIDDeviceInterface121. This 
    3.89 -                interface is available on IOHIDLib 1.2.2 and Mac OS X 10.3
    3.90 -                or later.*/
    3.91 -#define kIOHIDDeviceInterfaceID122 CFUUIDGetConstantUUIDWithBytes(NULL, \
    3.92 -    0xb7, 0xa, 0xbf, 0x31, 0x16, 0xd5, 0x11, 0xd7, 			\
    3.93 -    0xab, 0x35, 0x0, 0x3, 0x93, 0x99, 0x2e, 0x38)
    3.94 -
    3.95 -/* 8138629E-6F14-11D4-970E-0005028F18D5 */
    3.96 -/*! @defined kIOHIDQueueInterfaceID
    3.97 -    @discussion Interface ID for the kIOHIDQueueInterfaceID. Corresponds to a
    3.98 -                queue for a specific HID device. */
    3.99 -#define kIOHIDQueueInterfaceID CFUUIDGetConstantUUIDWithBytes(NULL, 	\
   3.100 -    0x81, 0x38, 0x62, 0x9E, 0x6F, 0x14, 0x11, 0xD4,			\
   3.101 -    0x97, 0x0E, 0x00, 0x05, 0x02, 0x8F, 0x18, 0xD5)
   3.102 -
   3.103 -/* 80CDCC00-755D-11D4-8E0F-0005028F18D5 */
   3.104 -/*! @defined kIOHIDOutputTransactionInterfaceID
   3.105 -    @discussion Interface ID for the kIOHIDOutputTransactionInterfaceID.
   3.106 -                Corresponds to an output transaction for one or more report IDs
   3.107 -                on a specific device. */
   3.108 -#define kIOHIDOutputTransactionInterfaceID CFUUIDGetConstantUUIDWithBytes(NULL,\
   3.109 -    0x80, 0xCD, 0xCC, 0x00, 0x75, 0x5D, 0x11, 0xD4,			\
   3.110 -    0x80, 0xEF, 0x00, 0x05, 0x02, 0x8F, 0x18, 0xD5)
   3.111 -
   3.112 -/*! @typedef IOHIDCallbackFunction
   3.113 -    @discussion Type and arguments of callout C function that is used when a
   3.114 -                completion routine is called, see
   3.115 -                IOHIDLib.h:setRemovalCallback().
   3.116 -    @param target void * pointer to your data, often a pointer to an object.
   3.117 -    @param result Completion result of desired operation.
   3.118 -    @param refcon void * pointer to more data.
   3.119 -    @param sender Interface instance sending the completion routine.
   3.120 -*/
   3.121 -typedef void (*IOHIDCallbackFunction)
   3.122 -              (void * target, IOReturn result, void * refcon, void * sender);
   3.123 -
   3.124 -/*! @typedef IOHIDElementCallbackFunction
   3.125 -    @discussion Type and arguments of callout C function that is used when a
   3.126 -                completion routine is called, see IOHIDLib.h:setElementValue().
   3.127 -    @param target void * pointer to your data, often a pointer to an object.
   3.128 -    @param result Completion result of desired operation.
   3.129 -    @param refcon void * pointer to more data.
   3.130 -    @param sender Interface instance sending the completion routine.
   3.131 -    @param elementCookie Element within interface instance sending completion.
   3.132 -*/
   3.133 -typedef void (*IOHIDElementCallbackFunction)
   3.134 -              (void *	 		target,
   3.135 -               IOReturn 		result,
   3.136 -               void * 			refcon,
   3.137 -               void * 			sender,
   3.138 -               IOHIDElementCookie 	elementCookie);
   3.139 -
   3.140 -/*! @typedef IOHIDReportCallbackFunction
   3.141 -    @discussion Type and arguments of callout C function that is used when a
   3.142 -                completion routine is called, see IOHIDLib.h:setReport().
   3.143 -    @param target void * pointer to your data, often a pointer to an object.
   3.144 -    @param result Completion result of desired operation.
   3.145 -    @param refcon void * pointer to more data.
   3.146 -    @param sender Interface instance sending the completion routine.
   3.147 -    @param bufferSize Size of the buffer received upon completion.
   3.148 -*/
   3.149 -typedef void (*IOHIDReportCallbackFunction)
   3.150 -              (void *	 		target,
   3.151 -               IOReturn 		result,
   3.152 -               void * 			refcon,
   3.153 -               void * 			sender,
   3.154 -               UInt32		 	bufferSize);
   3.155 -               
   3.156 -
   3.157 -/* Forward declarations of the queue and output transaction interfaces */
   3.158 -struct IOHIDQueueInterface;
   3.159 -struct IOHIDOutputTransactionInterface;
   3.160 -typedef struct IOHIDQueueInterface IOHIDQueueInterface;
   3.161 -typedef struct IOHIDOutputTransactionInterface IOHIDOutputTransactionInterface;
   3.162 -
   3.163 -//
   3.164 -// IOHIDDeviceInterface Functions available in version 1.0 (10.0) and higher of Mac OS X
   3.165 -//
   3.166 -#define IOHIDDEVICEINTERFACE_FUNCS_100 							\
   3.167 -    IOReturn (*createAsyncEventSource)(void * self, CFRunLoopSourceRef * source); 	\
   3.168 -    CFRunLoopSourceRef (*getAsyncEventSource)(void * self);				\
   3.169 -    IOReturn (*createAsyncPort)(void * self, mach_port_t * port);			\
   3.170 -    mach_port_t (*getAsyncPort)(void * self);						\
   3.171 -    IOReturn (*open)(void * self, UInt32 flags);					\
   3.172 -    IOReturn (*close)(void * self);							\
   3.173 -    IOReturn (*setRemovalCallback)(void * self, IOHIDCallbackFunction removalCallback,	\
   3.174 -                                   void * removalTarget, void * removalRefcon);		\
   3.175 -    IOReturn (*getElementValue)(void * self, IOHIDElementCookie	elementCookie,		\
   3.176 -                                IOHIDEventStruct * valueEvent);				\
   3.177 -    IOReturn (*setElementValue)(void * self, IOHIDElementCookie elementCookie,		\
   3.178 -                                IOHIDEventStruct * valueEvent, UInt32 timeoutMS,	\
   3.179 -                                IOHIDElementCallbackFunction callback,			\
   3.180 -                                void * callbackTarget, void * callbackRefcon);		\
   3.181 -    IOReturn (*queryElementValue)(void * self, IOHIDElementCookie elementCookie,	\
   3.182 -                                IOHIDEventStruct * valueEvent, UInt32 timeoutMS,	\
   3.183 -                                IOHIDElementCallbackFunction callback,			\
   3.184 -                                void * callbackTarget, void * callbackRefcon);		\
   3.185 -    IOReturn (*startAllQueues)(void * self);						\
   3.186 -    IOReturn (*stopAllQueues)(void * self);						\
   3.187 -    IOHIDQueueInterface ** (*allocQueue) (void *self);					\
   3.188 -    IOHIDOutputTransactionInterface ** (*allocOutputTransaction) (void *self)
   3.189 -    
   3.190 -//
   3.191 -// IOHIDDeviceInterface Functions available in version 1.2.1 (10.2.3) and higher of Mac OS X
   3.192 -//
   3.193 -#define IOHIDDEVICEINTERFACE_FUNCS_121	 						\
   3.194 -    IOReturn (*setReport)(void * self, IOHIDReportType reportType, UInt32 reportID,	\
   3.195 -                                void * reportBuffer, UInt32 reportBufferSize,		\
   3.196 -                                UInt32 timeoutMS, IOHIDReportCallbackFunction callback,	\
   3.197 -                                void * callbackTarget, void * callbackRefcon);		\
   3.198 -    IOReturn (*getReport)(void * self, IOHIDReportType reportType,			\
   3.199 -                                UInt32 reportID, void * reportBuffer,			\
   3.200 -                                UInt32 * reportBufferSize, UInt32 timeoutMS,		\
   3.201 -                                IOHIDReportCallbackFunction callback,			\
   3.202 -                                void * callbackTarget, void * callbackRefcon)
   3.203 -                                
   3.204 -//
   3.205 -// IOHIDDeviceInterface Functions available in version 1.2.2 (10.3) and higher of Mac OS X
   3.206 -//
   3.207 -#define IOHIDDEVICEINTERFACE_FUNCS_122	 						\
   3.208 -    IOReturn (*copyMatchingElements)(void * self, CFDictionaryRef matchingDict, 	\
   3.209 -                                CFArrayRef * elements);					\
   3.210 -    IOReturn (*setInterruptReportHandlerCallback)(void * self, void * reportBuffer, 		\
   3.211 -                                UInt32 reportBufferSize, 				\
   3.212 -                                IOHIDReportCallbackFunction callback,			\
   3.213 -                                void * callbackTarget, void * callbackRefcon)	
   3.214 -
   3.215 -typedef struct IOHIDDeviceInterface
   3.216 -{
   3.217 -    IUNKNOWN_C_GUTS;
   3.218 -    IOHIDDEVICEINTERFACE_FUNCS_100;
   3.219 -    IOHIDDEVICEINTERFACE_FUNCS_121;
   3.220 -} IOHIDDeviceInterface;
   3.221 -
   3.222 -typedef struct IOHIDDeviceInterface121
   3.223 -{
   3.224 -    IUNKNOWN_C_GUTS;
   3.225 -    IOHIDDEVICEINTERFACE_FUNCS_100;
   3.226 -    IOHIDDEVICEINTERFACE_FUNCS_121;
   3.227 -} IOHIDDeviceInterface121;
   3.228 -
   3.229 -typedef struct IOHIDDeviceInterface122
   3.230 -{
   3.231 -    IUNKNOWN_C_GUTS;
   3.232 -    IOHIDDEVICEINTERFACE_FUNCS_100;
   3.233 -    IOHIDDEVICEINTERFACE_FUNCS_121;
   3.234 -    IOHIDDEVICEINTERFACE_FUNCS_122;
   3.235 -} IOHIDDeviceInterface122;
   3.236 -
   3.237 -
   3.238 -//
   3.239 -// IOHIDQueueInterface Functions available in version 1.0 (10.0) and higher of Mac OS X
   3.240 -//
   3.241 -#define IOHIDQUEUEINTERFACE_FUNCS_100							\
   3.242 -    IOReturn (*createAsyncEventSource)(void * self, CFRunLoopSourceRef * source);	\
   3.243 -    CFRunLoopSourceRef (*getAsyncEventSource)(void * self);				\
   3.244 -    IOReturn (*createAsyncPort)(void * self, mach_port_t * port);			\
   3.245 -    mach_port_t (*getAsyncPort)(void * self);						\
   3.246 -    IOReturn (*create)(void * self, UInt32 flags, UInt32 depth);			\
   3.247 -    IOReturn (*dispose)(void * self);							\
   3.248 -    IOReturn (*addElement)(void * self, IOHIDElementCookie elementCookie, UInt32 flags);\
   3.249 -    IOReturn (*removeElement)(void * self, IOHIDElementCookie elementCookie);		\
   3.250 -    Boolean (*hasElement)(void * self, IOHIDElementCookie elementCookie);		\
   3.251 -    IOReturn (*start)(void * self);							\
   3.252 -    IOReturn (*stop)(void * self);							\
   3.253 -    IOReturn (*getNextEvent)(void * self, IOHIDEventStruct * event,			\
   3.254 -                                AbsoluteTime maxTime, UInt32 timeoutMS);		\
   3.255 -    IOReturn (*setEventCallout)(void * self, IOHIDCallbackFunction callback,		\
   3.256 -                                void * callbackTarget,  void * callbackRefcon);		\
   3.257 -    IOReturn (*getEventCallout)(void * self, IOHIDCallbackFunction * outCallback,	\
   3.258 -                                void ** outCallbackTarget, void ** outCallbackRefcon)
   3.259 -
   3.260 -struct IOHIDQueueInterface
   3.261 -{
   3.262 -    IUNKNOWN_C_GUTS;
   3.263 -    IOHIDQUEUEINTERFACE_FUNCS_100;
   3.264 -};
   3.265 -
   3.266 -//
   3.267 -// IOHIDOutputTransactionInterface Functions available in version 1.2 (10.2) and higher of Mac OS X
   3.268 -//
   3.269 -#define IOHIDOUTPUTTRANSACTIONINTERFACE_FUNCS_120 					\
   3.270 -    IOReturn (*createAsyncEventSource)(void * self, CFRunLoopSourceRef * source);	\
   3.271 -    CFRunLoopSourceRef (*getAsyncEventSource)(void * self);				\
   3.272 -    IOReturn (*createAsyncPort)(void * self, mach_port_t * port);			\
   3.273 -    mach_port_t (*getAsyncPort)(void * self);						\
   3.274 -    IOReturn (*create)(void * self);							\
   3.275 -    IOReturn (*dispose)(void * self);							\
   3.276 -    IOReturn (*addElement)(void * self, IOHIDElementCookie elementCookie);		\
   3.277 -    IOReturn (*removeElement)(void * self, IOHIDElementCookie elementCookie);		\
   3.278 -    Boolean  (*hasElement)(void * self, IOHIDElementCookie elementCookie);		\
   3.279 -    IOReturn (*setElementDefault)(void *self, IOHIDElementCookie elementCookie,		\
   3.280 -                                IOHIDEventStruct * valueEvent);				\
   3.281 -    IOReturn (*getElementDefault)(void * self, IOHIDElementCookie elementCookie,	\
   3.282 -                                IOHIDEventStruct * outValueEvent);			\
   3.283 -    IOReturn (*setElementValue)(void * self, IOHIDElementCookie elementCookie,		\
   3.284 -                                IOHIDEventStruct * valueEvent);				\
   3.285 -    IOReturn (*getElementValue)(void * self, IOHIDElementCookie elementCookie,		\
   3.286 -                                IOHIDEventStruct * outValueEvent);			\
   3.287 -    IOReturn (*commit)(void * self, UInt32 timeoutMS, IOHIDCallbackFunction callback,	\
   3.288 -                                void * callbackTarget, void * callbackRefcon);		\
   3.289 -    IOReturn (*clear)(void * self)
   3.290 -
   3.291 -struct IOHIDOutputTransactionInterface
   3.292 -{
   3.293 -    IUNKNOWN_C_GUTS;
   3.294 -    IOHIDOUTPUTTRANSACTIONINTERFACE_FUNCS_120;
   3.295 -};
   3.296 -
   3.297 -
   3.298 -//
   3.299 -//  BEGIN READABLE STRUCTURE DEFINITIONS 
   3.300 -//  
   3.301 -//  This portion of uncompiled code provides a more reader friendly representation of 
   3.302 -//  the CFPlugin methods defined above.
   3.303 -
   3.304 -#if 0
   3.305 -/*! @class IOHIDDeviceInterface
   3.306 -    @discussion CFPlugin object subclass which provides the primary interface to
   3.307 -                HID devices.
   3.308 -*/
   3.309 -typedef struct IOHIDDeviceInterface
   3.310 -{
   3.311 -
   3.312 -    IUNKNOWN_C_GUTS;
   3.313 -
   3.314 -/*! @function createAsyncEventSource
   3.315 -    @abstract Creates async eventsource.
   3.316 -    @discussion This method will create an async mach port, if one
   3.317 -        has not already been created.
   3.318 -    @param source Reference to CFRunLoopSourceRef that is created.
   3.319 -    @result Returns an IOReturn code.
   3.320 -*/
   3.321 -    IOReturn (*createAsyncEventSource)(void * 			self,
   3.322 -                                       CFRunLoopSourceRef * 	source);
   3.323 -
   3.324 -/*! @function getAsyncEventSource
   3.325 -    @abstract Gets the created async event source.
   3.326 -    @result Returns a CFRunLoopSourceRef.
   3.327 -*/
   3.328 -    CFRunLoopSourceRef (*getAsyncEventSource)(void * self);
   3.329 -    
   3.330 -/*! @function createAsyncPort
   3.331 -    @abstract Creates an async port.
   3.332 -    @discussion The port must be created before any callbacks can be used. 
   3.333 -    @param port Reference to mach port that is created. 
   3.334 -    @result Returns an IOReturn code.
   3.335 -*/
   3.336 -    IOReturn (*createAsyncPort)(void * self, mach_port_t * port);
   3.337 -    
   3.338 -/*! @function getAsyncPort
   3.339 -    @abstract Gets the current async port.
   3.340 -    @result Returns a mach_port_t.
   3.341 -*/
   3.342 -    mach_port_t (*getAsyncPort)(void * self);
   3.343 -    
   3.344 -/*! @function open
   3.345 -    @abstract Opens the device.
   3.346 -    @param flags Flags to be passed down to the user client.
   3.347 -    @result Returns an IOReturn code.
   3.348 -*/
   3.349 -    IOReturn (*open)(void * self, UInt32 flags);
   3.350 -    
   3.351 -/*! @function close
   3.352 -    @abstract Closes the device.
   3.353 -    @result Returns an IOReturn code.
   3.354 -*/
   3.355 -    IOReturn (*close)(void * self);
   3.356 -
   3.357 -/*! @function setRemovalCallback
   3.358 -    @abstract Sets callback to be used when device is removed.
   3.359 -    @param removalCallback Called when the device is removed. 
   3.360 -    @param removeTarget Passed to the callback.
   3.361 -    @param removalRefcon Passed to the callback.
   3.362 -    @result Returns an IOReturn code.
   3.363 -*/
   3.364 -    IOReturn (*setRemovalCallback)(void * 			self,
   3.365 -                                   IOHIDCallbackFunction	removalCallback,
   3.366 -                                   void *			removalTarget,
   3.367 -                                   void *			removalRefcon);
   3.368 -
   3.369 -/*! @function getElementValue
   3.370 -    @abstract Obtains the most recent value of an element.
   3.371 -    @discussion This call is most useful for interrupt driven elements,
   3.372 -        such as input type elements.  Since feature type element values 
   3.373 -        need to be polled from the device, it is recommended to use the 
   3.374 -        queryElementValue method to obtain the current value.  The  
   3.375 -        timestamp field in the event details the last time the element 
   3.376 -        value was altered.
   3.377 -    @param elementCookie The element of interest. 
   3.378 -    @param valueEvent The event that will be filled.   If a long value is 
   3.379 -        present, it is up to the caller to deallocate it.
   3.380 -    @result Returns an IOReturn code.
   3.381 -*/
   3.382 -    IOReturn (*getElementValue)(void * 			self,
   3.383 -                                IOHIDElementCookie	elementCookie,
   3.384 -                                IOHIDEventStruct *	valueEvent);
   3.385 -
   3.386 -/*! @function setElementValue
   3.387 -    @abstract Sets an element value on the device.
   3.388 -    @discussion This call is most useful for feature type elements.  It is
   3.389 -        recommended to use IOOutputTransaction for output type elements.
   3.390 -    @param elementCookie The element of interest. 
   3.391 -    @param valueEvent The event that will be filled.  If a long value is
   3.392 -        present, it will be copied.
   3.393 -    @param timeoutMS UNSUPPORTED.
   3.394 -    @param callback UNSUPPORTED.
   3.395 -    @param callbackTarget UNSUPPORTED.
   3.396 -    @param callbackRefcon UNSUPPORTED.
   3.397 -    @result Returns an IOReturn code.
   3.398 -*/
   3.399 -    IOReturn (*setElementValue)(void *	 			self,
   3.400 -                                IOHIDElementCookie		elementCookie,
   3.401 -                                IOHIDEventStruct *		valueEvent,
   3.402 -                                UInt32 				timeoutMS,
   3.403 -                                IOHIDElementCallbackFunction	callback,
   3.404 -                                void * 				callbackTarget,
   3.405 -                                void *				callbackRefcon);
   3.406 -
   3.407 -/*! @function queryElementValue
   3.408 -    @abstract Obtains the current value of an element.
   3.409 -    @discussion This call is most useful for feature type elements.  This
   3.410 -        method will poll the device for the current element value.
   3.411 -    @param elementCookie The element of interest. 
   3.412 -    @param valueEvent The event that will be filled.  If a long value is 
   3.413 -        present, it is up to the caller to deallocate it.
   3.414 -    @param timeoutMS UNSUPPORTED.
   3.415 -    @param callback UNSUPPORTED.
   3.416 -    @param callbackTarget UNSUPPORTED.
   3.417 -    @param callbackRefcon UNSUPPORTED.
   3.418 -    @result Returns an IOReturn code.
   3.419 -*/
   3.420 -    IOReturn (*queryElementValue)(void * 			self,
   3.421 -                                IOHIDElementCookie		elementCookie,
   3.422 -                                IOHIDEventStruct *		valueEvent,
   3.423 -                                UInt32 				timeoutMS,
   3.424 -                                IOHIDElementCallbackFunction	callback,
   3.425 -                                void * 				callbackTarget,
   3.426 -                                void *				callbackRefcon);
   3.427 -
   3.428 -/*! @function startAllQueues
   3.429 -    @abstract Starts data delivery on all queues for this device.
   3.430 -    @result Returns an IOReturn code.
   3.431 -*/
   3.432 -    IOReturn (*startAllQueues)(void * self);
   3.433 -    
   3.434 -/*! @function stopAllQueues
   3.435 -    @abstract Stops data delivery on all queues for this device.
   3.436 -    @result Returns an IOReturn code.
   3.437 -*/
   3.438 -    IOReturn (*stopAllQueues)(void * self);
   3.439 -
   3.440 -/*! @function allocQueue
   3.441 -    @abstract Wrapper to return instances of the IOHIDQueueInterface. 
   3.442 -    @result Returns the created IOHIDQueueInterface.
   3.443 -*/
   3.444 -    IOHIDQueueInterface ** (*allocQueue) (void *self);
   3.445 -    
   3.446 -/*! @function allocOutputTransaction
   3.447 -    @abstract Wrapper to return instances of the IOHIDOutputTransactionInterface. 
   3.448 -    @result Returns the created IOHIDOutputTransactionInterface.
   3.449 -*/
   3.450 -    IOHIDOutputTransactionInterface ** (*allocOutputTransaction) (void *self);
   3.451 -    
   3.452 -} IOHIDDeviceInterface;
   3.453 -
   3.454 -/*! @class IOHIDDeviceInterface121
   3.455 -    @discussion CFPlugin object subclass which provides the primary interface to
   3.456 -                HID devices.  This class is a subclass of IOHIDDeviceInterface.
   3.457 -*/
   3.458 -typedef struct IOHIDDeviceInterface121
   3.459 -{
   3.460 -
   3.461 -    IUNKNOWN_C_GUTS;
   3.462 -    IOHIDDEVICEINTERFACE_FUNCS_100;
   3.463 -
   3.464 -/*! @function setReport
   3.465 -    @abstract Sends a report to the device.
   3.466 -    @param reportType The report type.
   3.467 -    @param reportID The report id.
   3.468 -    @param reportBuffer Pointer to a preallocated buffer.
   3.469 -    @param reportBufferSize Size of the reportBuffer in bytes.
   3.470 -    @param timeoutMS
   3.471 -    @param callback If null, this method will behave synchronously.
   3.472 -    @param callbackTarget The callback target passed to the callback.
   3.473 -    @param callbackRefcon The callback refcon passed to the callback. 
   3.474 -    @result Returns an IOReturn code.
   3.475 -*/
   3.476 -    IOReturn (*setReport)	(void * 			self,
   3.477 -                                IOHIDReportType			reportType,
   3.478 -                                UInt32				reportID,
   3.479 -                                void *				reportBuffer,
   3.480 -                                UInt32				reportBufferSize,
   3.481 -                                UInt32 				timeoutMS,
   3.482 -                                IOHIDReportCallbackFunction	callback,
   3.483 -                                void * 				callbackTarget,
   3.484 -                                void *				callbackRefcon);
   3.485 -
   3.486 -/*! @function getReport
   3.487 -    @abstract Obtains a report from the device.
   3.488 -    @param reportType The report type.
   3.489 -    @param reportID The report ID.
   3.490 -    @param reportBuffer Pointer to a preallocated buffer.
   3.491 -    @param reportBufferSize Size of the reportBuffer in bytes.  
   3.492 -        When finished, will contain the actual size of the report.
   3.493 -    @param timeoutMS
   3.494 -    @param callback If null, this method will behave synchronously.
   3.495 -    @param callbackTarget The callback target passed to the callback.
   3.496 -    @param callbackRefcon The callback refcon passed to the callback. 
   3.497 -    @result Returns an IOReturn code.
   3.498 -*/
   3.499 -    IOReturn (*getReport)	(void * 			self,
   3.500 -                                IOHIDReportType			reportType,
   3.501 -                                UInt32				reportID,
   3.502 -                                void *				reportBuffer,
   3.503 -                                UInt32 *			reportBufferSize,
   3.504 -                                UInt32 				timeoutMS,
   3.505 -                                IOHIDReportCallbackFunction	callback,
   3.506 -                                void * 				callbackTarget,
   3.507 -                                void *				callbackRefcon);
   3.508 -                                
   3.509 -}IOHIDDeviceInterface121;
   3.510 -
   3.511 -/*! @class IOHIDDeviceInterface122
   3.512 -    @discussion CFPlugin object subclass which provides the primary interface to
   3.513 -                HID devices.  This class is a subclass of IOHIDDeviceInterface121.
   3.514 -*/
   3.515 -typedef struct IOHIDDeviceInterface122
   3.516 -{
   3.517 -
   3.518 -    IUNKNOWN_C_GUTS;
   3.519 -    IOHIDDEVICEINTERFACE_FUNCS_100;
   3.520 -    IOHIDDEVICEINTERFACE_FUNCS_121;
   3.521 -
   3.522 -/*! @function copyMatchingElements
   3.523 -    @abstract Obtains specific elements defined by the device.
   3.524 -    @discussion Using keys defined in IOHIDKeys.h for elements, create a 
   3.525 -            matching dictonary containing items that you wish to search for.  
   3.526 -            A null array indicates that no elements matching that criteria 
   3.527 -            were found. Each item in the array is a reference to the same 
   3.528 -            dictionary item that represents each element in the I/O Registry.
   3.529 -            It is up to the caller to release the returned array of elements. 
   3.530 -    @param matchingDict Dictionary containg key/value pairs to match on.  Pass
   3.531 -            a null value to match on all elements.
   3.532 -    @param elements Pointer to a CFArrayRef that will be returned by this
   3.533 -            method.  It is up to the caller to release it when finished. 
   3.534 -    @result Returns an IOReturn code. 
   3.535 -*/
   3.536 -    IOReturn (*copyMatchingElements)(void * 			self, 
   3.537 -                                CFDictionaryRef 		matchingDict, 
   3.538 -                                CFArrayRef * 			elements);
   3.539 -                                
   3.540 -/*! @function setInterruptReportHandlerCallback
   3.541 -    @abstract Sets the report handler callout to be called when the data 
   3.542 -        is received from the Interrupt-In pipe.
   3.543 -    @discussion In order for this to work correctly, you must call
   3.544 -        createAsyncPort and createAsyncEventSource.
   3.545 -    @param reportBuffer Pointer to a preallocated buffer.
   3.546 -    @param reportBufferSize Size of the reportBuffer in bytes.  
   3.547 -    @param callback If non-NULL, is a callback to be called when data 
   3.548 -        is received from the device.
   3.549 -    @param callbackTarget The callback target passed to the callback
   3.550 -    @param callbackRefcon The callback refcon passed to the callback.
   3.551 -    @result Returns an IOReturn code. 
   3.552 -*/
   3.553 -    IOReturn (*setInterruptReportHandlerCallback)(
   3.554 -                            void * 				self,
   3.555 -                            void *				reportBuffer,
   3.556 -                            UInt32				reportBufferSize, 
   3.557 -                            IOHIDReportCallbackFunction 	callback,
   3.558 -                            void * 				callbackTarget, 
   3.559 -                            void * 				callbackRefcon);
   3.560 -    
   3.561 -}IOHIDDeviceInterface122;
   3.562 -
   3.563 -/*! @class IOHIDQueueInterface
   3.564 -    @discussion CFPlugin object subclass which provides an interface for input
   3.565 -                queues from HID devices. Created by an IOHIDDeviceInterface
   3.566 -                object.
   3.567 -*/
   3.568 -typedef struct IOHIDQueueInterface
   3.569 -{
   3.570 -
   3.571 -    IUNKNOWN_C_GUTS;
   3.572 -
   3.573 -/*! @function createAsyncEventSource
   3.574 -    @abstract Creates an async event source.
   3.575 -    @discussion This will be used with setEventCallout.
   3.576 -    @param source The newly created event source.
   3.577 -    @result Returns an IOReturn code. 
   3.578 -*/
   3.579 -    IOReturn (*createAsyncEventSource)(void * 			self, 
   3.580 -                                        CFRunLoopSourceRef * 	source);
   3.581 -
   3.582 -/*! @function getAsyncEventSource
   3.583 -    @abstract Obtains the current event source.
   3.584 -    @result Returns a CFRunLoopSourceRef.
   3.585 -*/
   3.586 -    CFRunLoopSourceRef (*getAsyncEventSource)(void * self);
   3.587 -
   3.588 -/*! @function createAsyncPort
   3.589 -    @abstract Creates an async port.
   3.590 -    @discussion This will be used with createAsyncEventSource.
   3.591 -    @param port The newly created async port.
   3.592 -    @result Returns an IOReturn code.
   3.593 -*/
   3.594 -    IOReturn (*createAsyncPort)(void * self, mach_port_t * port);
   3.595 -    
   3.596 -/*! @function getAsyncPort
   3.597 -    @abstract Obtains the current async port.
   3.598 -    @result Returns a mach_port_t.
   3.599 -*/
   3.600 -    mach_port_t (*getAsyncPort)(void * self);
   3.601 -    
   3.602 -/*! @function create
   3.603 -    @abstract Creates the current queue. 
   3.604 -    @param flags
   3.605 -    @param depth The maximum number of elements in the queue 
   3.606 -        before the oldest elements in the queue begin to be lost.
   3.607 -    @result Returns an IOReturn code. 
   3.608 -*/
   3.609 -    IOReturn (*create)(void * 			self, 
   3.610 -                        UInt32 			flags,
   3.611 -                        UInt32			depth);
   3.612 -
   3.613 -/*! @function create
   3.614 -    @abstract Disposes of the current queue. 
   3.615 -    @result Returns an IOReturn code. 
   3.616 -*/
   3.617 -    IOReturn (*dispose)(void * self);
   3.618 -    
   3.619 -/*! @function addElement
   3.620 -    @abstract Adds an element to the queue.
   3.621 -    @discussion If the element has already been added to queue,
   3.622 -        an error will be returned.
   3.623 -    @param elementCookie The element of interest. 
   3.624 -    @param flags 
   3.625 -    @result Returns an IOReturn code. 
   3.626 -*/
   3.627 -    IOReturn (*addElement)(void * self,
   3.628 -                           IOHIDElementCookie elementCookie,
   3.629 -                           UInt32 flags);
   3.630 -
   3.631 -/*! @function removeElement
   3.632 -    @abstract Removes an element from the queue.
   3.633 -    @discussion If the element has not been added to queue,
   3.634 -        an error will be returned.
   3.635 -    @param elementCookie The element of interest. 
   3.636 -    @result Returns an IOReturn code. 
   3.637 -*/
   3.638 -    IOReturn (*removeElement)(void * self, IOHIDElementCookie elementCookie);
   3.639 -    
   3.640 -/*! @function hasElement
   3.641 -    @abstract Checks whether an element has been added to 
   3.642 -        the queue.
   3.643 -    @discussion Will return true if present, otherwise will return false.
   3.644 -    @param elementCookie The element of interest. 
   3.645 -    @result Returns a Boolean value. 
   3.646 -*/
   3.647 -    Boolean (*hasElement)(void * self, IOHIDElementCookie elementCookie);
   3.648 -
   3.649 -/*! @function start
   3.650 -    @abstract Starts event delivery to the queue. 
   3.651 -    @result Returns an IOReturn code. 
   3.652 -*/
   3.653 -    IOReturn (*start)(void * self);
   3.654 -    
   3.655 -/*! @function stop
   3.656 -    @abstract Stops event delivery to the queue. 
   3.657 -    @result Returns an IOReturn code. 
   3.658 -*/
   3.659 -    IOReturn (*stop)(void * self);
   3.660 -
   3.661 -/*! @function getNextEvent
   3.662 -    @abstract Reads next event from the queue.
   3.663 -    @param event The event that will be filled.  If a long value is
   3.664 -        present, it is up to the caller to deallocate it.
   3.665 -    @param maxtime UNSUPPORTED.  If non-zero, limits read events to 
   3.666 -        those that occured on or before maxTime.
   3.667 -    @param timoutMS UNSUPPORTED.  The timeout in milliseconds, a zero  
   3.668 -        timeout will cause this call to be non-blocking (returning  
   3.669 -        queue empty) if there is a NULL callback, and blocking forever 
   3.670 -        until the queue is non-empty if there is a valid callback.
   3.671 -    @result Returns an IOReturn code. 
   3.672 -*/
   3.673 -    IOReturn (*getNextEvent)(void * 			self,
   3.674 -                            IOHIDEventStruct *		event,
   3.675 -                            AbsoluteTime		maxTime,
   3.676 -                            UInt32 			timeoutMS);
   3.677 -
   3.678 -/*! @function setEventCallout
   3.679 -    @abstract Sets the event callout to be called when the queue 
   3.680 -        transitions to non-empty.
   3.681 -    @discussion In order for this to work correctly, you must call
   3.682 -        createAsyncPort and createAsyncEventSource.
   3.683 -    @param callback if non-NULL is a callback to be called when data 
   3.684 -        is  inserted to the queue
   3.685 -    @param callbackTarget The callback target passed to the callback
   3.686 -    @param callbackRefcon The callback refcon passed to the callback.
   3.687 -    @result Returns an IOReturn code.
   3.688 -*/
   3.689 -    IOReturn (*setEventCallout)(void * 			self,
   3.690 -                                IOHIDCallbackFunction   callback,
   3.691 -                                void * 			callbackTarget,
   3.692 -                                void *			callbackRefcon);
   3.693 -
   3.694 -/*! @function getEventCallout
   3.695 -    @abstract Gets the event callout.
   3.696 -    @discussion This callback will be called the queue transitions
   3.697 -        to non-empty.
   3.698 -    @param callback if non-NULL is a callback to be called when data 
   3.699 -        is  inserted to the queue
   3.700 -    @param callbackTarget The callback target passed to the callback
   3.701 -    @param callbackRefcon The callback refcon passed to the callback 
   3.702 -    @result Returns an IOReturn code. 
   3.703 -*/
   3.704 -    IOReturn (*getEventCallout)(void * 			self,
   3.705 -                                IOHIDCallbackFunction * outCallback,
   3.706 -                                void ** 		outCallbackTarget,
   3.707 -                                void **			outCallbackRefcon);
   3.708 -} IOHIDQueueInterface;
   3.709 -
   3.710 -/*! @class IOHIDOutputTransactionInterface
   3.711 -    @discussion CFPlugin object subclass which privides interface for output
   3.712 -                transactions to HID devices. Created by a IOHIDDeviceInterface
   3.713 -                object. */
   3.714 -
   3.715 -typedef struct IOHIDOutputTransactionInterface
   3.716 -{
   3.717 -    IUNKNOWN_C_GUTS;
   3.718 -                    
   3.719 -/*! @function createAsyncEventSource
   3.720 -    @abstract Creates an async event source.
   3.721 -    @discussion This will be used with setEventCallout.
   3.722 -    @param source The newly created event source 
   3.723 -    @result Returns an IOReturn code. 
   3.724 -*/
   3.725 -    IOReturn (*createAsyncEventSource)(void * 			self, 
   3.726 -                                        CFRunLoopSourceRef * 	source);
   3.727 -
   3.728 -/*! @function getAsyncEventSource
   3.729 -    @abstract Obtains the current event source.
   3.730 -    @result Returns a CFRunLoopSourceRef.
   3.731 -*/
   3.732 -    CFRunLoopSourceRef (*getAsyncEventSource)(void * self);
   3.733 -
   3.734 -/*! @function createAsyncPort
   3.735 -    @abstract Creates an async port.
   3.736 -    @discussion This will be used with createAsyncEventSource.
   3.737 -    @param port The newly created async port. 
   3.738 -    @result Returns an IOReturn code. 
   3.739 -*/
   3.740 -    IOReturn (*createAsyncPort)(void * self, mach_port_t * port);
   3.741 -    
   3.742 -/*! @function getAsyncPort
   3.743 -    @abstract Obtains the current async port. 
   3.744 -    @result Returns a mach_port_t.
   3.745 -*/
   3.746 -    mach_port_t (*getAsyncPort)(void * self);
   3.747 -    
   3.748 -/*! @function create
   3.749 -    @abstract Creates the current transaction.
   3.750 -    @discussion This method will free any memory that has been
   3.751 -        allocated for this transaction. 
   3.752 -    @result Returns an IOReturn code.
   3.753 -*/
   3.754 -    IOReturn (*create)(void * self);
   3.755 -    
   3.756 -/*! @function dispose
   3.757 -    @abstract Disposes of the current transaction.
   3.758 -    @discussion The transaction will have to be recreated, in order
   3.759 -        to perform any operations on the transaction. 
   3.760 -    @result Returns an IOReturn code. 
   3.761 -*/
   3.762 -    IOReturn (*dispose)(void * self);
   3.763 -    
   3.764 -/*! @function addElement
   3.765 -    @abstract Adds an element to the transaction.
   3.766 -    @discussion If the element has already been added to transaction,
   3.767 -        an error will be returned.
   3.768 -    @param elementCookie The element of interest.
   3.769 -    @result Returns an IOReturn code. 
   3.770 -*/
   3.771 -    IOReturn (*addElement)	(void * self, IOHIDElementCookie elementCookie);
   3.772 -    
   3.773 -/*! @function removeElement
   3.774 -    @abstract Removes an element from the transaction.
   3.775 -    @discussion If the element has not been added to transaction,
   3.776 -        an error will be returned.
   3.777 -    @param elementCookie The element of interest. 
   3.778 -    @result Returns an IOReturn code.
   3.779 -*/
   3.780 -    IOReturn (*removeElement)	(void * self, IOHIDElementCookie elementCookie);
   3.781 -    
   3.782 -/*! @function hasElement
   3.783 -    @abstract Checks whether an element has been added to 
   3.784 -        the transaction.
   3.785 -    @discussion Will return true if present, otherwise will return false.
   3.786 -    @param elementCookie The element of interest. 
   3.787 -    @result Returns a Boolean value. 
   3.788 -*/
   3.789 -    Boolean  (*hasElement)	(void * self, IOHIDElementCookie elementCookie);
   3.790 -    
   3.791 -/*! @function setElementDefault
   3.792 -    @abstract Sets the default value of an element in a 
   3.793 -        transaction.
   3.794 -    @discussion An error will be returned if the element has not been
   3.795 -        added to the transaction.
   3.796 -    @param elementCookie The element of interest. 
   3.797 -    @param valueEvent The event that will be filled.  If a long value is
   3.798 -        present, it will be copied. 
   3.799 -    @result Returns an IOReturn code. 
   3.800 -*/
   3.801 -    IOReturn (*setElementDefault)(void *	 	self,
   3.802 -                                    IOHIDElementCookie	elementCookie,
   3.803 -                                    IOHIDEventStruct *	valueEvent);
   3.804 -    
   3.805 -/*! @function getElementDefault
   3.806 -    @abstract Obtains the default value of an element in a 
   3.807 -        transaction.
   3.808 -    @discussion An error will be returned if the element has not been 
   3.809 -        added to the transaction.
   3.810 -    @param elementCookie The element of interest. 
   3.811 -    @param outValueEvent The event that will be filled.  If a long value is 
   3.812 -        present, it is up to the caller to deallocate it. 
   3.813 -    @result Returns an IOReturn code.
   3.814 -*/
   3.815 -    IOReturn (*getElementDefault)(void *	 	self,
   3.816 -                                    IOHIDElementCookie	elementCookie,
   3.817 -                                    IOHIDEventStruct *	outValueEvent);
   3.818 -    
   3.819 -/*! @function setElementValue
   3.820 -    @abstract Sets the value of an element in a transaction.
   3.821 -    @discussion An error will be returned if the element has not been
   3.822 -        added to the transaction.
   3.823 -    @param elementCookie The element of interest. 
   3.824 -    @param valueEvent The event that will be filled.  If a long value is
   3.825 -        present, it will be copied.
   3.826 -    @result Returns an IOReturn code. 
   3.827 -*/
   3.828 -    IOReturn (*setElementValue)(void *	 		self,
   3.829 -                                IOHIDElementCookie	elementCookie,
   3.830 -                                IOHIDEventStruct *	valueEvent);
   3.831 -    
   3.832 -/*! @function getElementValue
   3.833 -    @abstract Obtains the value of an element in a transaction.
   3.834 -    @discussion An error will be returned if the element has not been 
   3.835 -        added to the transaction.
   3.836 -    @param elementCookie The element of interest. 
   3.837 -    @param outValueEvent The event that will be filled.  If a long value is 
   3.838 -        present, it is up to the caller to deallocate it. 
   3.839 -    @result Returns an IOReturn code.
   3.840 -*/
   3.841 -    IOReturn (*getElementValue)(void *	 		self,
   3.842 -                                IOHIDElementCookie	elementCookie,
   3.843 -                                IOHIDEventStruct *	outValueEvent);
   3.844 -    
   3.845 -/*! @function commit
   3.846 -    @abstract Commits the transaction.
   3.847 -    @discussion Transaction element values, if set, will be sent to the 
   3.848 -        device.  Otherwise, the default element value will be used.  If
   3.849 -        neither are set, that element will be omitted from the commit.
   3.850 -        After a transaction is committed, transaction element values 
   3.851 -        will be cleared.  Default values will be preserved.
   3.852 -    @param timeoutMS UNSUPPORTED
   3.853 -    @param callback UNSUPPORTED
   3.854 -    @param callbackTarget UNSUPPORTED
   3.855 -    @param callbackRefcon UNSUPPORTED 
   3.856 -    @result Returns an IOReturn code.
   3.857 -*/
   3.858 -    IOReturn (*commit)(void * 			self,
   3.859 -                        UInt32 			timeoutMS,
   3.860 -                        IOHIDCallbackFunction   callback,
   3.861 -                        void * 			callbackTarget,
   3.862 -                        void *			callbackRefcon);
   3.863 -    
   3.864 -/*! @function clear
   3.865 -    @abstract Clears the transaction.
   3.866 -    @discussion Transaction element values will cleared.   Default 
   3.867 -        values will be preserved. 
   3.868 -    @result Returns an IOReturn code. 
   3.869 -*/
   3.870 -    IOReturn (*clear)(void * self);
   3.871 -} IOHIDOutputTransactionInterface;
   3.872 -
   3.873 -#endif
   3.874 -
   3.875 -__END_DECLS
   3.876 -
   3.877 -#endif /* !_IOKIT_HID_IOHIDLIB_H_ */
     4.1 --- a/src/joystick/darwin/SDL_sysjoystick.c	Wed Dec 01 12:22:29 2010 -0800
     4.2 +++ b/src/joystick/darwin/SDL_sysjoystick.c	Wed Dec 01 12:23:16 2010 -0800
     4.3 @@ -39,11 +39,7 @@
     4.4  /* The header was moved here in Mac OS X 10.1 */
     4.5  #include <Kernel/IOKit/hidsystem/IOHIDUsageTables.h>
     4.6  #endif
     4.7 -#if MAC_OS_X_VERSION_MIN_REQUIRED == 1030
     4.8 -#include "10.3.9-FIX/IOHIDLib.h"
     4.9 -#else
    4.10  #include <IOKit/hid/IOHIDLib.h>
    4.11 -#endif
    4.12  #include <IOKit/hid/IOHIDKeys.h>
    4.13  #include <CoreFoundation/CoreFoundation.h>
    4.14  #include <Carbon/Carbon.h>      /* for NewPtrClear, DisposePtr */
     5.1 --- a/src/joystick/darwin/SDL_sysjoystick_c.h	Wed Dec 01 12:22:29 2010 -0800
     5.2 +++ b/src/joystick/darwin/SDL_sysjoystick_c.h	Wed Dec 01 12:23:16 2010 -0800
     5.3 @@ -24,11 +24,7 @@
     5.4  #ifndef SDL_JOYSTICK_IOKIT_H
     5.5  
     5.6  
     5.7 -#if MAC_OS_X_VERSION_MIN_REQUIRED == 1030
     5.8 -#include "10.3.9-FIX/IOHIDLib.h"
     5.9 -#else
    5.10  #include <IOKit/hid/IOHIDLib.h>
    5.11 -#endif
    5.12  #include <IOKit/hid/IOHIDKeys.h>
    5.13  
    5.14  
     6.1 --- a/src/video/cocoa/SDL_cocoaclipboard.m	Wed Dec 01 12:22:29 2010 -0800
     6.2 +++ b/src/video/cocoa/SDL_cocoaclipboard.m	Wed Dec 01 12:23:16 2010 -0800
     6.3 @@ -27,9 +27,7 @@
     6.4  static NSString *
     6.5  GetTextFormat(_THIS)
     6.6  {
     6.7 -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
     6.8 -    return NSStringPboardType;
     6.9 -#else
    6.10 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
    6.11      SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
    6.12  
    6.13      if (data->osversion >= 0x1060) {
    6.14 @@ -37,6 +35,8 @@
    6.15      } else {
    6.16          return NSStringPboardType;
    6.17      }
    6.18 +#else
    6.19 +    return NSStringPboardType;
    6.20  #endif
    6.21  }
    6.22  
     7.1 --- a/src/video/cocoa/SDL_cocoaevents.m	Wed Dec 01 12:22:29 2010 -0800
     7.2 +++ b/src/video/cocoa/SDL_cocoaevents.m	Wed Dec 01 12:23:16 2010 -0800
     7.3 @@ -36,11 +36,9 @@
     7.4  #endif
     7.5  
     7.6  /* setAppleMenu disappeared from the headers in 10.4 */
     7.7 -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
     7.8  @interface NSApplication(NSAppleMenu)
     7.9  - (void)setAppleMenu:(NSMenu *)menu;
    7.10  @end
    7.11 -#endif
    7.12  
    7.13  @implementation NSApplication(SDL)
    7.14  - (void)setRunning
     8.1 --- a/src/video/cocoa/SDL_cocoakeyboard.m	Wed Dec 01 12:22:29 2010 -0800
     8.2 +++ b/src/video/cocoa/SDL_cocoakeyboard.m	Wed Dec 01 12:23:16 2010 -0800
     8.3 @@ -171,7 +171,11 @@
     8.4  }
     8.5  
     8.6  /* Needs long instead of NSInteger for compilation on Mac OS X 10.4 */
     8.7 +#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
     8.8  - (long) conversationIdentifier
     8.9 +#else
    8.10 +- (NSInteger) conversationIdentifier
    8.11 +#endif
    8.12  {
    8.13      return (long) self;
    8.14  }
    8.15 @@ -478,7 +482,7 @@
    8.16  static void
    8.17  UpdateKeymap(SDL_VideoData *data)
    8.18  {
    8.19 -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
    8.20 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
    8.21      TISInputSourceRef key_layout;
    8.22  #else
    8.23      KeyboardLayoutRef key_layout;
    8.24 @@ -489,7 +493,7 @@
    8.25      SDLKey keymap[SDL_NUM_SCANCODES];
    8.26  
    8.27      /* See if the keymap needs to be updated */
    8.28 -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
    8.29 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
    8.30      key_layout = TISCopyCurrentKeyboardLayoutInputSource();
    8.31  #else
    8.32      KLGetCurrentKeyboardLayout(&key_layout);
    8.33 @@ -502,7 +506,7 @@
    8.34      SDL_GetDefaultKeymap(keymap);
    8.35  
    8.36      /* Try Unicode data first (preferred as of Mac OS X 10.5) */
    8.37 -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
    8.38 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
    8.39      CFDataRef uchrDataRef = TISGetInputSourceProperty(key_layout, kTISPropertyUnicodeKeyLayoutData);
    8.40      if (uchrDataRef)
    8.41          chr_data = CFDataGetBytePtr(uchrDataRef);
    8.42 @@ -544,7 +548,7 @@
    8.43          return;
    8.44      }
    8.45  
    8.46 -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
    8.47 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
    8.48  cleanup:
    8.49      CFRelease(key_layout);
    8.50  #else
     9.1 --- a/src/video/cocoa/SDL_cocoamodes.m	Wed Dec 01 12:22:29 2010 -0800
     9.2 +++ b/src/video/cocoa/SDL_cocoamodes.m	Wed Dec 01 12:23:16 2010 -0800
     9.3 @@ -23,7 +23,7 @@
     9.4  
     9.5  #include "SDL_cocoavideo.h"
     9.6  
     9.7 -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050
     9.8 +#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
     9.9  /* 
    9.10      Add methods to get at private members of NSScreen. 
    9.11      Since there is a bug in Apple's screen switching code
    9.12 @@ -290,7 +290,7 @@
    9.13  
    9.14      [[NSApp mainWindow] makeKeyAndOrderFront: nil];
    9.15  
    9.16 -#if MAC_OS_X_VERSION_MAX_ALLOWED < 1050
    9.17 +#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
    9.18      /* 
    9.19          There is a bug in Cocoa where NSScreen doesn't synchronize
    9.20          with CGDirectDisplay, so the main screen's frame is wrong.
    10.1 --- a/src/video/cocoa/SDL_cocoaopengl.m	Wed Dec 01 12:22:29 2010 -0800
    10.2 +++ b/src/video/cocoa/SDL_cocoaopengl.m	Wed Dec 01 12:23:16 2010 -0800
    10.3 @@ -36,16 +36,6 @@
    10.4  
    10.5  #define DEFAULT_OPENGL  "/System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib"
    10.6  
    10.7 -/* This is implemented in Mac OS X 10.3 and above */
    10.8 -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3
    10.9 -@implementation NSOpenGLContext(CGLContextAccess)
   10.10 -- (CGLContextObj)CGLContextObj;
   10.11 -{
   10.12 -    return _contextAuxiliary;
   10.13 -}
   10.14 -@end
   10.15 -#endif /* < 10.3 */
   10.16 -
   10.17  int
   10.18  Cocoa_GL_LoadLibrary(_THIS, const char *path)
   10.19  {
   10.20 @@ -180,7 +170,7 @@
   10.21      #endif
   10.22  
   10.23      {
   10.24 -        long cache_max = 64;
   10.25 +        GLint cache_max = 64;
   10.26          CGLContextObj ctx = [context CGLContextObj];
   10.27          CGLSetParameter (ctx, GLI_SUBMIT_FUNC_CACHE_MAX, &cache_max);
   10.28          CGLSetParameter (ctx, GLI_ARRAY_FUNC_CACHE_MAX, &cache_max);
    11.1 --- a/src/video/cocoa/SDL_cocoashape.m	Wed Dec 01 12:22:29 2010 -0800
    11.2 +++ b/src/video/cocoa/SDL_cocoashape.m	Wed Dec 01 12:23:16 2010 -0800
    11.3 @@ -29,7 +29,9 @@
    11.4  Cocoa_CreateShaper(SDL_Window* window) {
    11.5      SDL_WindowData* windata = (SDL_WindowData*)window->driverdata;
    11.6      [windata->nswindow setOpaque:NO];
    11.7 +#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
    11.8      [windata->nswindow setStyleMask:NSBorderlessWindowMask];
    11.9 +#endif
   11.10      SDL_WindowShaper* result = result = malloc(sizeof(SDL_WindowShaper));
   11.11      result->window = window;
   11.12      result->mode.mode = ShapeModeDefault;
    12.1 --- a/src/video/cocoa/SDL_cocoavideo.h	Wed Dec 01 12:22:29 2010 -0800
    12.2 +++ b/src/video/cocoa/SDL_cocoavideo.h	Wed Dec 01 12:23:16 2010 -0800
    12.3 @@ -40,7 +40,7 @@
    12.4  #include "SDL_cocoaopengl.h"
    12.5  #include "SDL_cocoawindow.h"
    12.6  
    12.7 -#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
    12.8 +#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
    12.9  #if __LP64__
   12.10  typedef long NSInteger;
   12.11  typedef unsigned long NSUInteger;
    13.1 --- a/src/video/cocoa/SDL_cocoawindow.h	Wed Dec 01 12:22:29 2010 -0800
    13.2 +++ b/src/video/cocoa/SDL_cocoawindow.h	Wed Dec 01 12:23:16 2010 -0800
    13.3 @@ -29,7 +29,7 @@
    13.4  typedef struct SDL_WindowData SDL_WindowData;
    13.5  
    13.6  /* *INDENT-OFF* */
    13.7 -#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
    13.8 +#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
    13.9  @interface Cocoa_WindowListener : NSResponder <NSWindowDelegate> {
   13.10  #else
   13.11  @interface Cocoa_WindowListener : NSResponder {
    14.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Wed Dec 01 12:22:29 2010 -0800
    14.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Wed Dec 01 12:23:16 2010 -0800
    14.3 @@ -61,7 +61,9 @@
    14.4      [center addObserver:self selector:@selector(windowDidUnhide:) name:NSApplicationDidUnhideNotification object:NSApp];
    14.5  
    14.6      [_data->nswindow setAcceptsMouseMovedEvents:YES];
    14.7 +#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
    14.8      [[_data->nswindow contentView] setAcceptsTouchEvents:YES];
    14.9 +#endif
   14.10  }
   14.11  
   14.12  - (void)close
   14.13 @@ -293,6 +295,7 @@
   14.14  
   14.15  - (void)handleTouches:(cocoaTouchType)type withEvent:(NSEvent *)event
   14.16  {
   14.17 +#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
   14.18      NSSet *touches = 0;
   14.19      NSEnumerator *enumerator;
   14.20      NSTouch *touch;
   14.21 @@ -354,6 +357,7 @@
   14.22          
   14.23          touch = (NSTouch*)[enumerator nextObject];
   14.24      }
   14.25 +#endif /* MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 */
   14.26  }
   14.27  
   14.28  @end