forked from IntelliScape/caffeine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppDelegate.h
executable file
·79 lines (64 loc) · 2.33 KB
/
AppDelegate.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
//
// AppDelegate.h
// Caffeine
//
// Created by Tomas Franzén on 2006-05-20.
// Copyright 2006 Lighthead Software. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>
#import "LCMenuIconView.h"
#import "ISToggleSwitch.h"
#import "Sentry/Sentry.h"
#import "Countly.h"
#import <Keys/CaffeineKeys.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;
IBOutlet NSWindow *accessibilityPermissionWindow;
IBOutlet NSWindow *helpCenterWindow;
IBOutlet NSWindow *feedbackWindow;
IBOutlet NSWindow *donateWindow;
IBOutlet ISToggleSwitch *problemReportSwitch;
IBOutlet NSPopover *problemReportInfoPopover;
IBOutlet NSButton *problemReportInfoPopoverButton;
NSString *webBaseURL;
CaffeineKeys *config;
}
- (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;
-(IBAction)showAccessibilityPrompt:(id)sender;
-(IBAction)launchSupportAccessibility:(id)sender;
-(IBAction)launchHelpCenter:(id)sender;
-(IBAction)launchSupport:(id)sender;
-(IBAction)launchFeedback:(id)sender;
-(IBAction)launchDonate:(id)sender;
-(IBAction)launchSystemPreferences:(id)sender;
-(IBAction)showProblemReportInfoPopoverButton:(id)sender;
@end