Lots of code cleanup, bug fixes.
[MenuTunes.git] / MenuTunes.h
1 /*
2  *      MenuTunes
3  *  MenuTunes
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 <StatusWindow.h>
21
22 //@class MenuTunesView;
23 @class PreferencesController, StatusWindow;
24
25 @interface MenuTunes : NSObject
26 {
27     ITStatusItem *statusItem;
28     NSMenu *menu;
29     ITMTRemote *currentRemote;
30     NSMutableArray *remoteArray;
31     
32     //Used in updating the menu automatically
33     NSTimer *refreshTimer;
34     int trackInfoIndex, lastSongIndex, lastPlaylistIndex;
35     BOOL isPlayingRadio;
36     
37     BOOL isAppRunning;
38     BOOL didHaveAlbumName, didHaveArtistName; //Helper variable for creating the menu
39     
40     //For upcoming songs
41     NSMenuItem *upcomingSongsItem;
42     NSMenu *upcomingSongsMenu;
43     
44     //For playlist selection
45     NSMenuItem *playlistItem;
46     NSMenu *playlistMenu;
47     
48     //For EQ sets
49     NSMenuItem *eqItem;
50     NSMenu *eqMenu;
51     
52     NSMenuItem *playPauseMenuItem; //Toggle between 'Play' and 'Pause'
53     
54     PreferencesController *prefsController;
55     StatusWindow *statusWindow; //Shows track info and upcoming songs.
56 }
57
58 - (void)iTunesLaunched:(NSNotification *)note;
59 - (void)iTunesTerminated:(NSNotification *)note;
60
61 - (void)registerDefaultsIfNeeded;
62 - (void)rebuildMenu;
63 - (void)clearHotKeys;
64 - (void)closePreferences;
65
66 @end