Flutter Engine
FlutterTextInputDelegate.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERTEXTINPUTDELEGATE_H_
6 #define SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERTEXTINPUTDELEGATE_H_
7 
8 #import <Foundation/Foundation.h>
9 #import "flutter/shell/platform/darwin/ios/framework/Source/FlutterUIPressProxy.h"
10 
11 typedef NS_ENUM(NSInteger, FlutterTextInputAction) {
12  FlutterTextInputActionUnspecified,
13  FlutterTextInputActionDone,
14  FlutterTextInputActionGo,
15  FlutterTextInputActionSend,
16  FlutterTextInputActionSearch,
17  FlutterTextInputActionNext,
18  FlutterTextInputActionContinue,
19  FlutterTextInputActionJoin,
20  FlutterTextInputActionRoute,
21  FlutterTextInputActionEmergencyCall,
22  FlutterTextInputActionNewline,
23 };
24 
25 typedef NS_ENUM(NSInteger, FlutterFloatingCursorDragState) {
26  FlutterFloatingCursorDragStateStart,
27  FlutterFloatingCursorDragStateUpdate,
28  FlutterFloatingCursorDragStateEnd,
29 };
30 
31 @protocol FlutterTextInputDelegate <NSObject>
32 - (void)handlePressEvent:(FlutterUIPressProxy*)press
33  nextAction:(void (^)())next API_AVAILABLE(ios(13.4));
34 - (void)updateEditingClient:(int)client withState:(NSDictionary*)state;
35 - (void)updateEditingClient:(int)client withState:(NSDictionary*)state withTag:(NSString*)tag;
36 - (void)updateEditingClient:(int)client withDelta:(NSDictionary*)state;
37 - (void)performAction:(FlutterTextInputAction)action withClient:(int)client;
38 - (void)updateFloatingCursor:(FlutterFloatingCursorDragState)state
39  withClient:(int)client
40  withPosition:(NSDictionary*)point;
41 - (void)showAutocorrectionPromptRectForStart:(NSUInteger)start
42  end:(NSUInteger)end
43  withClient:(int)client;
44 @end
45 
46 #endif // SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERTEXTINPUTDELEGATE_H_
typedef NS_ENUM(NSInteger, FlutterTextInputAction)