forked from ish-app/ish
-
Notifications
You must be signed in to change notification settings - Fork 11
/
UserPreferences.h
62 lines (46 loc) · 1.48 KB
/
UserPreferences.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
//
// UserPreferences.h
// iSH
//
// Created by Charlie Melbye on 11/12/18.
//
#import <Foundation/Foundation.h>
typedef NS_ENUM(NSInteger, CapsLockMapping) {
CapsLockMapNone = 0,
CapsLockMapControl,
CapsLockMapEscape,
};
typedef enum : NSUInteger {
OptionMapNone = 0,
OptionMapEsc,
} OptionMapping;
NS_ASSUME_NONNULL_BEGIN
@interface Theme : NSObject
- (instancetype)initWithProperties:(NSDictionary<NSString *, id> *)props;
- (NSDictionary<NSString *, id> *)properties;
+ (instancetype)presetThemeNamed:(NSString *)name;
+ (NSArray<NSString *> *)presetNames;
- (NSString *)presetName;
@property (nonatomic, readonly) UIColor *foregroundColor;
@property (nonatomic, readonly) UIColor *backgroundColor;
@property (readonly) UIKeyboardAppearance keyboardAppearance;
@property (readonly) UIStatusBarStyle statusBarStyle;
@end
extern NSString *const kThemeForegroundColor;
extern NSString *const kThemeBackgroundColor;
@interface UserPreferences : NSObject
@property CapsLockMapping capsLockMapping;
@property OptionMapping optionMapping;
@property BOOL backtickMapEscape;
@property (nonatomic) Theme *theme;
@property BOOL shouldDisableDimming;
@property NSString *fontFamily;
@property NSNumber *fontSize;
@property NSArray<NSString *> *launchCommand;
@property NSArray<NSString *> *bootCommand;
+ (instancetype)shared;
- (BOOL)hasChangedLaunchCommand;
@end
extern NSString *const kPreferenceLaunchCommandKey;
extern NSString *const kPreferenceBootCommandKey;
NS_ASSUME_NONNULL_END