Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 26c62ee

Browse files
comments
1 parent e587f8d commit 26c62ee

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

shell/platform/darwin/ios/framework/Source/FlutterTextInputClient.h

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,31 @@ typedef NS_ENUM(NSInteger, FlutterScribbleInteractionStatus) {
4747

4848
@end
4949

50+
/** An object that represents a framework text editing widget and interacts with the iOS text input
51+
* system on behalf of that widget.
52+
* A FlutterTextInputClient can receive editing state updates from the setTextInputState: method,
53+
* and it should typically relay editing state changes made by the iOS text input system to the
54+
* framework, via the textInputPlugin.textInputDelegate method. */
5055
@protocol FlutterTextInputClient <NSObject, UITextInput>
51-
56+
/** The framework issued id of this client. */
5257
@property(nonatomic, assign) int clientID;
5358
@property(nonatomic, assign) BOOL accessibilityEnabled;
5459
@property(nonatomic, assign) FlutterScribbleFocusStatus scribbleFocusStatus;
5560
@property(nonatomic, weak) UIAccessibilityElement* backingTextInputAccessibilityObject;
5661

5762
- (instancetype)initWithOwner:(FlutterTextInputPlugin*)textInputPlugin;
58-
63+
/** Updates the rect that describes the bounding box of the framework blinking cursor, in the
64+
* framework widget's coordinates.
65+
* See the setEditableSize:transform: method. */
5966
- (void)setMarkedRect:(CGRect)rect;
6067
- (void)setViewResponder:(id<FlutterViewResponder>)viewResponder;
68+
/** Updates the visible glyph boxes in the framework, in the framework widget's coordinates.
69+
* See the setEditableSize:transform: method. */
6170
- (void)setSelectionRects:(NSArray*)rects;
71+
/** Called by the framework to update the editing state (text, selection, composing region). */
6272
- (void)setTextInputState:(NSDictionary*)state;
73+
/** Updates the transform and the size of the framework text editing widget's text editing region.
74+
* The information describes the paint transform and paint bounds of the framework widget. */
6375
- (void)setEditableSize:(CGSize)size transform:(NSArray*)matrix;
6476
- (void)setEnableDeltaModel:(BOOL)enableDeltaModel;
6577
- (void)setEnableSoftwareKeyboard:(BOOL)enabled;
@@ -68,8 +80,9 @@ typedef NS_ENUM(NSInteger, FlutterScribbleInteractionStatus) {
6880

6981
@protocol FlutterTextAutofillClient <NSObject>
7082

83+
/** A framework issued id used to uniquely identify an autofill client. The ID is guaranteed to be
84+
* unique at any given time. */
7185
@property(nonatomic, copy) NSString* autofillID;
72-
7386
- (void)setIsVisibleToAutofill:(BOOL)visibility;
7487
@end
7588

shell/platform/darwin/ios/framework/Source/FlutterTextInputClient_UITextInput.mm

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -613,9 +613,7 @@ - (BOOL)shouldChangeTextInRange:(UITextRange*)range replacementText:(NSString*)t
613613
break;
614614
}
615615

616-
[self.textInputDelegate flutterTextInputView:self
617-
performAction:action
618-
withClient:_clientID];
616+
[self.textInputDelegate flutterTextInputView:self performAction:action withClient:_clientID];
619617
return NO;
620618
}
621619

@@ -1187,9 +1185,7 @@ - (void)updateEditingStateWithDelta:(flutter::TextEditingDelta)delta {
11871185
@"deltas" : @[ deltaToFramework ],
11881186
};
11891187

1190-
[self.textInputDelegate flutterTextInputView:self
1191-
updateEditingClient:_clientID
1192-
withDelta:deltas];
1188+
[self.textInputDelegate flutterTextInputView:self updateEditingClient:_clientID withDelta:deltas];
11931189
}
11941190

11951191
- (BOOL)hasText {

0 commit comments

Comments
 (0)