annotate src/joystick/darwin/10.3.9-FIX/IOHIDLib.h @ 2110:21942f552734

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