Forked Enjoy, mouse movement
[enjoyable.git] / ConfigsController.h
1 //
2 // ConfigsController.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 <Cocoa/Cocoa.h>
10 @class Config;
11 @class TargetController;
12
13 @interface ConfigsController : NSObject {
14 NSMutableArray* configs;
15 IBOutlet NSButton* removeButton;
16 IBOutlet NSTableView* tableView;
17 IBOutlet TargetController* targetController;
18 Config* currentConfig;
19 Config* neutralConfig; /* last config to be manually selected */
20 ProcessSerialNumber attachedApplication;
21 }
22
23 -(IBAction) addPressed: (id)sender;
24 -(IBAction) removePressed: (id)sender;
25 -(void) activateConfig: (Config*)config forApplication: (ProcessSerialNumber*) psn;
26
27 -(NSDictionary*) dumpAll;
28 -(void) loadAllFrom: (NSDictionary*) dict;
29
30 @property(readonly) Config* currentConfig;
31 @property(readonly) Config* currentNeutralConfig;
32 @property(readonly) NSArray* configs;
33 @property(readonly) ProcessSerialNumber* targetApplication;
34 -(void) save;
35 -(void) load;
36
37 -(void) applicationSwitchedTo: (NSString*) name withPsn: (ProcessSerialNumber) psn;
38
39 @end