2005-06-02 18:16:43 +00:00
|
|
|
/* AppController */
|
|
|
|
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
|
2006-09-10 21:27:20 +00:00
|
|
|
#import "NDHotKeyEvent.h"
|
|
|
|
|
2007-03-09 01:16:06 +00:00
|
|
|
@class PlaybackController;
|
|
|
|
@class PlaylistController;
|
|
|
|
@class PlaylistView;
|
|
|
|
@class FileTreeController;
|
|
|
|
@class FileOutlineView;
|
|
|
|
@class AppleRemote;
|
|
|
|
@class PlaylistLoader;
|
|
|
|
|
2005-06-02 18:16:43 +00:00
|
|
|
|
|
|
|
@interface AppController : NSObject
|
|
|
|
{
|
2007-02-18 23:41:44 +00:00
|
|
|
IBOutlet PlaybackController *playbackController;
|
2007-03-09 01:16:06 +00:00
|
|
|
|
|
|
|
IBOutlet PlaylistController *playlistController;
|
|
|
|
IBOutlet PlaylistLoader *playlistLoader;
|
2007-02-17 19:33:31 +00:00
|
|
|
|
2005-09-20 05:13:38 +00:00
|
|
|
IBOutlet NSPanel *mainWindow;
|
2005-06-05 18:52:35 +00:00
|
|
|
|
|
|
|
IBOutlet NSButton *playButton;
|
|
|
|
IBOutlet NSButton *prevButton;
|
|
|
|
IBOutlet NSButton *nextButton;
|
|
|
|
IBOutlet NSButton *infoButton;
|
2006-09-02 16:09:20 +00:00
|
|
|
IBOutlet NSButton *fileButton;
|
2005-06-05 18:52:35 +00:00
|
|
|
IBOutlet NSButton *shuffleButton;
|
|
|
|
IBOutlet NSButton *repeatButton;
|
2006-04-04 01:08:21 +00:00
|
|
|
|
|
|
|
IBOutlet NSDrawer *infoDrawer;
|
2006-09-02 16:09:20 +00:00
|
|
|
IBOutlet NSDrawer *fileDrawer;
|
|
|
|
|
|
|
|
IBOutlet FileTreeController *fileTreeController;
|
2007-02-18 18:59:23 +00:00
|
|
|
IBOutlet FileOutlineView *fileOutlineView;
|
2006-09-10 21:27:20 +00:00
|
|
|
|
2007-02-17 19:33:31 +00: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;
|
|
|
|
|
2006-09-10 21:27:20 +00:00
|
|
|
NDHotKeyEvent *playHotKey;
|
|
|
|
NDHotKeyEvent *prevHotKey;
|
|
|
|
NDHotKeyEvent *nextHotKey;
|
2007-02-18 23:00:55 +00:00
|
|
|
|
|
|
|
AppleRemote *remote;
|
|
|
|
BOOL remoteButtonHeld; /* true as long as the user holds the left,right,plus or minus on the remote control */
|
2005-06-02 18:16:43 +00:00
|
|
|
}
|
2005-06-07 19:28:44 +00:00
|
|
|
|
2007-05-26 14:43:31 +00:00
|
|
|
- (IBAction)openURL:(id)sender;
|
2007-03-02 01:36:52 +00:00
|
|
|
|
2006-09-02 16:09:20 +00:00
|
|
|
- (IBAction)openFiles:(id)sender;
|
2005-06-02 18:16:43 +00:00
|
|
|
- (IBAction)delEntries:(id)sender;
|
|
|
|
- (IBAction)savePlaylist:(id)sender;
|
|
|
|
|
2006-04-04 01:08:21 +00:00
|
|
|
- (IBAction)donate:(id)sender;
|
|
|
|
|
|
|
|
- (IBAction)toggleInfoDrawer:(id)sender;
|
2006-09-02 16:09:20 +00:00
|
|
|
- (IBAction)toggleFileDrawer:(id)sender;
|
2006-04-04 01:08:21 +00:00
|
|
|
- (void)drawerDidOpen:(NSNotification *)notification;
|
|
|
|
- (void)drawerDidClose:(NSNotification *)notification;
|
|
|
|
|
2006-04-13 03:20:31 +00:00
|
|
|
//Fun stuff
|
2005-06-02 18:16:43 +00: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 16:09:20 +00:00
|
|
|
- (void)registerHotKeys;
|
|
|
|
OSStatus handleHotKey(EventHandlerCallRef nextHandler,EventRef theEvent,void *userData);
|
|
|
|
|
2007-10-03 22:26:39 +00:00
|
|
|
|
|
|
|
- (void)clickPlay;
|
|
|
|
- (void)clickPrev;
|
|
|
|
- (void)clickNext;
|
|
|
|
|
2005-06-02 18:16:43 +00:00
|
|
|
@end
|