-
Notifications
You must be signed in to change notification settings - Fork 75
/
AppController.h
64 lines (55 loc) · 1.59 KB
/
AppController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#import <Cocoa/Cocoa.h>
//#import <IOBluetooth/IOBluetooth.h>
//#import <IOBluetoothUI/IOBluetoothUI.h>
#import <IOBluetoothUI/objc/IOBluetoothDeviceSelectorController.h>
int thisVersionMajor = 1;
int thisVersionMinor = 5;
typedef enum _BPStatus {
InRange,
OutOfRange
} BPStatus;
@interface AppController : NSObject
{
IOBluetoothDevice *device;
NSTimer *timer;
BPStatus priorStatus;
NSStatusItem *statusItem;
NSImage *outOfRangeImage;
NSImage *outOfRangeAltImage;
NSImage *inRangeImage;
NSImage *inRangeAltImage;
IBOutlet id checkUpdatesOnStartup;
IBOutlet id deviceName;
IBOutlet id inRangeScriptPath;
IBOutlet id monitoringEnabled;
IBOutlet id outOfRangeScriptPath;
IBOutlet id prefsWindow;
IBOutlet id progressIndicator;
IBOutlet id runScriptsOnStartup;
IBOutlet id timerInterval;
}
// AppController methods
- (void)createMenuBar;
- (void)userDefaultsLoad;
- (void)userDefaultsSave;
- (BOOL)isInRange;
- (void)menuIconInRange;
- (void)menuIconOutOfRange;
- (void)runInRangeScript;
- (void)runOutOfRangeScript;
- (void)startMonitoring;
- (void)stopMonitoring;
// UI methods
- (IBAction)changeDevice:(id)sender;
- (IBAction)checkConnectivity:(id)sender;
- (IBAction)checkForUpdates:(id)sender;
- (IBAction)donate:(id)sender;
- (IBAction)enableMonitoring:(id)sender;
- (IBAction)inRangeScriptChange:(id)sender;
- (IBAction)inRangeScriptClear:(id)sender;
- (IBAction)inRangeScriptTest:(id)sender;
- (IBAction)outOfRangeScriptChange:(id)sender;
- (IBAction)outOfRangeScriptClear:(id)sender;
- (IBAction)outOfRangeScriptTest:(id)sender;
- (IBAction)showWindow:(id)sender;
@end