X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=Joystick.h;fp=Joystick.h;h=587ad3fdc1bcfe7a115bd4229eb16d30eda28779;hp=0000000000000000000000000000000000000000;hb=530009447c5bbd360ac5023979cffc6d32a28df3;hpb=5f07baa8cb03a2f6aa06338bfeb31dad3c3ca29f diff --git a/Joystick.h b/Joystick.h new file mode 100644 index 0000000..587ad3f --- /dev/null +++ b/Joystick.h @@ -0,0 +1,36 @@ +// +// Joystick.h +// Enjoy +// +// Created by Sam McCall on 4/05/09. +// Copyright 2009 University of Otago. All rights reserved. +// + +#import +@class JSAction; + +@interface Joystick : NSObject { + int vendorId; + int productId; + int index; + NSString* productName; + IOHIDDeviceRef device; + NSMutableArray* children; + NSString* name; +} + +@property(readwrite) int vendorId; +@property(readwrite) int productId; +@property(readwrite) int index; +@property(readwrite, copy) NSString* productName; +@property(readwrite) IOHIDDeviceRef device; +@property(readonly) NSArray* children; +@property(readonly) NSString* name; + +-(void) populateActions; +-(void) invalidate; +-(id) handlerForEvent: (IOHIDValueRef) value; +-(id)initWithDevice: (IOHIDDeviceRef) newDevice; +-(JSAction*) actionForEvent: (IOHIDValueRef) value; + +@end