5 // Created by Sam McCall on 4/05/09.
6 // Copyright 2009 University of Otago. All rights reserved.
9 #import <Cocoa/Cocoa.h>
12 @interface Joystick
: NSObject
{
16 NSString
* productName
;
17 IOHIDDeviceRef device
;
18 NSMutableArray
* children
;
22 @
property(readwrite
) int vendorId
;
23 @
property(readwrite
) int productId
;
24 @
property(readwrite
) int index
;
25 @
property(readwrite
, copy
) NSString
* productName
;
26 @
property(readwrite
) IOHIDDeviceRef device
;
27 @
property(readonly
) NSArray
* children
;
28 @
property(readonly
) NSString
* name
;
30 -(void) populateActions
;
32 -(id
) handlerForEvent
: (IOHIDValueRef
) value
;
33 -(id
)initWithDevice
: (IOHIDDeviceRef
) newDevice
;
34 -(JSAction
*) actionForEvent
: (IOHIDValueRef
) value
;