1
This repository has been archived on 2022-08-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Kim Wittenburg 15062dfb27 Archive Project
2017-07-25 17:21:13 +02:00

64 lines
2.9 KiB
Objective-C
Executable File

//
// NYTAppDelegate.h
// Notifications for YouTube
//
// Created by Kim Wittenburg on 09.07.13.
// Copyright (c) 2013 Kim Wittenburg. All rights reserved.
//
@interface NYTAppDelegate : NSObject <NSApplicationDelegate, NSUserNotificationCenterDelegate>
@property (unsafe_unretained) IBOutlet NSWindow *window;
#pragma mark *** Handling the Status Item ***
/* The menu attached to the app's status item. There should be very few reason to change the menu's contents.
*/
@property (weak) IBOutlet NSMenu *statusMenu;
/* This property holds the app's status item if any. Following this definition this property will be nil if there is currently no status item.
*/
@property (readonly, strong) NSStatusItem *statusItem;
/* Use these methods to set and query the state of the app's status item in a secure and safe way.
*/
- (void)setStatusItemVisible:(BOOL)visible;
- (BOOL)isStatusItemVisible;
#pragma mark *** Handling Login ***
/* This property returns YES as long as there is currently a login process running. You may want to observe this property to get notified when the login process finished. This is important because there should be no notifications delivered when the user is about to change.
This property gives no information wether the login process sucessfully finished or was canceled by the user or if an error occured. If you want further information than wether the logging in process is running you must query NYTUpdateManager.
*/
@property (readonly) BOOL loggingIn;
/* This method is triggered from the user interface. It begins a modal sheet that gives the user the possibility to login and thus permit Notifications for YouTube to access the account data. This method does not try to access the user's keychain to query any existing login data. This is handled during applicationDidFinishLaunching:
*/
- (IBAction)login:(id)sender;
#pragma mark *** Handling Refreshing ***
/* Triggers a refresh from the user interface.
ATTENTION: If you attempt to invoke this method on your own note that the sender's window will be used to present errors occured during the update (such as network unavailability). If the sender's window is nil or the sender does not respond to a window property the alerts are displayed application modal. If you do not want any errors to be displayed automatically use NYTUpdateManager.
*/
- (IBAction)performRefresh:(id)sender;
#pragma mark *** Configure Notifications ***
/* Begins a sheet that allows the user to edit the rules which notifications should be shown. This method is triggered from the user interface.
*/
- (IBAction)editRules:(id)sender;
#pragma mark *** Other Actions ***
/* Show application windows. These methods also make Notifications for YouTube the foremost application.
*/
- (IBAction)showPreferenceWindow:(id)sender;
- (IBAction)showAboutPanel:(id)sender;
/* Opens the YouTube website.
*/
- (IBAction)browseYouTube:(id)sender;
@end