-
Notifications
You must be signed in to change notification settings - Fork 0
/
LSStatusBarItem.h
executable file
·80 lines (49 loc) · 2.07 KB
/
LSStatusBarItem.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#import <Foundation/Foundation.h>
typedef NS_ENUM(NSInteger, StatusBarAlignment)
{
StatusBarAlignmentLeft = 1,
StatusBarAlignmentRight = 2,
StatusBarAlignmentCenter = 4
};
// only LSStatusBarItem (API) methods are considered public.
@interface LSStatusBarItem : NSObject
{
@private
NSString* _identifier;
NSMutableDictionary* _properties;
NSMutableSet* _delegates;
BOOL _manualUpdate;
}
@end
// Supported API
@interface LSStatusBarItem (API)
- (id) initWithIdentifier: (NSString*) identifier alignment: (StatusBarAlignment) alignment;
// bitmasks (e.g. left or right) are not supported yet
@property (nonatomic, readonly) StatusBarAlignment alignment;
@property (nonatomic, getter=isVisible) BOOL visible;
// useful only with left/right alignment - will throw error for center alignment
@property (nonatomic, assign) NSString* imageName;
// useful only with center alignment - will throw error otherwise
// will not be visible on the lockscreen
@property (nonatomic, assign) NSString* titleString;
// useful if you want to override the UIStatusBarCustomItemView drawing. Your class must exist in EVERY UIKit process.
@property (nonatomic, assign) NSString* customViewClass;
// set to NO and manually call update if you need to make multiple changes
@property (nonatomic, getter=isManualUpdate) BOOL manualUpdate;
// manually call if manualUpdate = YES
- (void) update;
@end
@interface LSStatusBarItem (Unimplemented)
// leave alone unless you want to limit which apps your icon shows up in
@property (nonatomic, assign) NSString* exclusiveToApp;
// convenience methods?
//@property (nonatomic, getter=isSpringBoardOnly) BOOL springBoardOnly;
//@property (getter=isCurrentAppOnly) BOOL currentAppOnly;
// delegate must respond to @selector(statusBarAction:); only valid from inside of SpringBoard
- (void) addTouchDelegate: (id) delegate;
- (void) removeTouchDelegate: (id) delegate;
@end
@interface LSStatusBarItem (Private)
+ (void) _updateProperties: (NSMutableDictionary*) properties forIdentifier: (NSString*) identifier;
- (void) _setProperties: (NSDictionary*) dict;
@end