重构
This commit is contained in:
27
CustomKeyboard/View/KBKeyboardView/KBKeyboardInputHandler.h
Normal file
27
CustomKeyboard/View/KBKeyboardView/KBKeyboardInputHandler.h
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// KBKeyboardInputHandler.h
|
||||
// CustomKeyboard
|
||||
//
|
||||
// Key tap handling helper.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class KBKey;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void (^KBKeyboardActionHandler)(void);
|
||||
typedef void (^KBKeyboardKeyTapHandler)(KBKey *key);
|
||||
|
||||
@interface KBKeyboardInputHandler : NSObject
|
||||
|
||||
@property (nonatomic, copy, nullable) KBKeyboardActionHandler onToggleShift;
|
||||
@property (nonatomic, copy, nullable) KBKeyboardActionHandler onToggleSymbols;
|
||||
@property (nonatomic, copy, nullable) KBKeyboardKeyTapHandler onKeyTapped;
|
||||
|
||||
- (BOOL)handleKeyTap:(KBKey *)key;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Reference in New Issue
Block a user