-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy pathAppDelegate.h
More file actions
executable file
·52 lines (42 loc) · 1.47 KB
/
AppDelegate.h
File metadata and controls
executable file
·52 lines (42 loc) · 1.47 KB
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
//
// AppDelegate.h
// Caffeine
//
// Created by Tomas Franzén on 2006-05-20.
// Copyright 2006 Lighthead Software. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "LCMenuIconView.h"
// Workaround for bug in 64-bit SDK
#ifndef __POWER__
enum {
OverallAct = 0, /* Delays idle sleep by small amount */
UsrActivity = 1, /* Delays idle sleep and dimming by timeout time */
NetActivity = 2, /* Delays idle sleep and power cycling by small amount */
HDActivity = 3, /* Delays hard drive spindown and idle sleep by small amount */
IdleActivity = 4 /* Delays idle sleep by timeout time */
};
extern OSErr UpdateSystemActivity(UInt8 activity);
#endif
@interface AppDelegate : NSObject {
BOOL isActive;
BOOL userSessionIsActive;
NSTimer *timer;
NSTimer *timeoutTimer;
LCMenuIconView *menuView;
IBOutlet NSMenu *menu;
IBOutlet NSWindow *firstTimeWindow;
IBOutlet NSMenuItem *infoMenuItem;
IBOutlet NSMenuItem *infoSeparatorItem;
}
- (IBAction)showAbout:(id)sender;
- (IBAction)showPreferences:(id)sender;
- (IBAction)activateWithTimeout:(id)sender;
- (void)activateWithTimeoutDuration:(NSTimeInterval)interval;
- (void)activate;
- (void)deactivate;
- (BOOL)isActive;
- (void)toggleActive:(id)sender;
- (void)userSessionDidResignActive:(NSNotification *)note;
- (void)userSessionDidBecomeActive:(NSNotification *)note;
@end