Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 65 lines (54 sloc) 2.426 kB
dc5be1c Initial check-in.
uli authored
1 //
2 // UKApplicationListController.h
3 // TalkingMoose (XC2)
4 //
5 // Created by Uli Kusterer on 2005-12-07.
720b0e7 @uliwitness Added licensing information to the source files.
authored
6 // Copyright 2005 Uli Kusterer.
7 //
8 // This software is provided 'as-is', without any express or implied
9 // warranty. In no event will the authors be held liable for any damages
10 // arising from the use of this software.
11 //
12 // Permission is granted to anyone to use this software for any purpose,
13 // including commercial applications, and to alter it and redistribute it
14 // freely, subject to the following restrictions:
15 //
16 // 1. The origin of this software must not be misrepresented; you must not
17 // claim that you wrote the original software. If you use this software
18 // in a product, an acknowledgment in the product documentation would be
19 // appreciated but is not required.
20 //
21 // 2. Altered source versions must be plainly marked as such, and must not be
22 // misrepresented as being the original software.
23 //
24 // 3. This notice may not be removed or altered from any source
25 // distribution.
dc5be1c Initial check-in.
uli authored
26 //
27
28 #import <Cocoa/Cocoa.h>
29
30
31 /*
32 Class that lets the user select applications and keeps a list of them,
33 allowing you to query whether any of those apps is running at the moment,
34 or even frontmost.
35 */
36
37
38 @interface UKApplicationListController : NSObject
39 {
40 IBOutlet NSTableView* applicationListView; // Table to display the apps in.
41 IBOutlet NSButton* addAppButton; // Add a new app to the list.
42 IBOutlet NSButton* removeAppButton; // Delete selected app from the list.
43 NSMutableArray* listOfApplications; // List of NSDictionaries with entries for each app.
44 NSString* autosaveName; // Name to save this list under in prefs.
45 }
46
47 -(BOOL) appInListIsRunning; // If any of the apps in the list are running, returns YES. Ignores mustBeFrontmost flag.
48 -(BOOL) appInListIsFrontmost; // If one of the apps in the list is currently the frontmost app, returns YES. Ignores mustBeFrontmost flag.
49 -(BOOL) appInListMatches; // If a mustBeFrontmost-app is frontmost, or a non-mustBeFrontmost is currently running, returns YES.
50 -(BOOL) screenSaverRunning;
51
52 // Button actions:
53 -(void) addApp: (id)sender;
54 -(void) removeSelectedApp: (id)sender;
55
56 // Name to save list of apps in user defaults:
57 - (NSString*) autosaveName;
58 - (void) setAutosaveName: (NSString*)anAutosaveName;
59
60 // private:
61 -(NSString*) userDefaultsKey;
62 -(void) applicationWillQuit: (NSNotification*)notif;
63
64 @end
Something went wrong with that request. Please try again.