Skip to content

Commit

Permalink
Derelocate NSTextAttachment and NSTextContainer methods
Browse files Browse the repository at this point in the history
^KT-70031
  • Loading branch information
timofey-solonin authored and qodana-bot committed Sep 24, 2024
1 parent cc0919d commit 8f121bc
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
12 changes: 11 additions & 1 deletion kotlin-native/platformLibs/src/platform/ios/UIKit.def
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 11 additions & 1 deletion kotlin-native/platformLibs/src/platform/osx/AppKit.def
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 11 additions & 1 deletion kotlin-native/platformLibs/src/platform/tvos/UIKit.def
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8f121bc

Please sign in to comment.