Rewrote updateMenu/timerUpdate, hopefully it'll work better.
[MenuTunes.git] / OldMainController.h
1 /*
2  *      MenuTunes
3  *  MainController
4  *    App Controller Class
5  *
6  *  Original Author : Kent Sutherland <ksuther@ithinksw.com>
7  *   Responsibility : Kent Sutherland <ksuther@ithinksw.com>
8  *
9  *  Copyright (c) 2002-2003 iThink Software.
10  *  All Rights Reserved
11  *
12  */
13
14
15 #import <Cocoa/Cocoa.h>
16 #import <Carbon/Carbon.h>
17 #import <ITKit/ITKit.h>
18 #import <ITFoundation/ITFoundation.h>
19 #import <ITMTRemote/ITMTRemote.h>
20 #import "PreferencesController.h"
21 #import "StatusWindow.h"
22
23 @interface MainController : NSObject
24 {
25     ITStatusItem   *statusItem;
26     NSMenu         *menu;
27     ITMTRemote     *currentRemote;
28     NSMutableArray *remoteArray;
29     
30     //Used in updating the menu automatically
31     NSTimer *refreshTimer;
32     int      trackInfoIndex;
33     int      lastPlaylistIndex;
34     NSString *lastSongIdentifier;
35     BOOL     isPlayingRadio;
36     
37     ITMTRemotePlayerRunningState isAppRunning;
38     BOOL didHaveAlbumName;
39     BOOL didHaveArtistName; //Helper variable for creating the menu
40     
41     //For upcoming songs
42     NSMenuItem *upcomingSongsItem;
43     NSMenu     *upcomingSongsMenu;
44     
45     //For playlist selection
46     NSMenuItem *playlistItem;
47     NSMenu     *playlistMenu;
48     
49     //For EQ sets
50     NSMenuItem *eqItem;
51     NSMenu     *eqMenu;
52     
53     //For song ratings
54     NSMenuItem *ratingItem;
55     NSMenu *ratingMenu;
56     
57     NSMenuItem *playPauseItem; //Toggle between 'Play' and 'Pause'
58     
59     PreferencesController *prefsController;
60     StatusWindow *statusWindow; //Shows track info and upcoming songs.
61 }
62
63 - (void)applicationLaunched:(NSNotification *)note;
64 - (void)applicationTerminated:(NSNotification *)note;
65
66 - (void)registerDefaults;
67 - (void)rebuildMenu;
68
69 - (void)clearHotKeys;
70 - (void)closePreferences;
71
72 @end