This repository has been archived on 2025-08-18. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Bungloo/Mac/Controller.h
dblugeon 9f308a22ca Close #189
Use NSResourceLoadDelegate to disable the cookie management to avoid
see the timeline via profile view
Thanks to https://github.com/poweruser82
2013-05-13 21:49:44 +02:00

95 lines
3.4 KiB
Objective-C

//
// Controller.h
// bungloo
//
// Created by Jeena on 15.04.10.
// Licence: BSD (see attached LICENCE.txt file).
//
#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>
#import "ViewDelegate.h"
#import <Carbon/Carbon.h>
#import "Constants.h"
#import "AccessToken.h"
#import <Growl/Growl.h>
#import "NSData+Base64.h"
#import "MimeType.h"
@interface Controller : NSObject <GrowlApplicationBridgeDelegate> {
IBOutlet WebView *timelineView;
IBOutlet NSWindow *timelineViewWindow;
NSPanel *openProfileWindow;
NSWindow *loginViewWindow;
NSTextField *loginEntityTextField;
NSProgressIndicator *loginActivityIndicator;
IBOutlet NSMenuItem *globalHotkeyMenuItem;
IBOutlet NSImageView *logoLayer;
ViewDelegate *viewDelegate;
WebView *oauthView;
AccessToken *accessToken;
NSTextField *showProfileTextField;
}
@property (assign) IBOutlet WebView *timelineView;
@property (assign) IBOutlet NSWindow *timelineViewWindow;
@property (assign) IBOutlet NSPanel *openProfileWindow;
@property (assign) IBOutlet NSWindow *loginViewWindow;
@property (assign) IBOutlet NSTextField *loginEntityTextField;
@property (assign) IBOutlet NSProgressIndicator *loginActivityIndicator;
@property (retain, nonatomic) IBOutlet NSMenuItem *globalHotkeyMenuItem;
@property (retain, nonatomic) IBOutlet NSImageView *logoLayer;
@property (retain, nonatomic) IBOutlet ViewDelegate *viewDelegate;
@property (retain, nonatomic) WebView *oauthView;
@property (retain, nonatomic) AccessToken *accessToken;
@property (assign) IBOutlet NSTextField *showProfileTextField;
- (void)initOauth;
- (void)authentificationSucceded:(id)sender;
- (void)authentificationDidNotSucceed:(NSString *)errorMessage;
- (void)initWebViews;
- (void)initHotKeys;
- (void)alertTitle:(NSString *)title withMessage:(NSString *)message;
- (void)openNewMessageWindowInReplyTo:(NSString *)userName statusId:(NSString *)statusId withString:(NSString *)string isPrivate:(BOOL)isPrivate;
- (NSString *)pluginURL;
- (void)handleGetURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent;
- (void)unreadMentions:(int)count;
- (void)notificateUserAboutMention:(NSString *)text fromName:(NSString *)name withPostId:(NSString *)postId andEntity:(NSString *)entity;
- (void)openURL:(NSString *)url;
- (IBAction)showTimeline:(id)sender;
- (IBAction)showMentions:(id)sender;
- (IBAction)showConversation:(id)sender;
- (IBAction)showProfile:(id)sender;
- (IBAction)showSearch:(id)sender;
- (IBAction)showAbout:(id)sender;
- (IBAction)showNext:(id)sender;
- (IBAction)showConversationViewForPostId:(NSString *)postId andEntity:(NSString *)entity;
- (void)notificateViewsAboutDeletedPostWithId:(NSString *)postId byEntity:(NSString*)entity;
- (NSURLRequest *)webView:(WebView *)sender resource:(id)identifier willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse fromDataSource:(WebDataSource *)dataSource;
- (void)setString:(NSString *)string forKey:(NSString *)aKey;
- (void)setSecret:(NSString *)string;
- (NSString *)secret;
- (NSString *)stringForKey:(NSString *)aKey;
- (void)loggedIn;
- (void)stringFromFile:(NSString *)file url: (NSURL **) url content: (NSString **) content;
- (IBAction)login:(id)sender;
- (IBAction)logout:(id)sender;
- (IBAction)showConversationForPostId:(NSString *)postId andEntity:(NSString *)entity;
- (IBAction)clearCache:(id)sender;
OSStatus handler(EventHandlerCallRef nextHandler, EventRef theEvent, void* userData);
@end