From f6a226e5b3e729c59548fd3c32a05415cdc24542 Mon Sep 17 00:00:00 2001 From: Andrew Hyatt Date: Thu, 10 Jan 2019 00:11:10 -0500 Subject: [PATCH] Missing NSAttributedString constants darlinghq/darling#445 --- AppKit/NSAttributedString.m | 20 ++++++++++++++++++++ AppKit/include/AppKit/NSAttributedString.h | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/AppKit/NSAttributedString.m b/AppKit/NSAttributedString.m index f1bf3ac9..a666ad9e 100644 --- a/AppKit/NSAttributedString.m +++ b/AppKit/NSAttributedString.m @@ -85,6 +85,26 @@ NSString *const NSWebResourceLoadDelegateDocumentOption = @"WebResourceLoadDeleg NSString *const NSTextSizeMultiplierDocumentOption = @"TextSizeMultiplier"; NSString *const NSFileTypeDocumentOption = @"UTI"; +NSString *const NSPlainTextDocumentType = @"NSPlainText"; +NSString *const NSRTFTextDocumentType = @"NSRTF"; +NSString *const NSRTFDTextDocumentType = @"NSRTFD"; +NSString *const NSHTMLTextDocumentType = @"NSHTML"; +NSString *const NSMacSimpleTextDocumentType = @"NSMacSimpleText"; +NSString *const NSDocFormatTextDocumentType = @"NSDocFormat"; +NSString *const NSWordMLTextDocumentType = @"NSWordML"; +NSString *const NSWebArchiveTextDocumentType = @"NSWebArchive"; +NSString *const NSOfficeOpenXMLTextDocumentType = @"NSOfficeOpenXML"; +NSString *const NSOpenDocumentTextDocumentType = @"NSOpenDocument"; + +NSString *const NSTextLayoutSectionOrientation = @"NSTextLayoutSectionOrientation"; +NSString *const NSTextLayoutSectionRange = @"NSTextLayoutSectionRange"; + +NSString *const NSCharacterShapeAttributeName = @"NSCharacterShape"; +NSString *const NSUsesScreenFontsDocumentAttribute = @"UsesScreenFonts"; + +NSUInteger NSUnderlineStrikethroughMask = 0x4000; +NSUInteger NSUnderlineByWordMask = 0x8000; + @implementation NSAttributedString(NSAttributedString_AppKit) #pragma mark - diff --git a/AppKit/include/AppKit/NSAttributedString.h b/AppKit/include/AppKit/NSAttributedString.h index de9ed72c..dc8638fe 100644 --- a/AppKit/include/AppKit/NSAttributedString.h +++ b/AppKit/include/AppKit/NSAttributedString.h @@ -82,6 +82,26 @@ APPKIT_EXPORT NSString *const NSWebResourceLoadDelegateDocumentOption; APPKIT_EXPORT NSString *const NSTextSizeMultiplierDocumentOption; APPKIT_EXPORT NSString *const NSFileTypeDocumentOption; +APPKIT_EXPORT NSString *const NSPlainTextDocumentType; +APPKIT_EXPORT NSString *const NSRTFTextDocumentType; +APPKIT_EXPORT NSString *const NSRTFDTextDocumentType; +APPKIT_EXPORT NSString *const NSHTMLTextDocumentType; +APPKIT_EXPORT NSString *const NSMacSimpleTextDocumentType; +APPKIT_EXPORT NSString *const NSDocFormatTextDocumentType; +APPKIT_EXPORT NSString *const NSWordMLTextDocumentType; +APPKIT_EXPORT NSString *const NSWebArchiveTextDocumentType; +APPKIT_EXPORT NSString *const NSOfficeOpenXMLTextDocumentType; +APPKIT_EXPORT NSString *const NSOpenDocumentTextDocumentType; + +APPKIT_EXPORT NSString *const NSTextLayoutSectionOrientation; +APPKIT_EXPORT NSString *const NSTextLayoutSectionRange; + +APPKIT_EXPORT NSString *const NSCharacterShapeAttributeName; +APPKIT_EXPORT NSString *const NSUsesScreenFontsDocumentAttribute; + +APPKIT_EXPORT NSUInteger NSUnderlineStrikethroughMask; +APPKIT_EXPORT NSUInteger NSUnderlineByWordMask; + enum { NSSpellingStateSpellingFlag = 0x01, NSSpellingStateGrammarFlag = 0x02,