From 8f121bc8a2b2840f9f6c1cd2a22034ad3b5cb1ff Mon Sep 17 00:00:00 2001 From: Timofey Solonin Date: Sat, 21 Sep 2024 13:30:46 +0200 Subject: [PATCH] Derelocate NSTextAttachment and NSTextContainer methods ^KT-70031 --- .../platformLibs/src/platform/ios/UIKit.def | 12 +++++++++++- .../platformLibs/src/platform/osx/AppKit.def | 12 +++++++++++- .../platformLibs/src/platform/tvos/UIKit.def | 12 +++++++++++- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/kotlin-native/platformLibs/src/platform/ios/UIKit.def b/kotlin-native/platformLibs/src/platform/ios/UIKit.def index aaad1c84d4eee..b16645a62aa2b 100644 --- a/kotlin-native/platformLibs/src/platform/ios/UIKit.def +++ b/kotlin-native/platformLibs/src/platform/ios/UIKit.def @@ -7,4 +7,14 @@ compilerOpts = -framework UIKit linkerOpts = -framework UIKit excludedFunctions = UISceneErrorDomain -objcClassesIncludingCategories = NSMutableParagraphStyle NSParagraphStyle NSTextContainer NSTextTab +objcClassesIncludingCategories = NSMutableParagraphStyle NSParagraphStyle NSTextContainer NSTextTab NSTextAttachment +allowIncludingObjCCategoriesFromDefFile = true +--- +@interface NSTextAttachment(K) +- (nullable UIImage *)imageForBounds:(CGRect)imageBounds textContainer:(nullable NSTextContainer *)textContainer characterIndex:(NSUInteger)charIndex API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos); +- (CGRect)attachmentBoundsForTextContainer:(nullable NSTextContainer *)textContainer proposedLineFragment:(CGRect)lineFrag glyphPosition:(CGPoint)position characterIndex:(NSUInteger)charIndex API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos); +@end + +@interface NSTextContainer(K) +@property (readonly, NS_NONATOMIC_IOSONLY) NSTextLayoutOrientation layoutOrientation API_AVAILABLE(macos(10.7), ios(7.0)); +@end \ No newline at end of file diff --git a/kotlin-native/platformLibs/src/platform/osx/AppKit.def b/kotlin-native/platformLibs/src/platform/osx/AppKit.def index 420ff59afee19..ff553ef349c65 100644 --- a/kotlin-native/platformLibs/src/platform/osx/AppKit.def +++ b/kotlin-native/platformLibs/src/platform/osx/AppKit.def @@ -7,4 +7,14 @@ compilerOpts = -framework AppKit linkerOpts = -framework AppKit strictEnums = NSBezierPathElement -objcClassesIncludingCategories = NSImage NSProgressIndicator NSCursor NSDocument NSGraphicsContext NSMutableParagraphStyle NSParagraphStyle NSTextTab NSToolbar NSWindow NSTextContainer +objcClassesIncludingCategories = NSImage NSProgressIndicator NSCursor NSDocument NSGraphicsContext NSMutableParagraphStyle NSParagraphStyle NSTextTab NSToolbar NSWindow NSTextContainer NSTextAttachment +allowIncludingObjCCategoriesFromDefFile = true +--- +@interface NSTextAttachment(K) +- (nullable NSImage *)imageForBounds:(CGRect)imageBounds textContainer:(nullable NSTextContainer *)textContainer characterIndex:(NSUInteger)charIndex API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos); +- (CGRect)attachmentBoundsForTextContainer:(nullable NSTextContainer *)textContainer proposedLineFragment:(CGRect)lineFrag glyphPosition:(CGPoint)position characterIndex:(NSUInteger)charIndex API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos); +@end + +@interface NSTextContainer(K) +@property (readonly, NS_NONATOMIC_IOSONLY) NSTextLayoutOrientation layoutOrientation API_AVAILABLE(macos(10.7), ios(7.0)); +@end \ No newline at end of file diff --git a/kotlin-native/platformLibs/src/platform/tvos/UIKit.def b/kotlin-native/platformLibs/src/platform/tvos/UIKit.def index 3565d8bd30a90..1620890f84f56 100644 --- a/kotlin-native/platformLibs/src/platform/tvos/UIKit.def +++ b/kotlin-native/platformLibs/src/platform/tvos/UIKit.def @@ -7,4 +7,14 @@ compilerOpts = -framework UIKit linkerOpts = -framework UIKit excludedFunctions = UISceneErrorDomain -objcClassesIncludingCategories = NSMutableParagraphStyle NSParagraphStyle NSTextContainer NSTextTab \ No newline at end of file +objcClassesIncludingCategories = NSMutableParagraphStyle NSParagraphStyle NSTextContainer NSTextTab NSTextAttachment +allowIncludingObjCCategoriesFromDefFile = true +--- +@interface NSTextAttachment(K) +- (nullable UIImage *)imageForBounds:(CGRect)imageBounds textContainer:(nullable NSTextContainer *)textContainer characterIndex:(NSUInteger)charIndex API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos); +- (CGRect)attachmentBoundsForTextContainer:(nullable NSTextContainer *)textContainer proposedLineFragment:(CGRect)lineFrag glyphPosition:(CGPoint)position characterIndex:(NSUInteger)charIndex API_AVAILABLE(macos(10.11), ios(7.0), tvos(9.0), visionos(1.0)) API_UNAVAILABLE(watchos); +@end + +@interface NSTextContainer(K) +@property (readonly, NS_NONATOMIC_IOSONLY) NSTextLayoutOrientation layoutOrientation API_AVAILABLE(macos(10.7), ios(7.0)); +@end \ No newline at end of file