Cog/Application/AppController.h
Christopher Snowhill 0c8f072deb Cleanup: Massive code cleanup and reorganization
Cleaned up project settings to current defaults, except for the macOS
deployment version, which is still 10.13. Cleaned up a lot of headers
and such to include with angle braces instead of double quotes. Enabled
build sandbox in a lot of places. Disabled subproject signing in several
places, for libraries and frameworks which will be stripped and signed
when they are copied into place in the final build.

Also, while trying to solve compilation issues, the visualization
controller was reverted to the Objective C implementation, which is
probably faster anyway. Stupid Swift/Objective-C language mixing issues.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2025-02-25 23:56:31 -08:00

123 lines
3.2 KiB
Objective-C

/* AppController */
#import <Cocoa/Cocoa.h>
@class FileTreeViewController;
@class PlaybackController;
@class PlaylistController;
@class PlaylistView;
@class PlaylistLoader;
@class PreferencesController;
@interface AppController : NSObject {
IBOutlet NSObjectController *currentEntryController;
IBOutlet PlaybackController *playbackController;
IBOutlet PlaylistController *playlistController;
IBOutlet PlaylistLoader *playlistLoader;
IBOutlet NSWindow *mainWindow;
IBOutlet NSWindow *miniWindow;
IBOutlet NSSplitView *mainView;
IBOutlet NSSegmentedControl *playbackButtons;
IBOutlet NSButton *fileButton;
IBOutlet NSButton *shuffleButton;
IBOutlet NSButton *repeatButton;
IBOutlet NSButton *randomizeButton;
IBOutlet NSTextField *totalTimeField;
IBOutlet PlaylistView *playlistView;
IBOutlet NSMenuItem *showIndexColumn;
IBOutlet NSMenuItem *showTitleColumn;
IBOutlet NSMenuItem *showAlbumArtistColumn;
IBOutlet NSMenuItem *showArtistColumn;
IBOutlet NSMenuItem *showAlbumColumn;
IBOutlet NSMenuItem *showGenreColumn;
IBOutlet NSMenuItem *showPlayCountColumn;
IBOutlet NSMenuItem *showLengthColumn;
IBOutlet NSMenuItem *showTrackColumn;
IBOutlet NSMenuItem *showYearColumn;
IBOutlet NSMenu *dockMenu;
IBOutlet NSMenuItem *currentArtistItem;
IBOutlet NSWindowController *spotlightWindowController;
IBOutlet FileTreeViewController *fileTreeViewController;
IBOutlet PreferencesController *preferencesController;
NSOperationQueue *queue; // Since we are the app delegate, we take care of the op queue
NSMutableSet *expandedNodes;
BOOL miniMode;
}
@property(strong) IBOutlet NSButton *infoButton;
@property(strong) IBOutlet NSButton *infoButtonMini;
- (IBAction)openURL:(id)sender;
- (IBAction)openFiles:(id)sender;
- (IBAction)delEntries:(id)sender;
- (IBAction)savePlaylist:(id)sender;
- (IBAction)openLiberapayPage:(id)sender;
- (IBAction)openPaypalPage:(id)sender;
- (IBAction)openKofiPage:(id)sender;
- (IBAction)openPatreonPage:(id)sender;
- (IBAction)privacyPolicy:(id)sender;
- (IBAction)feedback:(id)sender;
- (void)initDefaults;
// Fun stuff
- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag;
- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename;
- (void)application:(NSApplication *)theApplication openFiles:(NSArray *)filenames;
- (void)registerHotKeys;
- (void)clickPlay;
- (void)clickPause;
- (void)clickStop;
- (void)clickPrev;
- (void)clickNext;
- (void)clickSpam;
- (void)clickSeek:(NSTimeInterval)position;
- (IBAction)increaseFontSize:(id)sender;
- (IBAction)decreaseFontSize:(id)sender;
- (void)changeFontSize:(float)size;
- (void)nodeExpanded:(NSNotification *)notification;
- (void)nodeCollapsed:(NSNotification *)notification;
- (IBAction)toggleMiniMode:(id)sender;
- (IBAction)toggleToolbarStyle:(id)sender;
- (BOOL)pathSuggesterEmpty;
+ (BOOL)globalPathSuggesterEmpty;
- (void)showPathSuggester;
+ (void)globalShowPathSuggester;
- (IBAction)showRubberbandSettings:(id)sender;
+ (void)globalShowRubberbandSettings;
- (IBAction)checkForUpdates:(id)sender;
@property NSWindow *mainWindow;
@property NSWindow *miniWindow;
@property BOOL miniMode;
@property(nonatomic) BOOL floatingMiniWindow;
@end