git.ithinksw.org
/
ITKit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adding API to ITStatusItem for callbacks to get dynamic menus.
[ITKit.git]
/
ITStatusItem.h
diff --git
a/ITStatusItem.h
b/ITStatusItem.h
index
f2f6070
..
7085c78
100644
(file)
--- a/
ITStatusItem.h
+++ b/
ITStatusItem.h
@@
-14,8
+14,14
@@
#import <Cocoa/Cocoa.h>
#import <Cocoa/Cocoa.h>
-@interface ITStatusItem : NSStatusItem {
+@class ITStatusItem;
+
+@protocol ITStatusItemMenuProvider
+- (NSMenu *)menuForStatusItem:(ITStatusItem *)statusItem;
+@end
+@interface ITStatusItem : NSStatusItem {
+ id <ITStatusItemMenuProvider> _menuProvider;
}
- (id)initWithStatusBar:(NSStatusBar *)statusBar withLength:(float)length;
}
- (id)initWithStatusBar:(NSStatusBar *)statusBar withLength:(float)length;
@@
-23,4
+29,7
@@
- (NSImage *)alternateImage;
- (void)setAlternateImage:(NSImage *)image;
- (NSImage *)alternateImage;
- (void)setAlternateImage:(NSImage *)image;
+- (id <ITStatusItemMenuProvider>)menuProvider;
+- (void)setMenuProvider:(id <ITStatusItemMenuProvider>)provider;
+
@end
\ No newline at end of file
@end
\ No newline at end of file