Formal protocol for the interface shared between Joysticks and JSActions, use new...
[enjoyable.git] / JSAction.h
1 //
2 // JSAction.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 #import "NJActionPathElement.h"
10
11 @interface JSAction : NSObject <NJActionPathElement>
12
13 @property (nonatomic, assign) IOHIDElementCookie cookie;
14 @property (nonatomic, copy) NSArray *children;
15 @property (nonatomic, weak) id base;
16 @property (nonatomic, copy) NSString *name;
17 @property (nonatomic, assign) BOOL active;
18 @property (nonatomic, readonly) float magnitude;
19 @property (readonly) NSString *uid;
20
21 - (id)initWithName:(NSString *)newName base:(id <NJActionPathElement>)newBase;
22
23 - (void)notifyEvent:(IOHIDValueRef)value;
24 - (id)findSubActionForValue:(IOHIDValueRef)value;
25
26 @end