Mercurial > sdl-ios-xcode
annotate src/joystick/darwin/10.3.9-FIX/IOHIDLib.h @ 3359:aecbdf3362c3
Added some debug output to loopwave.c
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sat, 10 Oct 2009 06:32:11 +0000 |
parents | 2c835d58faad |
children |
rev | line source |
---|---|
2120 | 1 /* *INDENT-OFF* */ |
2110
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
2 /* |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
3 * |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
4 * @APPLE_LICENSE_HEADER_START@ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
5 * |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
7 * |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
8 * This file contains Original Code and/or Modifications of Original Code |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
9 * as defined in and that are subject to the Apple Public Source License |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
10 * Version 2.0 (the 'License'). You may not use this file except in |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
11 * compliance with the License. Please obtain a copy of the License at |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
12 * http://www.opensource.apple.com/apsl/ and read it before using this |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
13 * file. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
14 * |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
15 * The Original Code and all software distributed under the License are |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
20 * Please see the License for the specific language governing rights and |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
21 * limitations under the License. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
22 * |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
23 * @APPLE_LICENSE_HEADER_END@ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
24 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
25 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
26 #ifndef _IOKIT_HID_IOHIDLIB_H_ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
27 #define _IOKIT_HID_IOHIDLIB_H_ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
28 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
29 #include <sys/cdefs.h> |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
30 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
31 __BEGIN_DECLS |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
32 #include <CoreFoundation/CoreFoundation.h> |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
33 #if COREFOUNDATION_CFPLUGINCOM_SEPARATE |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
34 #include <CoreFoundation/CFPlugInCOM.h> |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
35 #endif |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
36 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
37 #include <IOKit/IOTypes.h> |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
38 #include <IOKit/IOReturn.h> |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
39 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
40 #include <IOKit/hid/IOHIDKeys.h> |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
41 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
42 struct IOHIDEventStruct |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
43 { |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
44 IOHIDElementType type; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
45 IOHIDElementCookie elementCookie; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
46 SInt32 value; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
47 AbsoluteTime timestamp; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
48 UInt32 longValueSize; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
49 void * longValue; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
50 }; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
51 typedef struct IOHIDEventStruct IOHIDEventStruct; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
52 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
53 /* FA12FA38-6F1A-11D4-BA0C-0005028F18D5 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
54 #define kIOHIDDeviceUserClientTypeID CFUUIDGetConstantUUIDWithBytes(NULL, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
55 0xFA, 0x12, 0xFA, 0x38, 0x6F, 0x1A, 0x11, 0xD4, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
56 0xBA, 0x0C, 0x00, 0x05, 0x02, 0x8F, 0x18, 0xD5) |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
57 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
58 /* 13AA9C44-6F1B-11D4-907C-0005028F18D5 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
59 #define kIOHIDDeviceFactoryID CFUUIDGetConstantUUIDWithBytes(NULL, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
60 0x13, 0xAA, 0x9C, 0x44, 0x6F, 0x1B, 0x11, 0xD4, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
61 0x90, 0x7C, 0x00, 0x05, 0x02, 0x8F, 0x18, 0xD5) |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
62 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
63 /* 78BD420C-6F14-11D4-9474-0005028F18D5 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
64 /*! @defined kIOHIDDeviceInterfaceID |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
65 @discussion Interface ID for the IOHIDDeviceInterface. Corresponds to an |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
66 available HID device. */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
67 #define kIOHIDDeviceInterfaceID CFUUIDGetConstantUUIDWithBytes(NULL, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
68 0x78, 0xBD, 0x42, 0x0C, 0x6F, 0x14, 0x11, 0xD4, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
69 0x94, 0x74, 0x00, 0x05, 0x02, 0x8F, 0x18, 0xD5) |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
70 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
71 /* 7D0B510E-16D5-11D7-9E9B-000393992E38 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
72 /*! @defined kIOHIDDeviceInterfaceID121 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
73 @discussion Interface ID for the IOHIDDeviceInterface121. Corresponds to |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
74 an available HID device that includes methods from |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
75 IOHIDDeviceInterface. This interface is available on |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
76 IOHIDLib 1.2.1 and Mac OS X 10.2.3 or later.*/ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
77 #define kIOHIDDeviceInterfaceID121 CFUUIDGetConstantUUIDWithBytes(NULL, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
78 0x7d, 0xb, 0x51, 0xe, 0x16, 0xd5, 0x11, 0xd7, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
79 0x9e, 0x9b, 0x0, 0x3, 0x93, 0x99, 0x2e, 0x38) |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
80 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
81 /* B70ABF31-16D5-11D7-AB35-000393992E38 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
82 /*! @defined kIOHIDDeviceInterfaceID122 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
83 @discussion Interface ID for the IOHIDDeviceInterface122. Corresponds to |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
84 an available HID device that includes methods from |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
85 IOHIDDeviceInterface and IOHIDDeviceInterface121. This |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
86 interface is available on IOHIDLib 1.2.2 and Mac OS X 10.3 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
87 or later.*/ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
88 #define kIOHIDDeviceInterfaceID122 CFUUIDGetConstantUUIDWithBytes(NULL, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
89 0xb7, 0xa, 0xbf, 0x31, 0x16, 0xd5, 0x11, 0xd7, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
90 0xab, 0x35, 0x0, 0x3, 0x93, 0x99, 0x2e, 0x38) |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
91 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
92 /* 8138629E-6F14-11D4-970E-0005028F18D5 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
93 /*! @defined kIOHIDQueueInterfaceID |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
94 @discussion Interface ID for the kIOHIDQueueInterfaceID. Corresponds to a |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
95 queue for a specific HID device. */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
96 #define kIOHIDQueueInterfaceID CFUUIDGetConstantUUIDWithBytes(NULL, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
97 0x81, 0x38, 0x62, 0x9E, 0x6F, 0x14, 0x11, 0xD4, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
98 0x97, 0x0E, 0x00, 0x05, 0x02, 0x8F, 0x18, 0xD5) |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
99 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
100 /* 80CDCC00-755D-11D4-8E0F-0005028F18D5 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
101 /*! @defined kIOHIDOutputTransactionInterfaceID |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
102 @discussion Interface ID for the kIOHIDOutputTransactionInterfaceID. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
103 Corresponds to an output transaction for one or more report IDs |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
104 on a specific device. */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
105 #define kIOHIDOutputTransactionInterfaceID CFUUIDGetConstantUUIDWithBytes(NULL,\ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
106 0x80, 0xCD, 0xCC, 0x00, 0x75, 0x5D, 0x11, 0xD4, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
107 0x80, 0xEF, 0x00, 0x05, 0x02, 0x8F, 0x18, 0xD5) |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
108 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
109 /*! @typedef IOHIDCallbackFunction |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
110 @discussion Type and arguments of callout C function that is used when a |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
111 completion routine is called, see |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
112 IOHIDLib.h:setRemovalCallback(). |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
113 @param target void * pointer to your data, often a pointer to an object. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
114 @param result Completion result of desired operation. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
115 @param refcon void * pointer to more data. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
116 @param sender Interface instance sending the completion routine. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
117 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
118 typedef void (*IOHIDCallbackFunction) |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
119 (void * target, IOReturn result, void * refcon, void * sender); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
120 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
121 /*! @typedef IOHIDElementCallbackFunction |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
122 @discussion Type and arguments of callout C function that is used when a |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
123 completion routine is called, see IOHIDLib.h:setElementValue(). |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
124 @param target void * pointer to your data, often a pointer to an object. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
125 @param result Completion result of desired operation. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
126 @param refcon void * pointer to more data. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
127 @param sender Interface instance sending the completion routine. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
128 @param elementCookie Element within interface instance sending completion. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
129 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
130 typedef void (*IOHIDElementCallbackFunction) |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
131 (void * target, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
132 IOReturn result, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
133 void * refcon, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
134 void * sender, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
135 IOHIDElementCookie elementCookie); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
136 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
137 /*! @typedef IOHIDReportCallbackFunction |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
138 @discussion Type and arguments of callout C function that is used when a |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
139 completion routine is called, see IOHIDLib.h:setReport(). |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
140 @param target void * pointer to your data, often a pointer to an object. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
141 @param result Completion result of desired operation. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
142 @param refcon void * pointer to more data. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
143 @param sender Interface instance sending the completion routine. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
144 @param bufferSize Size of the buffer received upon completion. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
145 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
146 typedef void (*IOHIDReportCallbackFunction) |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
147 (void * target, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
148 IOReturn result, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
149 void * refcon, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
150 void * sender, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
151 UInt32 bufferSize); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
152 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
153 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
154 /* Forward declarations of the queue and output transaction interfaces */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
155 struct IOHIDQueueInterface; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
156 struct IOHIDOutputTransactionInterface; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
157 typedef struct IOHIDQueueInterface IOHIDQueueInterface; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
158 typedef struct IOHIDOutputTransactionInterface IOHIDOutputTransactionInterface; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
159 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
160 // |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
161 // IOHIDDeviceInterface Functions available in version 1.0 (10.0) and higher of Mac OS X |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
162 // |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
163 #define IOHIDDEVICEINTERFACE_FUNCS_100 \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
164 IOReturn (*createAsyncEventSource)(void * self, CFRunLoopSourceRef * source); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
165 CFRunLoopSourceRef (*getAsyncEventSource)(void * self); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
166 IOReturn (*createAsyncPort)(void * self, mach_port_t * port); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
167 mach_port_t (*getAsyncPort)(void * self); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
168 IOReturn (*open)(void * self, UInt32 flags); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
169 IOReturn (*close)(void * self); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
170 IOReturn (*setRemovalCallback)(void * self, IOHIDCallbackFunction removalCallback, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
171 void * removalTarget, void * removalRefcon); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
172 IOReturn (*getElementValue)(void * self, IOHIDElementCookie elementCookie, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
173 IOHIDEventStruct * valueEvent); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
174 IOReturn (*setElementValue)(void * self, IOHIDElementCookie elementCookie, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
175 IOHIDEventStruct * valueEvent, UInt32 timeoutMS, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
176 IOHIDElementCallbackFunction callback, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
177 void * callbackTarget, void * callbackRefcon); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
178 IOReturn (*queryElementValue)(void * self, IOHIDElementCookie elementCookie, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
179 IOHIDEventStruct * valueEvent, UInt32 timeoutMS, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
180 IOHIDElementCallbackFunction callback, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
181 void * callbackTarget, void * callbackRefcon); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
182 IOReturn (*startAllQueues)(void * self); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
183 IOReturn (*stopAllQueues)(void * self); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
184 IOHIDQueueInterface ** (*allocQueue) (void *self); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
185 IOHIDOutputTransactionInterface ** (*allocOutputTransaction) (void *self) |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
186 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
187 // |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
188 // IOHIDDeviceInterface Functions available in version 1.2.1 (10.2.3) and higher of Mac OS X |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
189 // |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
190 #define IOHIDDEVICEINTERFACE_FUNCS_121 \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
191 IOReturn (*setReport)(void * self, IOHIDReportType reportType, UInt32 reportID, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
192 void * reportBuffer, UInt32 reportBufferSize, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
193 UInt32 timeoutMS, IOHIDReportCallbackFunction callback, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
194 void * callbackTarget, void * callbackRefcon); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
195 IOReturn (*getReport)(void * self, IOHIDReportType reportType, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
196 UInt32 reportID, void * reportBuffer, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
197 UInt32 * reportBufferSize, UInt32 timeoutMS, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
198 IOHIDReportCallbackFunction callback, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
199 void * callbackTarget, void * callbackRefcon) |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
200 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
201 // |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
202 // IOHIDDeviceInterface Functions available in version 1.2.2 (10.3) and higher of Mac OS X |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
203 // |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
204 #define IOHIDDEVICEINTERFACE_FUNCS_122 \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
205 IOReturn (*copyMatchingElements)(void * self, CFDictionaryRef matchingDict, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
206 CFArrayRef * elements); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
207 IOReturn (*setInterruptReportHandlerCallback)(void * self, void * reportBuffer, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
208 UInt32 reportBufferSize, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
209 IOHIDReportCallbackFunction callback, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
210 void * callbackTarget, void * callbackRefcon) |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
211 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
212 typedef struct IOHIDDeviceInterface |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
213 { |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
214 IUNKNOWN_C_GUTS; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
215 IOHIDDEVICEINTERFACE_FUNCS_100; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
216 IOHIDDEVICEINTERFACE_FUNCS_121; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
217 } IOHIDDeviceInterface; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
218 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
219 typedef struct IOHIDDeviceInterface121 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
220 { |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
221 IUNKNOWN_C_GUTS; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
222 IOHIDDEVICEINTERFACE_FUNCS_100; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
223 IOHIDDEVICEINTERFACE_FUNCS_121; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
224 } IOHIDDeviceInterface121; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
225 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
226 typedef struct IOHIDDeviceInterface122 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
227 { |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
228 IUNKNOWN_C_GUTS; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
229 IOHIDDEVICEINTERFACE_FUNCS_100; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
230 IOHIDDEVICEINTERFACE_FUNCS_121; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
231 IOHIDDEVICEINTERFACE_FUNCS_122; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
232 } IOHIDDeviceInterface122; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
233 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
234 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
235 // |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
236 // IOHIDQueueInterface Functions available in version 1.0 (10.0) and higher of Mac OS X |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
237 // |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
238 #define IOHIDQUEUEINTERFACE_FUNCS_100 \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
239 IOReturn (*createAsyncEventSource)(void * self, CFRunLoopSourceRef * source); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
240 CFRunLoopSourceRef (*getAsyncEventSource)(void * self); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
241 IOReturn (*createAsyncPort)(void * self, mach_port_t * port); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
242 mach_port_t (*getAsyncPort)(void * self); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
243 IOReturn (*create)(void * self, UInt32 flags, UInt32 depth); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
244 IOReturn (*dispose)(void * self); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
245 IOReturn (*addElement)(void * self, IOHIDElementCookie elementCookie, UInt32 flags);\ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
246 IOReturn (*removeElement)(void * self, IOHIDElementCookie elementCookie); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
247 Boolean (*hasElement)(void * self, IOHIDElementCookie elementCookie); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
248 IOReturn (*start)(void * self); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
249 IOReturn (*stop)(void * self); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
250 IOReturn (*getNextEvent)(void * self, IOHIDEventStruct * event, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
251 AbsoluteTime maxTime, UInt32 timeoutMS); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
252 IOReturn (*setEventCallout)(void * self, IOHIDCallbackFunction callback, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
253 void * callbackTarget, void * callbackRefcon); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
254 IOReturn (*getEventCallout)(void * self, IOHIDCallbackFunction * outCallback, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
255 void ** outCallbackTarget, void ** outCallbackRefcon) |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
256 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
257 struct IOHIDQueueInterface |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
258 { |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
259 IUNKNOWN_C_GUTS; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
260 IOHIDQUEUEINTERFACE_FUNCS_100; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
261 }; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
262 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
263 // |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
264 // IOHIDOutputTransactionInterface Functions available in version 1.2 (10.2) and higher of Mac OS X |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
265 // |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
266 #define IOHIDOUTPUTTRANSACTIONINTERFACE_FUNCS_120 \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
267 IOReturn (*createAsyncEventSource)(void * self, CFRunLoopSourceRef * source); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
268 CFRunLoopSourceRef (*getAsyncEventSource)(void * self); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
269 IOReturn (*createAsyncPort)(void * self, mach_port_t * port); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
270 mach_port_t (*getAsyncPort)(void * self); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
271 IOReturn (*create)(void * self); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
272 IOReturn (*dispose)(void * self); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
273 IOReturn (*addElement)(void * self, IOHIDElementCookie elementCookie); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
274 IOReturn (*removeElement)(void * self, IOHIDElementCookie elementCookie); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
275 Boolean (*hasElement)(void * self, IOHIDElementCookie elementCookie); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
276 IOReturn (*setElementDefault)(void *self, IOHIDElementCookie elementCookie, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
277 IOHIDEventStruct * valueEvent); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
278 IOReturn (*getElementDefault)(void * self, IOHIDElementCookie elementCookie, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
279 IOHIDEventStruct * outValueEvent); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
280 IOReturn (*setElementValue)(void * self, IOHIDElementCookie elementCookie, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
281 IOHIDEventStruct * valueEvent); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
282 IOReturn (*getElementValue)(void * self, IOHIDElementCookie elementCookie, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
283 IOHIDEventStruct * outValueEvent); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
284 IOReturn (*commit)(void * self, UInt32 timeoutMS, IOHIDCallbackFunction callback, \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
285 void * callbackTarget, void * callbackRefcon); \ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
286 IOReturn (*clear)(void * self) |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
287 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
288 struct IOHIDOutputTransactionInterface |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
289 { |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
290 IUNKNOWN_C_GUTS; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
291 IOHIDOUTPUTTRANSACTIONINTERFACE_FUNCS_120; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
292 }; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
293 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
294 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
295 // |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
296 // BEGIN READABLE STRUCTURE DEFINITIONS |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
297 // |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
298 // This portion of uncompiled code provides a more reader friendly representation of |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
299 // the CFPlugin methods defined above. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
300 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
301 #if 0 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
302 /*! @class IOHIDDeviceInterface |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
303 @discussion CFPlugin object subclass which provides the primary interface to |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
304 HID devices. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
305 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
306 typedef struct IOHIDDeviceInterface |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
307 { |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
308 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
309 IUNKNOWN_C_GUTS; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
310 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
311 /*! @function createAsyncEventSource |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
312 @abstract Creates async eventsource. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
313 @discussion This method will create an async mach port, if one |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
314 has not already been created. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
315 @param source Reference to CFRunLoopSourceRef that is created. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
316 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
317 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
318 IOReturn (*createAsyncEventSource)(void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
319 CFRunLoopSourceRef * source); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
320 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
321 /*! @function getAsyncEventSource |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
322 @abstract Gets the created async event source. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
323 @result Returns a CFRunLoopSourceRef. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
324 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
325 CFRunLoopSourceRef (*getAsyncEventSource)(void * self); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
326 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
327 /*! @function createAsyncPort |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
328 @abstract Creates an async port. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
329 @discussion The port must be created before any callbacks can be used. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
330 @param port Reference to mach port that is created. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
331 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
332 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
333 IOReturn (*createAsyncPort)(void * self, mach_port_t * port); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
334 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
335 /*! @function getAsyncPort |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
336 @abstract Gets the current async port. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
337 @result Returns a mach_port_t. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
338 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
339 mach_port_t (*getAsyncPort)(void * self); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
340 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
341 /*! @function open |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
342 @abstract Opens the device. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
343 @param flags Flags to be passed down to the user client. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
344 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
345 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
346 IOReturn (*open)(void * self, UInt32 flags); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
347 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
348 /*! @function close |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
349 @abstract Closes the device. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
350 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
351 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
352 IOReturn (*close)(void * self); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
353 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
354 /*! @function setRemovalCallback |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
355 @abstract Sets callback to be used when device is removed. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
356 @param removalCallback Called when the device is removed. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
357 @param removeTarget Passed to the callback. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
358 @param removalRefcon Passed to the callback. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
359 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
360 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
361 IOReturn (*setRemovalCallback)(void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
362 IOHIDCallbackFunction removalCallback, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
363 void * removalTarget, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
364 void * removalRefcon); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
365 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
366 /*! @function getElementValue |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
367 @abstract Obtains the most recent value of an element. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
368 @discussion This call is most useful for interrupt driven elements, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
369 such as input type elements. Since feature type element values |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
370 need to be polled from the device, it is recommended to use the |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
371 queryElementValue method to obtain the current value. The |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
372 timestamp field in the event details the last time the element |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
373 value was altered. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
374 @param elementCookie The element of interest. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
375 @param valueEvent The event that will be filled. If a long value is |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
376 present, it is up to the caller to deallocate it. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
377 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
378 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
379 IOReturn (*getElementValue)(void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
380 IOHIDElementCookie elementCookie, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
381 IOHIDEventStruct * valueEvent); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
382 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
383 /*! @function setElementValue |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
384 @abstract Sets an element value on the device. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
385 @discussion This call is most useful for feature type elements. It is |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
386 recommended to use IOOutputTransaction for output type elements. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
387 @param elementCookie The element of interest. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
388 @param valueEvent The event that will be filled. If a long value is |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
389 present, it will be copied. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
390 @param timeoutMS UNSUPPORTED. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
391 @param callback UNSUPPORTED. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
392 @param callbackTarget UNSUPPORTED. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
393 @param callbackRefcon UNSUPPORTED. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
394 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
395 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
396 IOReturn (*setElementValue)(void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
397 IOHIDElementCookie elementCookie, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
398 IOHIDEventStruct * valueEvent, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
399 UInt32 timeoutMS, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
400 IOHIDElementCallbackFunction callback, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
401 void * callbackTarget, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
402 void * callbackRefcon); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
403 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
404 /*! @function queryElementValue |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
405 @abstract Obtains the current value of an element. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
406 @discussion This call is most useful for feature type elements. This |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
407 method will poll the device for the current element value. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
408 @param elementCookie The element of interest. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
409 @param valueEvent The event that will be filled. If a long value is |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
410 present, it is up to the caller to deallocate it. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
411 @param timeoutMS UNSUPPORTED. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
412 @param callback UNSUPPORTED. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
413 @param callbackTarget UNSUPPORTED. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
414 @param callbackRefcon UNSUPPORTED. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
415 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
416 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
417 IOReturn (*queryElementValue)(void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
418 IOHIDElementCookie elementCookie, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
419 IOHIDEventStruct * valueEvent, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
420 UInt32 timeoutMS, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
421 IOHIDElementCallbackFunction callback, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
422 void * callbackTarget, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
423 void * callbackRefcon); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
424 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
425 /*! @function startAllQueues |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
426 @abstract Starts data delivery on all queues for this device. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
427 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
428 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
429 IOReturn (*startAllQueues)(void * self); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
430 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
431 /*! @function stopAllQueues |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
432 @abstract Stops data delivery on all queues for this device. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
433 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
434 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
435 IOReturn (*stopAllQueues)(void * self); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
436 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
437 /*! @function allocQueue |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
438 @abstract Wrapper to return instances of the IOHIDQueueInterface. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
439 @result Returns the created IOHIDQueueInterface. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
440 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
441 IOHIDQueueInterface ** (*allocQueue) (void *self); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
442 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
443 /*! @function allocOutputTransaction |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
444 @abstract Wrapper to return instances of the IOHIDOutputTransactionInterface. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
445 @result Returns the created IOHIDOutputTransactionInterface. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
446 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
447 IOHIDOutputTransactionInterface ** (*allocOutputTransaction) (void *self); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
448 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
449 } IOHIDDeviceInterface; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
450 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
451 /*! @class IOHIDDeviceInterface121 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
452 @discussion CFPlugin object subclass which provides the primary interface to |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
453 HID devices. This class is a subclass of IOHIDDeviceInterface. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
454 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
455 typedef struct IOHIDDeviceInterface121 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
456 { |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
457 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
458 IUNKNOWN_C_GUTS; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
459 IOHIDDEVICEINTERFACE_FUNCS_100; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
460 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
461 /*! @function setReport |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
462 @abstract Sends a report to the device. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
463 @param reportType The report type. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
464 @param reportID The report id. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
465 @param reportBuffer Pointer to a preallocated buffer. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
466 @param reportBufferSize Size of the reportBuffer in bytes. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
467 @param timeoutMS |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
468 @param callback If null, this method will behave synchronously. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
469 @param callbackTarget The callback target passed to the callback. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
470 @param callbackRefcon The callback refcon passed to the callback. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
471 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
472 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
473 IOReturn (*setReport) (void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
474 IOHIDReportType reportType, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
475 UInt32 reportID, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
476 void * reportBuffer, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
477 UInt32 reportBufferSize, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
478 UInt32 timeoutMS, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
479 IOHIDReportCallbackFunction callback, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
480 void * callbackTarget, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
481 void * callbackRefcon); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
482 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
483 /*! @function getReport |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
484 @abstract Obtains a report from the device. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
485 @param reportType The report type. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
486 @param reportID The report ID. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
487 @param reportBuffer Pointer to a preallocated buffer. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
488 @param reportBufferSize Size of the reportBuffer in bytes. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
489 When finished, will contain the actual size of the report. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
490 @param timeoutMS |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
491 @param callback If null, this method will behave synchronously. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
492 @param callbackTarget The callback target passed to the callback. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
493 @param callbackRefcon The callback refcon passed to the callback. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
494 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
495 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
496 IOReturn (*getReport) (void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
497 IOHIDReportType reportType, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
498 UInt32 reportID, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
499 void * reportBuffer, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
500 UInt32 * reportBufferSize, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
501 UInt32 timeoutMS, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
502 IOHIDReportCallbackFunction callback, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
503 void * callbackTarget, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
504 void * callbackRefcon); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
505 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
506 }IOHIDDeviceInterface121; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
507 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
508 /*! @class IOHIDDeviceInterface122 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
509 @discussion CFPlugin object subclass which provides the primary interface to |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
510 HID devices. This class is a subclass of IOHIDDeviceInterface121. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
511 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
512 typedef struct IOHIDDeviceInterface122 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
513 { |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
514 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
515 IUNKNOWN_C_GUTS; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
516 IOHIDDEVICEINTERFACE_FUNCS_100; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
517 IOHIDDEVICEINTERFACE_FUNCS_121; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
518 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
519 /*! @function copyMatchingElements |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
520 @abstract Obtains specific elements defined by the device. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
521 @discussion Using keys defined in IOHIDKeys.h for elements, create a |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
522 matching dictonary containing items that you wish to search for. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
523 A null array indicates that no elements matching that criteria |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
524 were found. Each item in the array is a reference to the same |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
525 dictionary item that represents each element in the I/O Registry. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
526 It is up to the caller to release the returned array of elements. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
527 @param matchingDict Dictionary containg key/value pairs to match on. Pass |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
528 a null value to match on all elements. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
529 @param elements Pointer to a CFArrayRef that will be returned by this |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
530 method. It is up to the caller to release it when finished. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
531 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
532 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
533 IOReturn (*copyMatchingElements)(void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
534 CFDictionaryRef matchingDict, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
535 CFArrayRef * elements); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
536 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
537 /*! @function setInterruptReportHandlerCallback |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
538 @abstract Sets the report handler callout to be called when the data |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
539 is received from the Interrupt-In pipe. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
540 @discussion In order for this to work correctly, you must call |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
541 createAsyncPort and createAsyncEventSource. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
542 @param reportBuffer Pointer to a preallocated buffer. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
543 @param reportBufferSize Size of the reportBuffer in bytes. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
544 @param callback If non-NULL, is a callback to be called when data |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
545 is received from the device. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
546 @param callbackTarget The callback target passed to the callback |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
547 @param callbackRefcon The callback refcon passed to the callback. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
548 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
549 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
550 IOReturn (*setInterruptReportHandlerCallback)( |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
551 void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
552 void * reportBuffer, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
553 UInt32 reportBufferSize, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
554 IOHIDReportCallbackFunction callback, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
555 void * callbackTarget, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
556 void * callbackRefcon); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
557 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
558 }IOHIDDeviceInterface122; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
559 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
560 /*! @class IOHIDQueueInterface |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
561 @discussion CFPlugin object subclass which provides an interface for input |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
562 queues from HID devices. Created by an IOHIDDeviceInterface |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
563 object. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
564 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
565 typedef struct IOHIDQueueInterface |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
566 { |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
567 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
568 IUNKNOWN_C_GUTS; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
569 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
570 /*! @function createAsyncEventSource |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
571 @abstract Creates an async event source. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
572 @discussion This will be used with setEventCallout. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
573 @param source The newly created event source. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
574 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
575 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
576 IOReturn (*createAsyncEventSource)(void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
577 CFRunLoopSourceRef * source); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
578 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
579 /*! @function getAsyncEventSource |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
580 @abstract Obtains the current event source. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
581 @result Returns a CFRunLoopSourceRef. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
582 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
583 CFRunLoopSourceRef (*getAsyncEventSource)(void * self); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
584 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
585 /*! @function createAsyncPort |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
586 @abstract Creates an async port. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
587 @discussion This will be used with createAsyncEventSource. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
588 @param port The newly created async port. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
589 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
590 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
591 IOReturn (*createAsyncPort)(void * self, mach_port_t * port); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
592 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
593 /*! @function getAsyncPort |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
594 @abstract Obtains the current async port. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
595 @result Returns a mach_port_t. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
596 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
597 mach_port_t (*getAsyncPort)(void * self); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
598 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
599 /*! @function create |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
600 @abstract Creates the current queue. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
601 @param flags |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
602 @param depth The maximum number of elements in the queue |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
603 before the oldest elements in the queue begin to be lost. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
604 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
605 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
606 IOReturn (*create)(void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
607 UInt32 flags, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
608 UInt32 depth); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
609 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
610 /*! @function create |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
611 @abstract Disposes of the current queue. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
612 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
613 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
614 IOReturn (*dispose)(void * self); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
615 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
616 /*! @function addElement |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
617 @abstract Adds an element to the queue. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
618 @discussion If the element has already been added to queue, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
619 an error will be returned. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
620 @param elementCookie The element of interest. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
621 @param flags |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
622 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
623 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
624 IOReturn (*addElement)(void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
625 IOHIDElementCookie elementCookie, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
626 UInt32 flags); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
627 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
628 /*! @function removeElement |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
629 @abstract Removes an element from the queue. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
630 @discussion If the element has not been added to queue, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
631 an error will be returned. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
632 @param elementCookie The element of interest. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
633 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
634 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
635 IOReturn (*removeElement)(void * self, IOHIDElementCookie elementCookie); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
636 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
637 /*! @function hasElement |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
638 @abstract Checks whether an element has been added to |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
639 the queue. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
640 @discussion Will return true if present, otherwise will return false. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
641 @param elementCookie The element of interest. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
642 @result Returns a Boolean value. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
643 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
644 Boolean (*hasElement)(void * self, IOHIDElementCookie elementCookie); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
645 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
646 /*! @function start |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
647 @abstract Starts event delivery to the queue. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
648 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
649 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
650 IOReturn (*start)(void * self); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
651 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
652 /*! @function stop |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
653 @abstract Stops event delivery to the queue. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
654 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
655 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
656 IOReturn (*stop)(void * self); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
657 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
658 /*! @function getNextEvent |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
659 @abstract Reads next event from the queue. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
660 @param event The event that will be filled. If a long value is |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
661 present, it is up to the caller to deallocate it. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
662 @param maxtime UNSUPPORTED. If non-zero, limits read events to |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
663 those that occured on or before maxTime. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
664 @param timoutMS UNSUPPORTED. The timeout in milliseconds, a zero |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
665 timeout will cause this call to be non-blocking (returning |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
666 queue empty) if there is a NULL callback, and blocking forever |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
667 until the queue is non-empty if there is a valid callback. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
668 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
669 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
670 IOReturn (*getNextEvent)(void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
671 IOHIDEventStruct * event, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
672 AbsoluteTime maxTime, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
673 UInt32 timeoutMS); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
674 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
675 /*! @function setEventCallout |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
676 @abstract Sets the event callout to be called when the queue |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
677 transitions to non-empty. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
678 @discussion In order for this to work correctly, you must call |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
679 createAsyncPort and createAsyncEventSource. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
680 @param callback if non-NULL is a callback to be called when data |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
681 is inserted to the queue |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
682 @param callbackTarget The callback target passed to the callback |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
683 @param callbackRefcon The callback refcon passed to the callback. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
684 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
685 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
686 IOReturn (*setEventCallout)(void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
687 IOHIDCallbackFunction callback, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
688 void * callbackTarget, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
689 void * callbackRefcon); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
690 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
691 /*! @function getEventCallout |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
692 @abstract Gets the event callout. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
693 @discussion This callback will be called the queue transitions |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
694 to non-empty. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
695 @param callback if non-NULL is a callback to be called when data |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
696 is inserted to the queue |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
697 @param callbackTarget The callback target passed to the callback |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
698 @param callbackRefcon The callback refcon passed to the callback |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
699 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
700 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
701 IOReturn (*getEventCallout)(void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
702 IOHIDCallbackFunction * outCallback, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
703 void ** outCallbackTarget, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
704 void ** outCallbackRefcon); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
705 } IOHIDQueueInterface; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
706 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
707 /*! @class IOHIDOutputTransactionInterface |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
708 @discussion CFPlugin object subclass which privides interface for output |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
709 transactions to HID devices. Created by a IOHIDDeviceInterface |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
710 object. */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
711 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
712 typedef struct IOHIDOutputTransactionInterface |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
713 { |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
714 IUNKNOWN_C_GUTS; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
715 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
716 /*! @function createAsyncEventSource |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
717 @abstract Creates an async event source. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
718 @discussion This will be used with setEventCallout. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
719 @param source The newly created event source |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
720 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
721 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
722 IOReturn (*createAsyncEventSource)(void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
723 CFRunLoopSourceRef * source); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
724 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
725 /*! @function getAsyncEventSource |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
726 @abstract Obtains the current event source. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
727 @result Returns a CFRunLoopSourceRef. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
728 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
729 CFRunLoopSourceRef (*getAsyncEventSource)(void * self); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
730 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
731 /*! @function createAsyncPort |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
732 @abstract Creates an async port. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
733 @discussion This will be used with createAsyncEventSource. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
734 @param port The newly created async port. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
735 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
736 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
737 IOReturn (*createAsyncPort)(void * self, mach_port_t * port); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
738 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
739 /*! @function getAsyncPort |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
740 @abstract Obtains the current async port. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
741 @result Returns a mach_port_t. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
742 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
743 mach_port_t (*getAsyncPort)(void * self); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
744 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
745 /*! @function create |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
746 @abstract Creates the current transaction. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
747 @discussion This method will free any memory that has been |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
748 allocated for this transaction. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
749 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
750 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
751 IOReturn (*create)(void * self); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
752 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
753 /*! @function dispose |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
754 @abstract Disposes of the current transaction. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
755 @discussion The transaction will have to be recreated, in order |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
756 to perform any operations on the transaction. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
757 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
758 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
759 IOReturn (*dispose)(void * self); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
760 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
761 /*! @function addElement |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
762 @abstract Adds an element to the transaction. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
763 @discussion If the element has already been added to transaction, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
764 an error will be returned. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
765 @param elementCookie The element of interest. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
766 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
767 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
768 IOReturn (*addElement) (void * self, IOHIDElementCookie elementCookie); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
769 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
770 /*! @function removeElement |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
771 @abstract Removes an element from the transaction. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
772 @discussion If the element has not been added to transaction, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
773 an error will be returned. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
774 @param elementCookie The element of interest. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
775 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
776 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
777 IOReturn (*removeElement) (void * self, IOHIDElementCookie elementCookie); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
778 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
779 /*! @function hasElement |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
780 @abstract Checks whether an element has been added to |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
781 the transaction. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
782 @discussion Will return true if present, otherwise will return false. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
783 @param elementCookie The element of interest. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
784 @result Returns a Boolean value. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
785 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
786 Boolean (*hasElement) (void * self, IOHIDElementCookie elementCookie); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
787 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
788 /*! @function setElementDefault |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
789 @abstract Sets the default value of an element in a |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
790 transaction. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
791 @discussion An error will be returned if the element has not been |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
792 added to the transaction. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
793 @param elementCookie The element of interest. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
794 @param valueEvent The event that will be filled. If a long value is |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
795 present, it will be copied. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
796 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
797 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
798 IOReturn (*setElementDefault)(void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
799 IOHIDElementCookie elementCookie, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
800 IOHIDEventStruct * valueEvent); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
801 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
802 /*! @function getElementDefault |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
803 @abstract Obtains the default value of an element in a |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
804 transaction. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
805 @discussion An error will be returned if the element has not been |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
806 added to the transaction. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
807 @param elementCookie The element of interest. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
808 @param outValueEvent The event that will be filled. If a long value is |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
809 present, it is up to the caller to deallocate it. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
810 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
811 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
812 IOReturn (*getElementDefault)(void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
813 IOHIDElementCookie elementCookie, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
814 IOHIDEventStruct * outValueEvent); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
815 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
816 /*! @function setElementValue |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
817 @abstract Sets the value of an element in a transaction. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
818 @discussion An error will be returned if the element has not been |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
819 added to the transaction. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
820 @param elementCookie The element of interest. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
821 @param valueEvent The event that will be filled. If a long value is |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
822 present, it will be copied. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
823 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
824 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
825 IOReturn (*setElementValue)(void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
826 IOHIDElementCookie elementCookie, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
827 IOHIDEventStruct * valueEvent); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
828 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
829 /*! @function getElementValue |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
830 @abstract Obtains the value of an element in a transaction. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
831 @discussion An error will be returned if the element has not been |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
832 added to the transaction. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
833 @param elementCookie The element of interest. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
834 @param outValueEvent The event that will be filled. If a long value is |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
835 present, it is up to the caller to deallocate it. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
836 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
837 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
838 IOReturn (*getElementValue)(void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
839 IOHIDElementCookie elementCookie, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
840 IOHIDEventStruct * outValueEvent); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
841 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
842 /*! @function commit |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
843 @abstract Commits the transaction. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
844 @discussion Transaction element values, if set, will be sent to the |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
845 device. Otherwise, the default element value will be used. If |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
846 neither are set, that element will be omitted from the commit. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
847 After a transaction is committed, transaction element values |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
848 will be cleared. Default values will be preserved. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
849 @param timeoutMS UNSUPPORTED |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
850 @param callback UNSUPPORTED |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
851 @param callbackTarget UNSUPPORTED |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
852 @param callbackRefcon UNSUPPORTED |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
853 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
854 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
855 IOReturn (*commit)(void * self, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
856 UInt32 timeoutMS, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
857 IOHIDCallbackFunction callback, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
858 void * callbackTarget, |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
859 void * callbackRefcon); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
860 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
861 /*! @function clear |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
862 @abstract Clears the transaction. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
863 @discussion Transaction element values will cleared. Default |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
864 values will be preserved. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
865 @result Returns an IOReturn code. |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
866 */ |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
867 IOReturn (*clear)(void * self); |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
868 } IOHIDOutputTransactionInterface; |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
869 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
870 #endif |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
871 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
872 __END_DECLS |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
873 |
21942f552734
Fixed build issues on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
874 #endif /* !_IOKIT_HID_IOHIDLIB_H_ */ |