forked from rime/squirrel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SquirrelConfig.h
31 lines (22 loc) · 928 Bytes
/
SquirrelConfig.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
#import <Cocoa/Cocoa.h>
typedef NSDictionary<NSString *, NSNumber *> SquirrelAppOptions;
typedef NSMutableDictionary<NSString *, NSNumber *> SquirrelMutableAppOptions;
@interface SquirrelConfig : NSObject
@property(nonatomic, readonly) BOOL isOpen;
@property(nonatomic, readonly) NSString *schemaId;
- (BOOL)openBaseConfig;
- (BOOL)openWithSchemaId:(NSString *)schemaId
baseConfig:(SquirrelConfig *)config;
- (void)close;
- (BOOL)hasSection:(NSString *)section;
- (BOOL)getBool:(NSString *)option;
- (NSInteger)getInt:(NSString *)option;
- (double)getDouble:(NSString *)option;
- (NSNumber *)getOptionalBool:(NSString *)option;
- (NSNumber *)getOptionalInt:(NSString *)option;
- (NSNumber *)getOptionalDouble:(NSString *)option;
- (NSString *)getString:(NSString *)option;
// 0xaabbggrr or 0xbbggrr
- (NSColor *)getColor:(NSString *)option;
- (SquirrelAppOptions *)getAppOptions:(NSString *)appName;
@end