mirror of
https://github.com/ichmagmaus111/ghostgram.git
synced 2026-11-12 01:59:48 +01:00
49 lines
1.8 KiB
Objective-C
49 lines
1.8 KiB
Objective-C
#import <TargetConditionals.h>
|
|
#if TARGET_OS_IOS
|
|
|
|
@import UIKit;
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@class IDRichTextSelectionRect;
|
|
@class IDBlockSelectionSegment;
|
|
|
|
typedef struct {
|
|
NSUInteger localOffset;
|
|
UITextStorageDirection affinity;
|
|
CGFloat anchorPositionOffset;
|
|
BOOL found;
|
|
} IDBlockCaretStop;
|
|
|
|
@interface IDBlockTextGeometry : NSObject
|
|
|
|
- (instancetype)initWithContentStorage:(NSTextContentStorage *)contentStorage
|
|
layoutManager:(NSTextLayoutManager *)layoutManager
|
|
textContainer:(NSTextContainer *)textContainer;
|
|
- (CGRect)insertionRectForLocation:(id<NSTextLocation>)location
|
|
affinity:(UITextStorageDirection)affinity;
|
|
- (CGRect)boundingRectForLocalRange:(NSRange)range;
|
|
- (NSArray<IDRichTextSelectionRect *> *)selectionRectsForLocalRange:(NSRange)range
|
|
extendHead:(BOOL)extendHead
|
|
extendTail:(BOOL)extendTail;
|
|
- (nullable NSArray<IDBlockSelectionSegment *> *)selectionSegmentsForLocalRange:
|
|
(NSRange)range
|
|
extendHead:
|
|
(BOOL)extendHead
|
|
extendTail:
|
|
(BOOL)extendTail
|
|
layoutGeneration:
|
|
(NSUInteger)layoutGeneration;
|
|
- (IDBlockCaretStop)caretStopForLocation:(id<NSTextLocation>)location
|
|
affinity:(UITextStorageDirection)affinity
|
|
direction:(UITextLayoutDirection)direction
|
|
anchorPositionOffset:(CGFloat)anchorPositionOffset;
|
|
- (IDBlockCaretStop)caretStopForPoint:(CGPoint)point;
|
|
|
|
@end
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|
|
|
|
#endif
|