-
Notifications
You must be signed in to change notification settings - Fork 1
/
MainController.h
executable file
·90 lines (72 loc) · 2.23 KB
/
MainController.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
81
82
83
84
85
86
87
88
89
90
/*
* MenuTunes
* MainController.h
*
* App Controller Class.
*
* Copyright (c) 2002-2003 iThink Software
*
*/
#import <Cocoa/Cocoa.h>
#import <Carbon/Carbon.h>
#import <ITKit/ITKit.h>
#import <ITFoundation/ITFoundation.h>
#import <ITMTRemote/ITMTRemote.h>
#define MT_CURRENT_VERSION 1720
@class StatusWindowController, MenuController, NetworkController;
@interface MainController : NSObject
{
ITStatusItem *statusItem;
NSMutableArray *remoteArray;
ITMTRemote *currentRemote;
ITMTRemotePlayerRunningState playerRunningState;
ITMTRemotePlayerPlaylistClass latestPlaylistClass;
//Used in updating the menu automatically
NSTimer *refreshTimer;
NSString *_latestSongIdentifier, *_toolTip;
NSDictionary *_lastTrackInfo;
StatusWindowController *statusWindowController; //Shows status windows
MenuController *menuController;
NetworkController *networkController;
NSUserDefaults *df;
NSTimer *_statusWindowUpdateTimer, *_audioscrobblerTimer;
BOOL timerUpdating, _checkingForServer, _popped, _open, _needsPolling;
int _timeUpdateCount; //Keeps track of how many times the time has been updated in the info status window
int _audioscrobblerInterval;
NSLock *_serverCheckLock;
}
+ (MainController *)sharedController;
- (void)menuClicked;
- (void)timerUpdate;
- (void)playPause;
- (void)nextSong;
- (void)prevSong;
- (void)fastForward;
- (void)rewind;
- (void)selectPlaylistAtIndex:(int)index;
- (void)selectSongAtIndex:(int)index;
- (void)selectSongRating:(int)rating;
- (void)selectEQPresetAtIndex:(int)index;
- (void)makePlaylistWithTerm:(NSString *)term ofType:(int)type;
- (void)showPlayer;
- (void)showPreferences;
- (void)showTestWindow;
- (void)quitMenuTunes;
//
- (void)setServerStatus:(BOOL)newStatus;
- (int)connectToServer;
- (BOOL)disconnectFromServer;
- (void)checkForRemoteServerAndConnectImmediately:(BOOL)connectImmediately;
- (void)networkError:(NSException *)exception;
//
- (ITMTRemote *)currentRemote;
- (void)clearHotKeys;
- (void)setupHotKeys;
- (void)closePreferences;
- (MenuController *)menuController;
- (void)showCurrentAlbumArt;
- (void)showCurrentTrackInfo;
@end
@interface NSImage (SmoothAdditions)
- (NSImage *)imageScaledSmoothlyToSize:(NSSize)scaledSize;
@end