blob: cb5491a9dbc134e4b8585c5e3c4d1dcd070a0648 [file] [log] [blame]
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERTEXTINPUTDELEGATE_H_
#define SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERTEXTINPUTDELEGATE_H_
#import <Foundation/Foundation.h>
#import "flutter/shell/platform/darwin/ios/framework/Source/FlutterUIPressProxy.h"
typedef NS_ENUM(NSInteger, FlutterTextInputAction) {
FlutterTextInputActionUnspecified,
FlutterTextInputActionDone,
FlutterTextInputActionGo,
FlutterTextInputActionSend,
FlutterTextInputActionSearch,
FlutterTextInputActionNext,
FlutterTextInputActionContinue,
FlutterTextInputActionJoin,
FlutterTextInputActionRoute,
FlutterTextInputActionEmergencyCall,
FlutterTextInputActionNewline,
};
typedef NS_ENUM(NSInteger, FlutterFloatingCursorDragState) {
FlutterFloatingCursorDragStateStart,
FlutterFloatingCursorDragStateUpdate,
FlutterFloatingCursorDragStateEnd,
};
@protocol FlutterTextInputDelegate <NSObject>
- (void)handlePressEvent:(FlutterUIPressProxy*)press
nextAction:(void (^)())next API_AVAILABLE(ios(13.4));
- (void)updateEditingClient:(int)client withState:(NSDictionary*)state;
- (void)updateEditingClient:(int)client withState:(NSDictionary*)state withTag:(NSString*)tag;
- (void)performAction:(FlutterTextInputAction)action withClient:(int)client;
- (void)updateFloatingCursor:(FlutterFloatingCursorDragState)state
withClient:(int)client
withPosition:(NSDictionary*)point;
- (void)showAutocorrectionPromptRectForStart:(NSUInteger)start
end:(NSUInteger)end
withClient:(int)client;
@end
#endif // SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERTEXTINPUTDELEGATE_H_