[macOS] Add XCode marks for TextInputPlugin (flutter/engine#39550)

Adds marks to cleanly separate the sections of TextInputPlugin when
viewing in XCode and other IDEs that recognise #pragma mark. This file
is getting pretty long.

No tests since this is a cleanup with no functional changes.
This commit is contained in:
Chris Bracken
2023-02-10 15:46:07 -08:00
committed by GitHub
parent 6bac0673e3
commit 93ef23fca0

View File

@@ -20,7 +20,7 @@
static NSString* const kTextInputChannel = @"flutter/textinput";
#pragma mark - Textinput channel method names
#pragma mark - TextInput channel method names
// See https://api.flutter.dev/flutter/services/SystemChannels/textInput-constant.html
static NSString* const kSetClientMethod = @"TextInput.setClient";
static NSString* const kShowMethod = @"TextInput.show";
@@ -62,6 +62,7 @@ static NSString* const kAutofillHints = @"hints";
static NSString* const kTextAffinityDownstream = @"TextAffinity.downstream";
static NSString* const kTextAffinityUpstream = @"TextAffinity.upstream";
#pragma mark - Enums
/**
* The affinity of the current cursor position. If the cursor is at a position representing
* a line break, the cursor may be drawn either at the end of the current line (upstream)
@@ -72,6 +73,8 @@ typedef NS_ENUM(NSUInteger, FlutterTextAffinity) {
kFlutterTextAffinityDownstream
};
#pragma mark - Static functions
/*
* Updates a range given base and extent fields.
*/
@@ -135,6 +138,8 @@ static BOOL EnableAutocomplete(NSDictionary* configuration) {
return EnableAutocompleteForTextInputConfiguration(configuration);
}
#pragma mark - NSEvent (KeyEquivalentMarker) protocol
@interface NSEvent (KeyEquivalentMarker)
// Internally marks that the event was received through performKeyEquivalent:.
@@ -164,6 +169,8 @@ static char markerKey;
@end
#pragma mark - FlutterTextInputPlugin private interface
/**
* Private properties of FlutterTextInputPlugin.
*/
@@ -285,6 +292,8 @@ static char markerKey;
@end
#pragma mark - FlutterTextInputPlugin
@implementation FlutterTextInputPlugin {
/**
* The currently active text input model.