forked from yujitach/MenuMeters
-
Notifications
You must be signed in to change notification settings - Fork 1
/
MenuMetersMenuExtraBase.h
39 lines (32 loc) · 1.06 KB
/
MenuMetersMenuExtraBase.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
//
// NSMenuExtraBase.h
// MenuMeters
//
// Created by Yuji on 2015/08/01.
//
//
#define CLAMP(v, min, max) MIN(max, MAX(v, min))
#define PREF(type, key) [NSUserDefaults.standardUserDefaults type##ForKey:@#key]
#define kMenuIndentFormat @" %@"
#define kMenuDoubleIndentFormat @" %@"
#define kMenuTripleIndentFormat @" %@"
#import <Foundation/Foundation.h>
#import "AppleUndocumented.h"
@interface MenuMetersMenuExtraBase : NSMenuExtra <NSMenuDelegate>
{
NSStatusItem* statusItem;
NSTimer* updateTimer;
}
- (void)configDisplay:(BOOL)enabled withTimerInterval:(NSTimeInterval)interval;
- (void)timerFired:(id)timer;
@property(nonatomic, readonly) BOOL isMenuVisible;
- (id)getConfigPane;
- (BOOL)enabled;
- (void)configFromPrefs:(id)sender;
- (NSDictionary*)defaults;
- (void)observeValueForKeyPath:(NSString *)keyPath
ofObject:(id)object
change:(NSDictionary *)change
context:(void *)context;
@end
#define NSMenuExtra MenuMetersMenuExtraBase