-
Notifications
You must be signed in to change notification settings - Fork 0
/
AppController.h
63 lines (47 loc) · 1.44 KB
/
AppController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#import <Cocoa/Cocoa.h>
#import <ApplicationServices/ApplicationServices.h>
#import <Foundation/Foundation.h>
#import "Pasteboard.h"
#import "CoreData.h"
#import "ClipsController.h"
@class ClipsController;
@interface AppController : NSObject {
/* Menu Item */
IBOutlet NSMenu *statusMenu;
NSStatusItem *statusItem;
NSImage *statusImage;
NSImage *statusHighlightImage;
NSBundle *bundle;
/* Pasteboard */
Pasteboard *pasteboard; // the interface to the pasteboard
/* Updates */
NSTimer *timer;
ClipsController *clips;
/* Data */
NSFetchRequest *fetchRequest;
NSEntityDescription *entity;
@public
NSManagedObjectContext *context; // alias for AppDelegate context
}
@property (nonatomic, retain) Pasteboard *pasteboard;
@property (nonatomic, retain) IBOutlet NSMenu *statusMenu;
@property (nonatomic, retain) NSBundle *bundle;
@property (nonatomic, retain) ClipsController *clips;
@property (nonatomic, retain) NSManagedObjectContext *context;
@property (nonatomic, retain) NSFetchRequest *fetchRequest;
@property (nonatomic, retain) NSEntityDescription *entity;
#pragma mark Class methods
/**
* Returns a shared instance (singleton) of this class
*/
+ (AppController *) sharedAppController;
#pragma mark Instance methods
/* interface */
- (void) createStatusMenu;
/* actions */
- (void) updateLoop:(NSTimer *)timer;
- (void) updateMenu;
- (void) addAppAsLoginItem;
- (void) quit;
- (void) gotoweb;
@end