Flutter Engine
FlutterTextInputPlugin.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_FLUTTERTEXTINPUTPLUGIN_H_
6 #define SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERTEXTINPUTPLUGIN_H_
7 
8 #import <UIKit/UIKit.h>
9 
10 #import "flutter/shell/platform/darwin/common/framework/Headers/FlutterChannels.h"
11 #import "flutter/shell/platform/darwin/ios/framework/Source/FlutterKeySecondaryResponder.h"
12 #import "flutter/shell/platform/darwin/ios/framework/Source/FlutterTextEditingDelta.h"
13 #import "flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputDelegate.h"
14 
16 
17 @property(nonatomic, assign) id<FlutterTextInputDelegate> textInputDelegate;
18 - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result;
19 
20 /**
21  * The `UITextInput` implementation used to control text entry.
22  *
23  * This is used by `AccessibilityBridge` to forward interactions with iOS'
24  * accessibility system.
25  */
26 - (UIView<UITextInput>*)textInputView;
27 
28 @end
29 
30 /** An indexed position in the buffer of a Flutter text editing widget. */
31 @interface FlutterTextPosition : UITextPosition
32 
33 @property(nonatomic, readonly) NSUInteger index;
34 
35 + (instancetype)positionWithIndex:(NSUInteger)index;
36 - (instancetype)initWithIndex:(NSUInteger)index;
37 
38 @end
39 
40 /** A range of text in the buffer of a Flutter text editing widget. */
41 @interface FlutterTextRange : UITextRange <NSCopying>
42 
43 @property(nonatomic, readonly) NSRange range;
44 
45 + (instancetype)rangeWithNSRange:(NSRange)range;
46 
47 @end
48 
49 /** A tokenizer used by `FlutterTextInputView` to customize string parsing. */
50 @interface FlutterTokenizer : UITextInputStringTokenizer
51 @end
52 
53 #if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG
55 #endif
56 @interface FlutterTextInputView : UIView <UITextInput>
57 
58 // UITextInput
59 @property(nonatomic, readonly) NSMutableString* text;
60 @property(nonatomic, readonly) NSMutableString* markedText;
61 @property(readwrite, copy) UITextRange* selectedTextRange;
62 @property(nonatomic, strong) UITextRange* markedTextRange;
63 @property(nonatomic, copy) NSDictionary* markedTextStyle;
64 @property(nonatomic, assign) id<UITextInputDelegate> inputDelegate;
65 
66 // UITextInputTraits
67 @property(nonatomic) UITextAutocapitalizationType autocapitalizationType;
68 @property(nonatomic) UITextAutocorrectionType autocorrectionType;
69 @property(nonatomic) UITextSpellCheckingType spellCheckingType;
70 @property(nonatomic) BOOL enablesReturnKeyAutomatically;
71 @property(nonatomic) UIKeyboardAppearance keyboardAppearance;
72 @property(nonatomic) UIKeyboardType keyboardType;
73 @property(nonatomic) UIReturnKeyType returnKeyType;
74 @property(nonatomic, getter=isSecureTextEntry) BOOL secureTextEntry;
75 @property(nonatomic, getter=isEnableDeltaModel) BOOL enableDeltaModel;
76 @property(nonatomic) UITextSmartQuotesType smartQuotesType API_AVAILABLE(ios(11.0));
77 @property(nonatomic) UITextSmartDashesType smartDashesType API_AVAILABLE(ios(11.0));
78 @property(nonatomic, copy) UITextContentType textContentType API_AVAILABLE(ios(10.0));
79 
80 @property(nonatomic, assign) id<FlutterTextInputDelegate> textInputDelegate;
81 @property(nonatomic, assign) UIAccessibilityElement* backingTextInputAccessibilityObject;
82 
83 @end
84 #endif // SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERTEXTINPUTPLUGIN_H_
id< FlutterTextInputDelegate > textInputDelegate
GAsyncResult * result
fml::scoped_nsobject< UIPointerInteraction > _pointerInteraction API_AVAILABLE(ios(13.4))
#define FLUTTER_DARWIN_EXPORT
Definition: FlutterMacros.h:14
UIView< UITextInput > * textInputView()
void(^ FlutterResult)(id _Nullable result)
int BOOL
Definition: windows_types.h:37
std::u16string text