-
Notifications
You must be signed in to change notification settings - Fork 29
/
PrefsController.h
164 lines (92 loc) · 3.51 KB
/
PrefsController.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
//
// PrefsController.h
// Jiggler
//
// Created by Ben Haller on Wed Jul 23 2003.
// Copyright (c) 2003 Stick Software. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface PrefsController : NSObject
{
// Outlets from Preferences.nib
IBOutlet NSPanel *preferencesWindow;
IBOutlet NSButton *invisibleCloseButton;
IBOutlet NSButton *launchOnLoginCheckbox;
IBOutlet NSSlider *jiggleTimeSlider;
IBOutlet NSTextField *jiggleTimeTextfield;
IBOutlet NSButton *showJigglerIconWhenJigglingButton;
IBOutlet NSMatrix *jiggleOnlyWhenIdleRadio;
IBOutlet NSMatrix *jiggleStyleRadio;
IBOutlet NSSlider *jiggleDistanceSlider;
IBOutlet NSButton *onlyWithCPUUsageCheckbox;
IBOutlet NSSlider *cpuUsageSlider;
IBOutlet NSTextField *cpuUsageTextfield;
IBOutlet NSButton *onlyWithRemovableWritableDisksCheckbox;
IBOutlet NSButton *onlyWithITunesPlayingCheckbox;
IBOutlet NSButton *onlyWithApplicationsNamedXCheckbox;
IBOutlet NSPopUpButton *onlyWithIdentityPopUp;
IBOutlet NSTextField *applicationNameComponentTextfield;
IBOutlet NSButton *notWhenScreenLockedCheckbox;
IBOutlet NSButton *notOnBatteryCheckbox;
IBOutlet NSButton *notWithFrontAppsNamedXCheckbox;
IBOutlet NSTextField *frontAppsNameComponentTextfield;
// Cached values
int jiggleSeconds;
BOOL showJigglerIconWhenJiggling;
BOOL jiggleOnlyWhenIdle;
int jiggleStyle;
float jiggleDistance; // 0 to 20; returned to the client transformed, jiggleDistance * jiggleDistance + 10
BOOL onlyWithCPUUsage;
int cpuUsageThreshold;
BOOL onlyWithRemovableWritableDisks;
BOOL onlyWithITunesPlaying;
BOOL onlyWithApplicationsNamedX;
int onlyWithIdentityTag;
NSString *applicationNameComponent;
NSArray *applicationNameComponents;
BOOL notWhenScreenLocked;
BOOL notOnBattery;
BOOL notWithFrontAppsNamedX;
NSString *frontAppNameComponent;
NSArray *frontAppNameComponents;
}
+ (PrefsController *)sharedPrefsController;
- (void)showWindow;
- (void)closeWindow;
// API for getting specific prefs values
- (int)jiggleSeconds;
- (BOOL)showJigglerIconWhenJiggling;
- (BOOL)jiggleOnlyWhenIdle;
- (int)jiggleStyle; // 0 == standard, 1 == "Zen", 2 == "click jiggle"
- (int)jiggleDistance;
- (BOOL)onlyWithCPUUsage;
- (int)cpuUsageThreshold;
- (BOOL)onlyWithRemovableWritableDisks;
- (BOOL)onlyWithITunesPlaying;
- (BOOL)onlyWithApplicationsNamedX;
- (int)onlyWithIdentityTag; // 0 == app, 1 == process
- (NSArray *)applicationNameComponents;
- (BOOL)notWhenScreenLocked;
- (BOOL)notOnBattery;
- (BOOL)notWithFrontAppsNamedX;
- (NSArray *)frontAppNameComponents;
// Actions and internals
- (IBAction)jiggleTimeChanged:(id)sender;
- (IBAction)showJigglerIconWhenJigglingChanged:(id)sender;
- (IBAction)jiggleOnlyWhenIdleChanged:(id)sender;
- (IBAction)jiggleStyleChanged:(id)sender;
- (IBAction)jiggleDistanceSliderChanged:(id)sender;
- (IBAction)onlyWithCPUUsageChanged:(id)sender;
- (IBAction)cpuUsageSliderChanged:(id)sender;
- (IBAction)onlyWithRemovableWritableDisksChanged:(id)sender;
- (IBAction)onlyWithITunesPlayingChanged:(id)sender;
- (IBAction)onlyWithIdentityPopUpChanged:(id)sender;
- (IBAction)onlyWithApplicationsNamedXChanged:(id)sender;
- (IBAction)notWhenScreenLockedChanged:(id)sender;
- (IBAction)notOnBatteryChanged:(id)sender;
- (IBAction)onlyWithFrontAppsNamedXChanged:(id)sender;
// Launch on Login
- (BOOL)launchOnLogin;
- (void)setLaunchOnLogin:(BOOL)launchOnLogin;
- (IBAction)launchOnLoginChanged:(id)sender;
@end