35 lines
1.2 KiB
C
35 lines
1.2 KiB
C
|
|
#import <Foundation/Foundation.h>
|
||
|
|
|
||
|
|
NS_ASSUME_NONNULL_BEGIN
|
||
|
|
|
||
|
|
@protocol UITextDocumentProxy;
|
||
|
|
|
||
|
|
@interface KBInputBufferManager : NSObject
|
||
|
|
|
||
|
|
+ (instancetype)shared;
|
||
|
|
|
||
|
|
@property (nonatomic, copy, readonly) NSString *liveText;
|
||
|
|
@property (nonatomic, copy, readonly) NSString *manualSnapshot;
|
||
|
|
@property (nonatomic, copy, readonly) NSString *pendingClearSnapshot;
|
||
|
|
|
||
|
|
- (void)seedIfEmptyWithContextBefore:(nullable NSString *)before after:(nullable NSString *)after;
|
||
|
|
- (void)updateFromExternalContextBefore:(nullable NSString *)before after:(nullable NSString *)after;
|
||
|
|
- (void)refreshFromProxyIfPossible:(nullable id<UITextDocumentProxy>)proxy;
|
||
|
|
- (void)prepareSnapshotForDeleteWithContextBefore:(nullable NSString *)before
|
||
|
|
after:(nullable NSString *)after;
|
||
|
|
- (void)beginPendingClearSnapshot;
|
||
|
|
- (void)clearPendingClearSnapshot;
|
||
|
|
- (void)resetWithText:(NSString *)text;
|
||
|
|
- (void)appendText:(NSString *)text;
|
||
|
|
- (void)deleteBackwardByCount:(NSUInteger)count;
|
||
|
|
- (void)replaceTailWithText:(NSString *)text deleteCount:(NSUInteger)count;
|
||
|
|
- (void)applyHoldDeleteCount:(NSUInteger)count;
|
||
|
|
- (void)applyClearDeleteCount:(NSUInteger)count;
|
||
|
|
- (void)clearAllLiveText;
|
||
|
|
- (void)commitLiveToManual;
|
||
|
|
- (void)restoreManualSnapshot;
|
||
|
|
|
||
|
|
@end
|
||
|
|
|
||
|
|
NS_ASSUME_NONNULL_END
|