2005-06-02 14:16:43 -04:00
|
|
|
/* AppController */
|
|
|
|
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
|
2006-09-10 17:27:20 -04:00
|
|
|
#import "NDHotKeyEvent.h"
|
2013-10-11 06:09:26 -03:00
|
|
|
#import "NowPlayingBarController.h"
|
2006-09-10 17:27:20 -04:00
|
|
|
|
2013-10-11 07:03:23 -03:00
|
|
|
@class FileTreeViewController;
|
2007-03-08 22:16:06 -03:00
|
|
|
@class PlaybackController;
|
|
|
|
@class PlaylistController;
|
|
|
|
@class PlaylistView;
|
|
|
|
@class AppleRemote;
|
|
|
|
@class PlaylistLoader;
|
2005-06-02 14:16:43 -04:00
|
|
|
|
|
|
|
@interface AppController : NSObject
|
|
|
|
{
|
2013-10-11 06:09:26 -03:00
|
|
|
IBOutlet NSObjectController *currentEntryController;
|
|
|
|
|
2007-02-18 20:41:44 -03:00
|
|
|
IBOutlet PlaybackController *playbackController;
|
2007-03-08 22:16:06 -03:00
|
|
|
|
|
|
|
IBOutlet PlaylistController *playlistController;
|
|
|
|
IBOutlet PlaylistLoader *playlistLoader;
|
2007-02-17 16:33:31 -03:00
|
|
|
|
2007-11-24 17:16:27 -03:00
|
|
|
IBOutlet NSWindow *mainWindow;
|
2013-10-11 06:09:26 -03:00
|
|
|
IBOutlet NSSplitView *mainView;
|
2005-06-05 14:52:35 -04:00
|
|
|
|
2008-01-23 00:03:46 -03:00
|
|
|
IBOutlet NSSegmentedControl *playbackButtons;
|
2005-06-05 14:52:35 -04:00
|
|
|
IBOutlet NSButton *infoButton;
|
2006-09-02 12:09:20 -04:00
|
|
|
IBOutlet NSButton *fileButton;
|
2005-06-05 14:52:35 -04:00
|
|
|
IBOutlet NSButton *shuffleButton;
|
|
|
|
IBOutlet NSButton *repeatButton;
|
2013-10-11 09:27:19 -03:00
|
|
|
IBOutlet NSButton *randomizeButton;
|
2007-11-24 17:16:27 -03:00
|
|
|
|
|
|
|
IBOutlet NSTextField *totalTimeField;
|
2006-04-03 21:08:21 -04:00
|
|
|
|
|
|
|
IBOutlet NSDrawer *infoDrawer;
|
2006-09-02 12:09:20 -04:00
|
|
|
|
2007-02-17 16:33:31 -03:00
|
|
|
IBOutlet PlaylistView *playlistView;
|
|
|
|
|
|
|
|
IBOutlet NSMenuItem *showIndexColumn;
|
|
|
|
IBOutlet NSMenuItem *showTitleColumn;
|
|
|
|
IBOutlet NSMenuItem *showArtistColumn;
|
|
|
|
IBOutlet NSMenuItem *showAlbumColumn;
|
|
|
|
IBOutlet NSMenuItem *showGenreColumn;
|
|
|
|
IBOutlet NSMenuItem *showLengthColumn;
|
|
|
|
IBOutlet NSMenuItem *showTrackColumn;
|
|
|
|
IBOutlet NSMenuItem *showYearColumn;
|
|
|
|
|
2008-02-10 17:34:29 -03:00
|
|
|
IBOutlet NSWindowController *spotlightWindowController;
|
2013-10-11 07:03:23 -03:00
|
|
|
|
|
|
|
IBOutlet FileTreeViewController *fileTreeViewController;
|
2008-02-10 10:48:55 -03:00
|
|
|
|
2006-09-10 17:27:20 -04:00
|
|
|
NDHotKeyEvent *playHotKey;
|
|
|
|
NDHotKeyEvent *prevHotKey;
|
|
|
|
NDHotKeyEvent *nextHotKey;
|
2013-10-04 08:16:09 -03:00
|
|
|
NDHotKeyEvent *spamHotKey;
|
2013-10-11 06:09:26 -03:00
|
|
|
|
|
|
|
NowPlayingBarController *nowPlaying;
|
2007-02-18 20:00:55 -03:00
|
|
|
|
|
|
|
AppleRemote *remote;
|
|
|
|
BOOL remoteButtonHeld; /* true as long as the user holds the left,right,plus or minus on the remote control */
|
2008-03-01 15:29:14 -03:00
|
|
|
|
|
|
|
NSOperationQueue *queue; // Since we are the app delegate, we take care of the op queue
|
2013-10-11 07:03:23 -03:00
|
|
|
|
|
|
|
NSMutableSet* expandedNodes;
|
2005-06-02 14:16:43 -04:00
|
|
|
}
|
2005-06-07 15:28:44 -04:00
|
|
|
|
2007-05-26 10:43:31 -04:00
|
|
|
- (IBAction)openURL:(id)sender;
|
2007-03-01 22:36:52 -03:00
|
|
|
|
2006-09-02 12:09:20 -04:00
|
|
|
- (IBAction)openFiles:(id)sender;
|
2005-06-02 14:16:43 -04:00
|
|
|
- (IBAction)delEntries:(id)sender;
|
|
|
|
- (IBAction)savePlaylist:(id)sender;
|
|
|
|
|
2006-04-03 21:08:21 -04:00
|
|
|
- (IBAction)donate:(id)sender;
|
|
|
|
|
|
|
|
- (IBAction)toggleInfoDrawer:(id)sender;
|
|
|
|
- (void)drawerDidOpen:(NSNotification *)notification;
|
|
|
|
- (void)drawerDidClose:(NSNotification *)notification;
|
|
|
|
|
2008-02-14 18:09:07 -03:00
|
|
|
- (void)initDefaults;
|
|
|
|
|
2006-04-12 23:20:31 -04:00
|
|
|
//Fun stuff
|
2005-06-02 14:16:43 -04:00
|
|
|
- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag;
|
|
|
|
- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename;
|
|
|
|
- (void)application:(NSApplication *)theApplication openFiles:(NSArray *)filenames;
|
|
|
|
|
2006-09-02 12:09:20 -04:00
|
|
|
- (void)registerHotKeys;
|
|
|
|
OSStatus handleHotKey(EventHandlerCallRef nextHandler,EventRef theEvent,void *userData);
|
|
|
|
|
2007-10-03 18:26:39 -04:00
|
|
|
|
|
|
|
- (void)clickPlay;
|
|
|
|
- (void)clickPrev;
|
|
|
|
- (void)clickNext;
|
2013-10-04 08:16:09 -03:00
|
|
|
- (void)clickSpam;
|
2007-10-03 18:26:39 -04:00
|
|
|
|
2008-02-15 12:27:34 -03:00
|
|
|
- (IBAction)increaseFontSize:(id)sender;
|
|
|
|
- (IBAction)decreaseFontSize:(id)sender;
|
|
|
|
- (void)changeFontSize:(float)size;
|
|
|
|
|
2013-10-11 07:03:23 -03:00
|
|
|
- (void)nodeExpanded:(NSNotification*)notification;
|
|
|
|
- (void)nodeCollapsed:(NSNotification*)notification;
|
|
|
|
|
2013-10-11 07:39:57 -03:00
|
|
|
- (void)windowDidEnterFullScreen:(NSNotification *)notification;
|
|
|
|
- (void)windowDidExitFullScreen:(NSNotification *)notification;
|
|
|
|
|
2005-06-02 14:16:43 -04:00
|
|
|
@end
|