-
Notifications
You must be signed in to change notification settings - Fork 421
/
Copy pathSquirrelApplicationDelegate.hh
54 lines (41 loc) · 2.03 KB
/
SquirrelApplicationDelegate.hh
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
#import <Cocoa/Cocoa.h>
@class SquirrelConfig;
@class SquirrelPanel;
@class SquirrelOptionSwitcher;
// Note: the SquirrelApplicationDelegate is instantiated automatically as an
// outlet of NSApp's instance
@interface SquirrelApplicationDelegate : NSObject <NSApplicationDelegate>
typedef NS_ENUM(NSUInteger, SquirrelNotificationPolicy) {
kShowNotificationsNever = 0,
kShowNotificationsWhenAppropriate = 1,
kShowNotificationsAlways = 2
};
typedef uintptr_t RimeSessionId;
@property(nonatomic, weak, nullable) IBOutlet NSMenu* menu;
@property(nonatomic, weak, nullable) IBOutlet SquirrelPanel* panel;
@property(nonatomic, weak, nullable) IBOutlet id updater;
@property(nonatomic, readonly, strong, nullable, direct) SquirrelConfig* config;
@property(nonatomic, readonly, direct)
SquirrelNotificationPolicy showNotifications;
@property(nonatomic, readonly, direct) BOOL problematicLaunchDetected;
@property(nonatomic, direct) BOOL isCurrentInputMethod;
- (IBAction)showSwitcher:(id _Nullable)sender __attribute__((objc_direct));
- (IBAction)deploy:(id _Nullable)sender __attribute__((objc_direct));
- (IBAction)syncUserData:(id _Nullable)sender __attribute__((objc_direct));
- (IBAction)configure:(id _Nullable)sender __attribute__((objc_direct));
- (IBAction)openWiki:(id _Nullable)sender __attribute__((objc_direct));
- (void)setupRime __attribute__((objc_direct));
- (void)startRimeWithFullCheck:(BOOL)fullCheck __attribute__((objc_direct));
- (void)loadSettings __attribute__((objc_direct));
- (void)loadSchemaSpecificSettings:(NSString* _Nonnull)schemaId
withRimeSession:(RimeSessionId)sessionId
__attribute__((objc_direct));
- (void)loadSchemaSpecificLabels:(NSString* _Nonnull)schemaId
__attribute__((objc_direct));
@end // SquirrelApplicationDelegate
@interface NSApplication (SquirrelApp)
@property(nonatomic, strong, readonly, nonnull, direct)
SquirrelApplicationDelegate* squirrelAppDelegate;
@end // NSApplication (SquirrelApp)
// also used in main.m
extern void show_notification(const char* _Nonnull msg_text);