Formal protocol for the interface shared between Joysticks and JSActions, use new...
[enjoyable.git] / Joystick.h
index 4b60ba8..e5566f1 100644 (file)
@@ -6,9 +6,11 @@
 //  Copyright 2009 University of Otago. All rights reserved.
 //
 
+#import "NJActionPathElement.h"
+
 @class JSAction;
 
-@interface Joystick : NSObject
+@interface Joystick : NSObject <NJActionPathElement>
 
 @property (nonatomic, assign) int index;
 @property (nonatomic, copy) NSString *productName;
@@ -18,7 +20,7 @@
 @property (readonly) NSString *uid;
 
 - (id)initWithDevice:(IOHIDDeviceRef)device;
-- (id)handlerForEvent:(IOHIDValueRef)value;
+- (JSAction *)handlerForEvent:(IOHIDValueRef)value;
 - (JSAction *)actionForEvent:(IOHIDValueRef)value;
 
 @end