Files
ghostgram/submodules/TelegramUI/Components/RichTextEditor/Sources/RichTextInputDecUpstream/include/IDBlockTextGeometry.h
T
ichmagmaus111andClaude Opus 5.5 534cabe35b bug fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 16:55:08 +01:00

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