-
Notifications
You must be signed in to change notification settings - Fork 0
/
AppController.h
80 lines (72 loc) · 2.14 KB
/
AppController.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
//
// AppController.h
// FanRadio
//
// Created by Du Song on 10-6-16.
// Copyright 2010 rollingcode.org. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "DoubanRadio.h"
#import "Growl/Growl.h"
#if USE_SHORTCUT
#import "ShortcutRecorder/ShortcutRecorder.h"
#import "SRRecorderControl+PTKeyCombo.h"
#endif
#import "FRChannelList.h"
#import "FRChannel.h"
#import "SPMediaKeyTap.h"
@interface FanRadioApplication : NSApplication {
}
- (void)sendEvent:(NSEvent *)event;
@end
@interface AppController : NSObject <GrowlApplicationBridgeDelegate> {
XASSIGN NSStatusItem *statusItem;
XASSIGN BOOL pendingPlay;
XASSIGN BOOL useMediaKeys;
XASSIGN NSTimeInterval lastPlayStarted;
XASSIGN FRChannel *currentChannel;
XASSIGN NSMenuItem *lastChannelItem;
SPMediaKeyTap *keyTap;
IBOutlet NSMenu *statusMenu;
IBOutlet NSMenuItem *coverItem;
IBOutlet NSMenuItem *songTitleItem;
IBOutlet NSMenuItem *likeItem;
IBOutlet NSMenuItem *channelsItem;
IBOutlet NSMenuItem *usernameItem;
IBOutlet NSMenuItem *pauseItem;
IBOutlet NSMenuItem *resumeItem;
@public
DoubanRadio *radio;
}
@property (nonatomic, assign) BOOL useMediaKeys;
- (void)markNormal;
- (void)markHappy;
- (void)markBuffer;
- (IBAction)like:(id)sender;
- (IBAction)dislike:(id)sender;
- (IBAction)tuneChannel:(id)sender;
- (IBAction)doShuffle:(id)sender;
- (IBAction)endAndPlayNext:(id)sender;
- (IBAction)openPage:(id)sender;
- (IBAction)openUserPage:(id)sender;
- (IBAction)openPreferences:(id)sender;
- (IBAction)pause:(id)sender;
- (IBAction)resume:(id)sender;
- (void)awakeFromNib;
- (void)updateUser:(NSNotification *)notification;
- (void)updateChannels:(NSNotification *)notification;
- (void)playNext;
- (void)songEnded:(NSNotification *)notification;
- (void)songReady:(NSNotification *)notification;
- (void)songBuffering:(NSNotification *)notification;
- (void)coverLoaded:(NSNotification *)notification;
- (void)dealloc;
#if USE_SHORTCUT
- (void)hitHotKey:(PTHotKey *)hotKey;
#endif
- (NSArray *)feedParametersForUpdater:(id)updater sendingSystemProfile:(BOOL)sendingProfile;
- (NSString *) uiid;
- (void) syncPlayState:(BOOL)isPlaying;
+ (void)initialize;
+ (AppController *) instance;
@end