• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
10 typedef NS_ENUM(NSInteger, FlutterTextInputAction) {
11   FlutterTextInputActionUnspecified,
12   FlutterTextInputActionDone,
13   FlutterTextInputActionGo,
14   FlutterTextInputActionSend,
15   FlutterTextInputActionSearch,
16   FlutterTextInputActionNext,
17   FlutterTextInputActionContinue,
18   FlutterTextInputActionJoin,
19   FlutterTextInputActionRoute,
20   FlutterTextInputActionEmergencyCall,
21   FlutterTextInputActionNewline,
22 };
23 
24 typedef NS_ENUM(NSInteger, FlutterFloatingCursorDragState) {
25   FlutterFloatingCursorDragStateStart,
26   FlutterFloatingCursorDragStateUpdate,
27   FlutterFloatingCursorDragStateEnd,
28 };
29 
30 @protocol FlutterTextInputDelegate <NSObject>
31 
32 - (void)updateEditingClient:(int)client withState:(NSDictionary*)state;
33 - (void)performAction:(FlutterTextInputAction)action withClient:(int)client;
34 - (void)updateFloatingCursor:(FlutterFloatingCursorDragState)state
35                   withClient:(int)client
36                 withPosition:(NSDictionary*)point;
37 
38 @end
39 
40 #endif  // SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERTEXTINPUTDELEGATE_H_
41