Show an error message if opening input devices fail. Move real vs. configuration...
[enjoyable.git] / Joystick.h
1 //
2 // Joystick.h
3 // Enjoy
4 //
5 // Created by Sam McCall on 4/05/09.
6 // Copyright 2009 University of Otago. All rights reserved.
7 //
8
9 @class JSAction;
10
11 @interface Joystick : NSObject
12
13 @property (assign) int vendorId;
14 @property (assign) int productId;
15 @property (assign) int index;
16 @property (copy) NSString *productName;
17 @property (assign) IOHIDDeviceRef device;
18 @property (copy) NSArray *children;
19 @property (readonly) NSString *name;
20 @property (readonly) NSString *uid;
21
22 - (id)initWithDevice:(IOHIDDeviceRef)device;
23 - (id)handlerForEvent:(IOHIDValueRef)value;
24 - (JSAction *)actionForEvent:(IOHIDValueRef)value;
25
26 @end