/
XBControl.h
43 lines (34 loc) · 1.01 KB
/
XBControl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// XBControl.h
// Xbox360Mouse
//
// Created by Sherry Wu on 10/2/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import <IOKit/IOKitLib.h>
#import <IOKit/IOCFPlugIn.h>
#import <IOKit/hid/IOHIDLib.h>
#import <IOKit/hid/IOHIDKeys.h>
#import <ForceFeedback/ForceFeedback.h>
#import "DeviceItem.h"
@interface XBControl : NSObject {
// Internal info
mach_port_t masterPort;
NSMutableArray *deviceArray;
IOHIDElementCookie axis[6],buttons[15];
IOHIDDeviceInterface122 **device;
IOHIDQueueInterface **hidQueue;
FFDeviceObjectReference ffDevice;
io_registry_entry_t registryEntry;
int largeMotor,smallMotor;
IONotificationPortRef notifyPort;
CFRunLoopSourceRef notifySource;
io_iterator_t onIteratorWired, offIteratorWired;
io_iterator_t onIteratorWireless, offIteratorWireless;
}
- (id)init;
- (void)eventQueueFired:(void *)sender withResult:(IOReturn)result;
- (void)handleDeviceChange;
- (mach_port_t)masterPort;
@end