-
Notifications
You must be signed in to change notification settings - Fork 127
/
Copy pathPHKeyHandler.h
36 lines (23 loc) · 883 Bytes
/
PHKeyHandler.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
/*
* Phoenix is released under the MIT License. Refer to https://github.com/kasper/phoenix/blob/master/LICENSE.md
*/
@import Foundation;
@import JavaScriptCore;
#import "PHHandler.h"
#import "PHIdentifiableJSExport.h"
@protocol PHKeyHandlerJSExport <JSExport, PHIdentifiableJSExport>
@property(readonly) NSString *key;
@property(readonly) NSArray<NSString *> *modifiers;
#pragma mark - Constructing
- (instancetype)initWithKey:(NSString *)key modifiers:(NSArray<NSString *> *)modifiers callback:(JSValue *)callback;
#pragma mark - Binding
- (BOOL)isEnabled;
- (BOOL)enable;
- (BOOL)disable;
@end
@interface PHKeyHandler : PHHandler <PHKeyHandlerJSExport>
#pragma mark - Initialising
- (instancetype)initWithKey:(NSString *)key
modifiers:(NSArray<NSString *> *)modifiers
callback:(JSValue *)callback NS_DESIGNATED_INITIALIZER;
@end