mirror of
https://github.com/encounter/engine.git
synced 2026-03-30 11:09:55 -07:00
48 lines
1.5 KiB
Objective-C
48 lines
1.5 KiB
Objective-C
// Copyright 2013 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERTEXTINPUTPLUGIN_H_
|
|
#define SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERTEXTINPUTPLUGIN_H_
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterChannels.h"
|
|
#include "flutter/shell/platform/darwin/ios/framework/Source/FlutterTextInputDelegate.h"
|
|
|
|
@interface FlutterTextInputPlugin : NSObject
|
|
|
|
@property(nonatomic, assign) id<FlutterTextInputDelegate> textInputDelegate;
|
|
- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result;
|
|
|
|
/**
|
|
* The `UITextInput` implementation used to control text entry.
|
|
*
|
|
* This is used by `AccessibilityBridge` to forward interactions with iOS'
|
|
* accessibility system.
|
|
*/
|
|
- (UIView<UITextInput>*)textInputView;
|
|
|
|
@end
|
|
|
|
/** An indexed position in the buffer of a Flutter text editing widget. */
|
|
@interface FlutterTextPosition : UITextPosition
|
|
|
|
@property(nonatomic, readonly) NSUInteger index;
|
|
|
|
+ (instancetype)positionWithIndex:(NSUInteger)index;
|
|
- (instancetype)initWithIndex:(NSUInteger)index;
|
|
|
|
@end
|
|
|
|
/** A range of text in the buffer of a Flutter text editing widget. */
|
|
@interface FlutterTextRange : UITextRange <NSCopying>
|
|
|
|
@property(nonatomic, readonly) NSRange range;
|
|
|
|
+ (instancetype)rangeWithNSRange:(NSRange)range;
|
|
|
|
@end
|
|
|
|
#endif // SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERTEXTINPUTPLUGIN_H_
|