forked from robbiehanson/AlarmClock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAlarmController.h
78 lines (63 loc) · 1.66 KB
/
AlarmController.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
#import <Cocoa/Cocoa.h>
#import "RoundedController.h"
@class Alarm;
@class ITunesData;
@class ITunesPlayer;
@class MTCoreAudioDevice;
#define STATUS_ACTIVE 1
#define STATUS_SNOOZING 2
#define STATUS_TERMINATED 3
#define STATUS_STOPPED 4
@interface AlarmController : NSWindowController <RoundedController>
{
// The alarm to go off
Alarm *lastAlarm;
// For updating the time
NSTimer *timer;
// For playing songs with quicktime and core audio
ITunesData *data;
ITunesPlayer *player;
MTCoreAudioDevice *outputDevice;
// Time when alarm started, or (if snoozing) when it will start again
NSCalendarDate *startTime;
// For displaying the current time
NSDateFormatter *timeFormatter;
// Status of alarm
int alarmStatus;
BOOL isDataReady;
BOOL isPlayerReady;
// Status line control
int statusOffset;
BOOL shouldDisplaySongInfo;
// Lock for threads
NSLock *lock;
// Preferences
BOOL anyKeyStops;
BOOL isDigitalAudio;
int easyWakeDuration;
int snoozeDuration;
int killDuration;
float prefVolume;
float minVolume;
float maxVolume;
// Localized strings
NSString *anyKeyStopStr;
NSString *enterKeySnoozeStr;
NSString *anyKeySnoozeStr;
NSString *enterKeyStopStr;
NSString *snoozingTilStr;
NSString *alarmStartStr;
NSString *alarmKillStr;
NSString *snoozeStr;
NSString *stopStr;
NSString *timeStr;
// Initial system volumes
// This is the volume the system was at before the alarm went off
// We store this, so that after the alarm is stopped, we can restore the system volume for the user
float initialLeftVolume;
float initialRightVolume;
// Interface builder outlets
IBOutlet id roundedView;
}
- (int)alarmStatus;
@end