Improve size in a number of pathological cases.
[enjoyable.git] / Joystick.h
index 587ad3f..1c254a7 100644 (file)
@@ -6,31 +6,19 @@
 //  Copyright 2009 University of Otago. All rights reserved.
 //
 
-#import <Cocoa/Cocoa.h>
 @class JSAction;
 
-@interface Joystick : NSObject {
-       int vendorId;
-       int productId;
-       int index;
-       NSString* productName;
-       IOHIDDeviceRef device;
-       NSMutableArray* children;
-       NSString* name;
-}
+@interface Joystick : NSObject
 
-@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;
+@property (assign) int index;
+@property (copy) NSString *productName;
+@property (assign) IOHIDDeviceRef device;
+@property (copy) NSArray *children;
+@property (readonly) NSString *name;
+@property (readonly) NSString *uid;
 
--(void) populateActions;
--(void) invalidate;
--(id) handlerForEvent: (IOHIDValueRef) value;
--(id)initWithDevice: (IOHIDDeviceRef) newDevice;
--(JSAction*) actionForEvent: (IOHIDValueRef) value;
+- (id)initWithDevice:(IOHIDDeviceRef)device;
+- (id)handlerForEvent:(IOHIDValueRef)value;
+- (JSAction *)actionForEvent:(IOHIDValueRef)value;
 
 @end