use crate::common::*;
use crate::AppKit::*;
use crate::CoreData::*;
use crate::Foundation::*;
extern_static!(NSFontAttributeName: &'static NSAttributedStringKey);
extern_static!(NSParagraphStyleAttributeName: &'static NSAttributedStringKey);
extern_static!(NSForegroundColorAttributeName: &'static NSAttributedStringKey);
extern_static!(NSBackgroundColorAttributeName: &'static NSAttributedStringKey);
extern_static!(NSLigatureAttributeName: &'static NSAttributedStringKey);
extern_static!(NSKernAttributeName: &'static NSAttributedStringKey);
extern_static!(NSTrackingAttributeName: &'static NSAttributedStringKey);
extern_static!(NSStrikethroughStyleAttributeName: &'static NSAttributedStringKey);
extern_static!(NSUnderlineStyleAttributeName: &'static NSAttributedStringKey);
extern_static!(NSStrokeColorAttributeName: &'static NSAttributedStringKey);
extern_static!(NSStrokeWidthAttributeName: &'static NSAttributedStringKey);
extern_static!(NSShadowAttributeName: &'static NSAttributedStringKey);
extern_static!(NSTextEffectAttributeName: &'static NSAttributedStringKey);
extern_static!(NSAttachmentAttributeName: &'static NSAttributedStringKey);
extern_static!(NSLinkAttributeName: &'static NSAttributedStringKey);
extern_static!(NSBaselineOffsetAttributeName: &'static NSAttributedStringKey);
extern_static!(NSUnderlineColorAttributeName: &'static NSAttributedStringKey);
extern_static!(NSStrikethroughColorAttributeName: &'static NSAttributedStringKey);
extern_static!(NSWritingDirectionAttributeName: &'static NSAttributedStringKey);
extern_static!(NSCursorAttributeName: &'static NSAttributedStringKey);
extern_static!(NSToolTipAttributeName: &'static NSAttributedStringKey);
extern_static!(NSMarkedClauseSegmentAttributeName: &'static NSAttributedStringKey);
extern_static!(NSTextAlternativesAttributeName: &'static NSAttributedStringKey);
extern_static!(NSSpellingStateAttributeName: &'static NSAttributedStringKey);
extern_static!(NSSuperscriptAttributeName: &'static NSAttributedStringKey);
extern_static!(NSGlyphInfoAttributeName: &'static NSAttributedStringKey);
ns_options!(
#[underlying(NSInteger)]
pub enum NSUnderlineStyle {
NSUnderlineStyleNone = 0x00,
NSUnderlineStyleSingle = 0x01,
NSUnderlineStyleThick = 0x02,
NSUnderlineStyleDouble = 0x09,
NSUnderlineStylePatternSolid = 0x0000,
NSUnderlineStylePatternDot = 0x0100,
NSUnderlineStylePatternDash = 0x0200,
NSUnderlineStylePatternDashDot = 0x0300,
NSUnderlineStylePatternDashDotDot = 0x0400,
NSUnderlineStyleByWord = 0x8000,
}
);
ns_enum!(
#[underlying(NSInteger)]
pub enum NSWritingDirectionFormatType {
NSWritingDirectionEmbedding = 0 << 1,
NSWritingDirectionOverride = 1 << 1,
}
);
typed_enum!(
pub type NSTextEffectStyle = NSString;
);
extern_static!(NSTextEffectLetterpressStyle: &'static NSTextEffectStyle);
ns_enum!(
#[underlying(NSInteger)]
pub enum NSSpellingState {
NSSpellingStateSpellingFlag = 1 << 0,
NSSpellingStateGrammarFlag = 1 << 1,
}
);
extern_methods!(
#[cfg(feature = "Foundation_NSMutableAttributedString")]
unsafe impl NSMutableAttributedString {
#[method(fixAttributesInRange:)]
pub unsafe fn fixAttributesInRange(&mut self, range: NSRange);
#[method(fixFontAttributeInRange:)]
pub unsafe fn fixFontAttributeInRange(&mut self, range: NSRange);
#[method(fixParagraphStyleAttributeInRange:)]
pub unsafe fn fixParagraphStyleAttributeInRange(&mut self, range: NSRange);
#[method(fixAttachmentAttributeInRange:)]
pub unsafe fn fixAttachmentAttributeInRange(&mut self, range: NSRange);
}
);
typed_extensible_enum!(
pub type NSAttributedStringDocumentType = NSString;
);
extern_static!(NSPlainTextDocumentType: &'static NSAttributedStringDocumentType);
extern_static!(NSRTFTextDocumentType: &'static NSAttributedStringDocumentType);
extern_static!(NSRTFDTextDocumentType: &'static NSAttributedStringDocumentType);
extern_static!(NSHTMLTextDocumentType: &'static NSAttributedStringDocumentType);
extern_static!(NSMacSimpleTextDocumentType: &'static NSAttributedStringDocumentType);
extern_static!(NSDocFormatTextDocumentType: &'static NSAttributedStringDocumentType);
extern_static!(NSWordMLTextDocumentType: &'static NSAttributedStringDocumentType);
extern_static!(NSWebArchiveTextDocumentType: &'static NSAttributedStringDocumentType);
extern_static!(NSOfficeOpenXMLTextDocumentType: &'static NSAttributedStringDocumentType);
extern_static!(NSOpenDocumentTextDocumentType: &'static NSAttributedStringDocumentType);
typed_enum!(
pub type NSTextLayoutSectionKey = NSString;
);
extern_static!(NSTextLayoutSectionOrientation: &'static NSTextLayoutSectionKey);
extern_static!(NSTextLayoutSectionRange: &'static NSTextLayoutSectionKey);
ns_enum!(
#[underlying(NSInteger)]
pub enum NSTextScalingType {
NSTextScalingStandard = 0,
NSTextScalingiOS = 1,
}
);
typed_extensible_enum!(
pub type NSAttributedStringDocumentAttributeKey = NSString;
);
extern_static!(NSDocumentTypeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSConvertedDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSCocoaVersionDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSFileTypeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSTitleDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSCompanyDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSCopyrightDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSSubjectDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSAuthorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSKeywordsDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSCommentDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSEditorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSCreationTimeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSModificationTimeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSManagerDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSCategoryDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSAppearanceDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSCharacterEncodingDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSDefaultAttributesDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSPaperSizeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSLeftMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSRightMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSTopMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSBottomMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSViewSizeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSViewZoomDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSViewModeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSReadOnlyDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSBackgroundColorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSHyphenationFactorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSDefaultTabIntervalDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSTextLayoutSectionsAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSExcludedElementsDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSTextEncodingNameDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSPrefixSpacesDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSDefaultFontExcludedDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSTextScalingDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
extern_static!(NSSourceTextScalingDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey);
typed_extensible_enum!(
pub type NSAttributedStringDocumentReadingOptionKey = NSString;
);
extern_static!(NSDocumentTypeDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey);
extern_static!(NSDefaultAttributesDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey);
extern_static!(NSCharacterEncodingDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey);
extern_static!(NSTextEncodingNameDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey);
extern_static!(NSBaseURLDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey);
extern_static!(NSTimeoutDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey);
extern_static!(NSWebPreferencesDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey);
extern_static!(NSWebResourceLoadDelegateDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey);
extern_static!(NSTextSizeMultiplierDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey);
extern_static!(NSFileTypeDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey);
extern_static!(NSTargetTextScalingDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey);
extern_static!(NSSourceTextScalingDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey);
extern_methods!(
#[cfg(feature = "Foundation_NSAttributedString")]
unsafe impl NSAttributedString {
#[cfg(all(
feature = "Foundation_NSDictionary",
feature = "Foundation_NSError",
feature = "Foundation_NSURL"
))]
#[method_id(@__retain_semantics Init initWithURL:options:documentAttributes:error:_)]
pub unsafe fn initWithURL_options_documentAttributes_error(
this: Allocated<Self>,
url: &NSURL,
options: &NSDictionary<NSAttributedStringDocumentReadingOptionKey, AnyObject>,
dict: Option<
&mut Option<Id<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>>,
>,
) -> Result<Id<Self>, Id<NSError>>;
#[cfg(all(
feature = "Foundation_NSData",
feature = "Foundation_NSDictionary",
feature = "Foundation_NSError"
))]
#[method_id(@__retain_semantics Init initWithData:options:documentAttributes:error:_)]
pub unsafe fn initWithData_options_documentAttributes_error(
this: Allocated<Self>,
data: &NSData,
options: &NSDictionary<NSAttributedStringDocumentReadingOptionKey, AnyObject>,
dict: Option<
&mut Option<Id<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>>,
>,
) -> Result<Id<Self>, Id<NSError>>;
#[cfg(all(
feature = "Foundation_NSData",
feature = "Foundation_NSDictionary",
feature = "Foundation_NSError"
))]
#[method_id(@__retain_semantics Other dataFromRange:documentAttributes:error:_)]
pub unsafe fn dataFromRange_documentAttributes_error(
&self,
range: NSRange,
dict: &NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>,
) -> Result<Id<NSData>, Id<NSError>>;
#[cfg(all(
feature = "Foundation_NSDictionary",
feature = "Foundation_NSError",
feature = "Foundation_NSFileWrapper"
))]
#[method_id(@__retain_semantics Other fileWrapperFromRange:documentAttributes:error:_)]
pub unsafe fn fileWrapperFromRange_documentAttributes_error(
&self,
range: NSRange,
dict: &NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>,
) -> Result<Id<NSFileWrapper>, Id<NSError>>;
#[cfg(all(feature = "Foundation_NSData", feature = "Foundation_NSDictionary"))]
#[method_id(@__retain_semantics Init initWithRTF:documentAttributes:)]
pub unsafe fn initWithRTF_documentAttributes(
this: Allocated<Self>,
data: &NSData,
dict: Option<
&mut Option<Id<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>>,
>,
) -> Option<Id<Self>>;
#[cfg(all(feature = "Foundation_NSData", feature = "Foundation_NSDictionary"))]
#[method_id(@__retain_semantics Init initWithRTFD:documentAttributes:)]
pub unsafe fn initWithRTFD_documentAttributes(
this: Allocated<Self>,
data: &NSData,
dict: Option<
&mut Option<Id<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>>,
>,
) -> Option<Id<Self>>;
#[cfg(all(feature = "Foundation_NSData", feature = "Foundation_NSDictionary"))]
#[method_id(@__retain_semantics Init initWithHTML:documentAttributes:)]
pub unsafe fn initWithHTML_documentAttributes(
this: Allocated<Self>,
data: &NSData,
dict: Option<
&mut Option<Id<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>>,
>,
) -> Option<Id<Self>>;
#[cfg(all(
feature = "Foundation_NSData",
feature = "Foundation_NSDictionary",
feature = "Foundation_NSURL"
))]
#[method_id(@__retain_semantics Init initWithHTML:baseURL:documentAttributes:)]
pub unsafe fn initWithHTML_baseURL_documentAttributes(
this: Allocated<Self>,
data: &NSData,
base: &NSURL,
dict: Option<
&mut Option<Id<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>>,
>,
) -> Option<Id<Self>>;
#[cfg(all(feature = "Foundation_NSData", feature = "Foundation_NSDictionary"))]
#[method_id(@__retain_semantics Init initWithDocFormat:documentAttributes:)]
pub unsafe fn initWithDocFormat_documentAttributes(
this: Allocated<Self>,
data: &NSData,
dict: Option<
&mut Option<Id<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>>,
>,
) -> Option<Id<Self>>;
#[cfg(all(feature = "Foundation_NSData", feature = "Foundation_NSDictionary"))]
#[method_id(@__retain_semantics Init initWithHTML:options:documentAttributes:)]
pub unsafe fn initWithHTML_options_documentAttributes(
this: Allocated<Self>,
data: &NSData,
options: &NSDictionary<NSAttributedStringDocumentReadingOptionKey, AnyObject>,
dict: Option<
&mut Option<Id<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>>,
>,
) -> Option<Id<Self>>;
#[cfg(all(
feature = "Foundation_NSDictionary",
feature = "Foundation_NSFileWrapper"
))]
#[method_id(@__retain_semantics Init initWithRTFDFileWrapper:documentAttributes:)]
pub unsafe fn initWithRTFDFileWrapper_documentAttributes(
this: Allocated<Self>,
wrapper: &NSFileWrapper,
dict: Option<
&mut Option<Id<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>>,
>,
) -> Option<Id<Self>>;
#[cfg(all(feature = "Foundation_NSData", feature = "Foundation_NSDictionary"))]
#[method_id(@__retain_semantics Other RTFFromRange:documentAttributes:)]
pub unsafe fn RTFFromRange_documentAttributes(
&self,
range: NSRange,
dict: &NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>,
) -> Option<Id<NSData>>;
#[cfg(all(feature = "Foundation_NSData", feature = "Foundation_NSDictionary"))]
#[method_id(@__retain_semantics Other RTFDFromRange:documentAttributes:)]
pub unsafe fn RTFDFromRange_documentAttributes(
&self,
range: NSRange,
dict: &NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>,
) -> Option<Id<NSData>>;
#[cfg(all(
feature = "Foundation_NSDictionary",
feature = "Foundation_NSFileWrapper"
))]
#[method_id(@__retain_semantics Other RTFDFileWrapperFromRange:documentAttributes:)]
pub unsafe fn RTFDFileWrapperFromRange_documentAttributes(
&self,
range: NSRange,
dict: &NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>,
) -> Option<Id<NSFileWrapper>>;
#[cfg(all(feature = "Foundation_NSData", feature = "Foundation_NSDictionary"))]
#[method_id(@__retain_semantics Other docFormatFromRange:documentAttributes:)]
pub unsafe fn docFormatFromRange_documentAttributes(
&self,
range: NSRange,
dict: &NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>,
) -> Option<Id<NSData>>;
}
);
extern_methods!(
#[cfg(feature = "Foundation_NSMutableAttributedString")]
unsafe impl NSMutableAttributedString {
#[cfg(all(
feature = "Foundation_NSDictionary",
feature = "Foundation_NSError",
feature = "Foundation_NSURL"
))]
#[method(readFromURL:options:documentAttributes:error:_)]
pub unsafe fn readFromURL_options_documentAttributes_error(
&mut self,
url: &NSURL,
opts: &NSDictionary<NSAttributedStringDocumentReadingOptionKey, AnyObject>,
dict: Option<
&mut Option<Id<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>>,
>,
) -> Result<(), Id<NSError>>;
#[cfg(all(
feature = "Foundation_NSData",
feature = "Foundation_NSDictionary",
feature = "Foundation_NSError"
))]
#[method(readFromData:options:documentAttributes:error:_)]
pub unsafe fn readFromData_options_documentAttributes_error(
&mut self,
data: &NSData,
opts: &NSDictionary<NSAttributedStringDocumentReadingOptionKey, AnyObject>,
dict: Option<
&mut Option<Id<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>>,
>,
) -> Result<(), Id<NSError>>;
}
);
extern_methods!(
#[cfg(feature = "Foundation_NSAttributedString")]
unsafe impl NSAttributedString {
#[cfg(feature = "Foundation_NSDictionary")]
#[method_id(@__retain_semantics Other fontAttributesInRange:)]
pub unsafe fn fontAttributesInRange(
&self,
range: NSRange,
) -> Id<NSDictionary<NSAttributedStringKey, AnyObject>>;
#[cfg(feature = "Foundation_NSDictionary")]
#[method_id(@__retain_semantics Other rulerAttributesInRange:)]
pub unsafe fn rulerAttributesInRange(
&self,
range: NSRange,
) -> Id<NSDictionary<NSAttributedStringKey, AnyObject>>;
#[method(containsAttachmentsInRange:)]
pub unsafe fn containsAttachmentsInRange(&self, range: NSRange) -> bool;
#[method(lineBreakBeforeIndex:withinRange:)]
pub unsafe fn lineBreakBeforeIndex_withinRange(
&self,
location: NSUInteger,
a_range: NSRange,
) -> NSUInteger;
#[method(lineBreakByHyphenatingBeforeIndex:withinRange:)]
pub unsafe fn lineBreakByHyphenatingBeforeIndex_withinRange(
&self,
location: NSUInteger,
a_range: NSRange,
) -> NSUInteger;
#[method(doubleClickAtIndex:)]
pub unsafe fn doubleClickAtIndex(&self, location: NSUInteger) -> NSRange;
#[method(nextWordFromIndex:forward:)]
pub unsafe fn nextWordFromIndex_forward(
&self,
location: NSUInteger,
is_forward: bool,
) -> NSUInteger;
#[cfg(feature = "AppKit_NSTextBlock")]
#[method(rangeOfTextBlock:atIndex:)]
pub unsafe fn rangeOfTextBlock_atIndex(
&self,
block: &NSTextBlock,
location: NSUInteger,
) -> NSRange;
#[cfg(feature = "AppKit_NSTextTable")]
#[method(rangeOfTextTable:atIndex:)]
pub unsafe fn rangeOfTextTable_atIndex(
&self,
table: &NSTextTable,
location: NSUInteger,
) -> NSRange;
#[cfg(feature = "AppKit_NSTextList")]
#[method(rangeOfTextList:atIndex:)]
pub unsafe fn rangeOfTextList_atIndex(
&self,
list: &NSTextList,
location: NSUInteger,
) -> NSRange;
#[cfg(feature = "AppKit_NSTextList")]
#[method(itemNumberInTextList:atIndex:)]
pub unsafe fn itemNumberInTextList_atIndex(
&self,
list: &NSTextList,
location: NSUInteger,
) -> NSInteger;
}
);
extern_methods!(
#[cfg(feature = "Foundation_NSAttributedString")]
unsafe impl NSAttributedString {
#[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
#[method_id(@__retain_semantics Other textTypes)]
pub unsafe fn textTypes() -> Id<NSArray<NSString>>;
#[cfg(all(feature = "Foundation_NSArray", feature = "Foundation_NSString"))]
#[method_id(@__retain_semantics Other textUnfilteredTypes)]
pub unsafe fn textUnfilteredTypes() -> Id<NSArray<NSString>>;
}
);
#[cfg(feature = "Foundation_NSAttributedString")]
unsafe impl NSPasteboardReading for NSAttributedString {}
#[cfg(feature = "Foundation_NSAttributedString")]
unsafe impl NSPasteboardWriting for NSAttributedString {}
extern_methods!(
#[cfg(feature = "Foundation_NSMutableAttributedString")]
unsafe impl NSMutableAttributedString {
#[method(superscriptRange:)]
pub unsafe fn superscriptRange(&mut self, range: NSRange);
#[method(subscriptRange:)]
pub unsafe fn subscriptRange(&mut self, range: NSRange);
#[method(unscriptRange:)]
pub unsafe fn unscriptRange(&mut self, range: NSRange);
#[method(applyFontTraits:range:)]
pub unsafe fn applyFontTraits_range(&mut self, trait_mask: NSFontTraitMask, range: NSRange);
#[method(setAlignment:range:)]
pub unsafe fn setAlignment_range(&mut self, alignment: NSTextAlignment, range: NSRange);
#[method(setBaseWritingDirection:range:)]
pub unsafe fn setBaseWritingDirection_range(
&mut self,
writing_direction: NSWritingDirection,
range: NSRange,
);
}
);
extern_static!(NSUnderlinePatternSolid: NSUnderlineStyle = NSUnderlineStylePatternSolid);
extern_static!(NSUnderlinePatternDot: NSUnderlineStyle = NSUnderlineStylePatternDot);
extern_static!(NSUnderlinePatternDash: NSUnderlineStyle = NSUnderlineStylePatternDash);
extern_static!(NSUnderlinePatternDashDot: NSUnderlineStyle = NSUnderlineStylePatternDashDot);
extern_static!(NSUnderlinePatternDashDotDot: NSUnderlineStyle = NSUnderlineStylePatternDashDotDot);
extern_static!(NSUnderlineByWord: NSUnderlineStyle = NSUnderlineStyleByWord);
extern_static!(NSCharacterShapeAttributeName: &'static NSAttributedStringKey);
extern_static!(NSUsesScreenFontsDocumentAttribute: &'static NSAttributedStringKey);
extern_static!(NSObliquenessAttributeName: &'static NSAttributedStringKey);
extern_static!(NSExpansionAttributeName: &'static NSAttributedStringKey);
extern_static!(NSVerticalGlyphFormAttributeName: &'static NSAttributedStringKey);
extern_enum!(
#[underlying(c_uint)]
pub enum __anonymous__ {
#[deprecated = "Use NSUnderlineStyleNone instead"]
NSNoUnderlineStyle = 0,
#[deprecated = "Use NSUnderlineStyleSingle instead"]
NSSingleUnderlineStyle = 1,
}
);
extern_static!(NSUnderlineStrikethroughMask: NSUInteger);
extern_static!(NSUnderlineByWordMask: NSUInteger);
extern_methods!(
#[cfg(feature = "Foundation_NSAttributedString")]
unsafe impl NSAttributedString {
#[method(containsAttachments)]
pub unsafe fn containsAttachments(&self) -> bool;
#[cfg(feature = "Foundation_NSArray")]
#[deprecated]
#[method_id(@__retain_semantics Other textFileTypes)]
pub unsafe fn textFileTypes() -> Id<NSArray>;
#[cfg(feature = "Foundation_NSArray")]
#[deprecated]
#[method_id(@__retain_semantics Other textPasteboardTypes)]
pub unsafe fn textPasteboardTypes() -> Id<NSArray>;
#[cfg(feature = "Foundation_NSArray")]
#[deprecated]
#[method_id(@__retain_semantics Other textUnfilteredFileTypes)]
pub unsafe fn textUnfilteredFileTypes() -> Id<NSArray>;
#[cfg(feature = "Foundation_NSArray")]
#[deprecated]
#[method_id(@__retain_semantics Other textUnfilteredPasteboardTypes)]
pub unsafe fn textUnfilteredPasteboardTypes() -> Id<NSArray>;
#[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSURL"))]
#[deprecated = "Use -initWithURL:options:documentAttributes:error: instead"]
#[method_id(@__retain_semantics Init initWithURL:documentAttributes:)]
pub unsafe fn initWithURL_documentAttributes(
this: Allocated<Self>,
url: &NSURL,
dict: Option<&mut Option<Id<NSDictionary>>>,
) -> Option<Id<Self>>;
#[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))]
#[deprecated = "Use -initWithURL:options:documentAttributes:error: instead"]
#[method_id(@__retain_semantics Init initWithPath:documentAttributes:)]
pub unsafe fn initWithPath_documentAttributes(
this: Allocated<Self>,
path: &NSString,
dict: Option<&mut Option<Id<NSDictionary>>>,
) -> Option<Id<Self>>;
#[cfg(feature = "Foundation_NSURL")]
#[deprecated = "Use NSDataDetector instead"]
#[method_id(@__retain_semantics Other URLAtIndex:effectiveRange:)]
pub unsafe fn URLAtIndex_effectiveRange(
&self,
location: NSUInteger,
effective_range: NSRangePointer,
) -> Option<Id<NSURL>>;
}
);
extern_methods!(
#[cfg(feature = "Foundation_NSMutableAttributedString")]
unsafe impl NSMutableAttributedString {
#[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSURL"))]
#[deprecated = "Use -readFromURL:options:documentAttributes:error: instead"]
#[method(readFromURL:options:documentAttributes:)]
pub unsafe fn readFromURL_options_documentAttributes(
&mut self,
url: &NSURL,
options: &NSDictionary,
dict: Option<&mut Option<Id<NSDictionary>>>,
) -> bool;
#[cfg(all(feature = "Foundation_NSData", feature = "Foundation_NSDictionary"))]
#[deprecated = "Use -readFromData:options:documentAttributes:error: instead"]
#[method(readFromData:options:documentAttributes:)]
pub unsafe fn readFromData_options_documentAttributes(
&mut self,
data: &NSData,
options: &NSDictionary,
dict: Option<&mut Option<Id<NSDictionary>>>,
) -> bool;
}
);