use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
pub static NSFontAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSParagraphStyleAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSForegroundColorAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSBackgroundColorAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSLigatureAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSKernAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSTrackingAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSStrikethroughStyleAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSUnderlineStyleAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSStrokeColorAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSStrokeWidthAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSShadowAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSTextEffectAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSAttachmentAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSLinkAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSBaselineOffsetAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSUnderlineColorAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSStrikethroughColorAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSWritingDirectionAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSTextHighlightStyleAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSTextHighlightColorSchemeAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSAdaptiveImageGlyphAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSWritingToolsExclusionAttributeName: &'static NSAttributedStringKey;
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSUnderlineStyle(pub NSInteger);
bitflags::bitflags! {
impl NSUnderlineStyle: NSInteger {
#[doc(alias = "NSUnderlineStyleNone")]
const None = 0x00;
#[doc(alias = "NSUnderlineStyleSingle")]
const Single = 0x01;
#[doc(alias = "NSUnderlineStyleThick")]
const Thick = 0x02;
#[doc(alias = "NSUnderlineStyleDouble")]
const Double = 0x09;
#[doc(alias = "NSUnderlineStylePatternSolid")]
const PatternSolid = 0x0000;
#[doc(alias = "NSUnderlineStylePatternDot")]
const PatternDot = 0x0100;
#[doc(alias = "NSUnderlineStylePatternDash")]
const PatternDash = 0x0200;
#[doc(alias = "NSUnderlineStylePatternDashDot")]
const PatternDashDot = 0x0300;
#[doc(alias = "NSUnderlineStylePatternDashDotDot")]
const PatternDashDotDot = 0x0400;
#[doc(alias = "NSUnderlineStyleByWord")]
const ByWord = 0x8000;
}
}
unsafe impl Encode for NSUnderlineStyle {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for NSUnderlineStyle {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSWritingDirectionFormatType(pub NSInteger);
impl NSWritingDirectionFormatType {
#[doc(alias = "NSWritingDirectionEmbedding")]
pub const Embedding: Self = Self(0 << 1);
#[doc(alias = "NSWritingDirectionOverride")]
pub const Override: Self = Self(1 << 1);
}
unsafe impl Encode for NSWritingDirectionFormatType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for NSWritingDirectionFormatType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type NSTextEffectStyle = NSString;
extern "C" {
pub static NSTextEffectLetterpressStyle: &'static NSTextEffectStyle;
}
pub type NSTextHighlightStyle = NSString;
extern "C" {
pub static NSTextHighlightStyleDefault: &'static NSTextHighlightStyle;
}
pub type NSTextHighlightColorScheme = NSString;
extern "C" {
pub static NSTextHighlightColorSchemeDefault: &'static NSTextHighlightColorScheme;
}
extern "C" {
pub static NSTextHighlightColorSchemePurple: &'static NSTextHighlightColorScheme;
}
extern "C" {
pub static NSTextHighlightColorSchemePink: &'static NSTextHighlightColorScheme;
}
extern "C" {
pub static NSTextHighlightColorSchemeOrange: &'static NSTextHighlightColorScheme;
}
extern "C" {
pub static NSTextHighlightColorSchemeMint: &'static NSTextHighlightColorScheme;
}
extern "C" {
pub static NSTextHighlightColorSchemeBlue: &'static NSTextHighlightColorScheme;
}
mod private_NSAttributedStringAttributeFixing {
pub trait Sealed {}
}
pub unsafe trait NSAttributedStringAttributeFixing:
ClassType + Sized + private_NSAttributedStringAttributeFixing::Sealed
{
extern_methods!(
#[unsafe(method(fixAttributesInRange:))]
#[unsafe(method_family = none)]
fn fixAttributesInRange(&self, range: NSRange);
);
}
impl private_NSAttributedStringAttributeFixing::Sealed for NSMutableAttributedString {}
unsafe impl NSAttributedStringAttributeFixing for NSMutableAttributedString {}
pub type NSAttributedStringDocumentType = NSString;
extern "C" {
pub static NSPlainTextDocumentType: &'static NSAttributedStringDocumentType;
}
extern "C" {
pub static NSRTFTextDocumentType: &'static NSAttributedStringDocumentType;
}
extern "C" {
pub static NSRTFDTextDocumentType: &'static NSAttributedStringDocumentType;
}
extern "C" {
pub static NSHTMLTextDocumentType: &'static NSAttributedStringDocumentType;
}
pub type NSTextLayoutSectionKey = NSString;
extern "C" {
pub static NSTextLayoutSectionOrientation: &'static NSTextLayoutSectionKey;
}
extern "C" {
pub static NSTextLayoutSectionRange: &'static NSTextLayoutSectionKey;
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSTextScalingType(pub NSInteger);
impl NSTextScalingType {
#[doc(alias = "NSTextScalingStandard")]
pub const ScalingStandard: Self = Self(0);
#[doc(alias = "NSTextScalingiOS")]
pub const ScalingiOS: Self = Self(1);
}
unsafe impl Encode for NSTextScalingType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for NSTextScalingType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type NSAttributedStringDocumentAttributeKey = NSString;
extern "C" {
pub static NSDocumentTypeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSCharacterEncodingDocumentAttribute:
&'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSDefaultAttributesDocumentAttribute:
&'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSPaperSizeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSViewSizeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSViewZoomDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSViewModeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSDefaultFontExcludedDocumentAttribute:
&'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSReadOnlyDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSBackgroundColorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSHyphenationFactorDocumentAttribute:
&'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSDefaultTabIntervalDocumentAttribute:
&'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSTextLayoutSectionsAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSTextScalingDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSSourceTextScalingDocumentAttribute:
&'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSCocoaVersionDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
pub type NSAttributedStringDocumentReadingOptionKey = NSString;
extern "C" {
pub static NSDocumentTypeDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey;
}
extern "C" {
pub static NSDefaultAttributesDocumentOption:
&'static NSAttributedStringDocumentReadingOptionKey;
}
extern "C" {
pub static NSCharacterEncodingDocumentOption:
&'static NSAttributedStringDocumentReadingOptionKey;
}
extern "C" {
pub static NSTargetTextScalingDocumentOption:
&'static NSAttributedStringDocumentReadingOptionKey;
}
extern "C" {
pub static NSSourceTextScalingDocumentOption:
&'static NSAttributedStringDocumentReadingOptionKey;
}
extern "C" {
pub static NSTextKit1ListMarkerFormatDocumentOption:
&'static NSAttributedStringDocumentReadingOptionKey;
}
mod private_NSAttributedStringDocumentFormats {
pub trait Sealed {}
}
pub unsafe trait NSAttributedStringDocumentFormats:
ClassType + Sized + private_NSAttributedStringDocumentFormats::Sealed
{
extern_methods!(
#[unsafe(method(initWithURL:options:documentAttributes:error:_))]
#[unsafe(method_family = init)]
unsafe fn initWithURL_options_documentAttributes_error(
this: Allocated<Self>,
url: &NSURL,
options: &NSDictionary<NSAttributedStringDocumentReadingOptionKey, AnyObject>,
dict: Option<
&mut Option<
Retained<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>,
>,
>,
) -> Result<Retained<Self>, Retained<NSError>>;
#[unsafe(method(initWithData:options:documentAttributes:error:_))]
#[unsafe(method_family = init)]
unsafe fn initWithData_options_documentAttributes_error(
this: Allocated<Self>,
data: &NSData,
options: &NSDictionary<NSAttributedStringDocumentReadingOptionKey, AnyObject>,
dict: Option<
&mut Option<
Retained<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>,
>,
>,
) -> Result<Retained<Self>, Retained<NSError>>;
#[unsafe(method(dataFromRange:documentAttributes:error:_))]
#[unsafe(method_family = none)]
unsafe fn dataFromRange_documentAttributes_error(
&self,
range: NSRange,
dict: &NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>,
) -> Result<Retained<NSData>, Retained<NSError>>;
#[unsafe(method(fileWrapperFromRange:documentAttributes:error:_))]
#[unsafe(method_family = none)]
unsafe fn fileWrapperFromRange_documentAttributes_error(
&self,
range: NSRange,
dict: &NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>,
) -> Result<Retained<NSFileWrapper>, Retained<NSError>>;
);
}
impl private_NSAttributedStringDocumentFormats::Sealed for NSAttributedString {}
unsafe impl NSAttributedStringDocumentFormats for NSAttributedString {}
mod private_NSMutableAttributedStringDocumentFormats {
pub trait Sealed {}
}
pub unsafe trait NSMutableAttributedStringDocumentFormats:
ClassType + Sized + private_NSMutableAttributedStringDocumentFormats::Sealed
{
extern_methods!(
#[unsafe(method(readFromURL:options:documentAttributes:error:_))]
#[unsafe(method_family = none)]
unsafe fn readFromURL_options_documentAttributes_error(
&self,
url: &NSURL,
opts: &NSDictionary<NSAttributedStringDocumentReadingOptionKey, AnyObject>,
dict: Option<
&mut Option<
Retained<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>,
>,
>,
) -> Result<(), Retained<NSError>>;
#[unsafe(method(readFromData:options:documentAttributes:error:_))]
#[unsafe(method_family = none)]
unsafe fn readFromData_options_documentAttributes_error(
&self,
data: &NSData,
opts: &NSDictionary<NSAttributedStringDocumentReadingOptionKey, AnyObject>,
dict: Option<
&mut Option<
Retained<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>,
>,
>,
) -> Result<(), Retained<NSError>>;
);
}
impl private_NSMutableAttributedStringDocumentFormats::Sealed for NSMutableAttributedString {}
unsafe impl NSMutableAttributedStringDocumentFormats for NSMutableAttributedString {}
mod private_NSAttributedStringKitAdditions {
pub trait Sealed {}
}
pub unsafe trait NSAttributedStringKitAdditions:
ClassType + Sized + private_NSAttributedStringKitAdditions::Sealed
{
extern_methods!(
#[unsafe(method(containsAttachmentsInRange:))]
#[unsafe(method_family = none)]
fn containsAttachmentsInRange(&self, range: NSRange) -> bool;
#[unsafe(method(prefersRTFDInRange:))]
#[unsafe(method_family = none)]
fn prefersRTFDInRange(&self, range: NSRange) -> bool;
);
}
impl private_NSAttributedStringKitAdditions::Sealed for NSAttributedString {}
unsafe impl NSAttributedStringKitAdditions for NSAttributedString {}
extern "C" {
pub static NSCursorAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSToolTipAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSMarkedClauseSegmentAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSTextAlternativesAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSSpellingStateAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSSuperscriptAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
pub static NSGlyphInfoAttributeName: &'static NSAttributedStringKey;
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSSpellingState(pub NSInteger);
impl NSSpellingState {
#[doc(alias = "NSSpellingStateSpellingFlag")]
pub const SpellingFlag: Self = Self(1 << 0);
#[doc(alias = "NSSpellingStateGrammarFlag")]
pub const GrammarFlag: Self = Self(1 << 1);
}
unsafe impl Encode for NSSpellingState {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for NSSpellingState {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
mod private_NSAttributedStringAppKitAttributeFixing {
pub trait Sealed {}
}
pub unsafe trait NSAttributedStringAppKitAttributeFixing:
ClassType + Sized + private_NSAttributedStringAppKitAttributeFixing::Sealed
{
extern_methods!(
#[unsafe(method(fixFontAttributeInRange:))]
#[unsafe(method_family = none)]
fn fixFontAttributeInRange(&self, range: NSRange);
#[unsafe(method(fixParagraphStyleAttributeInRange:))]
#[unsafe(method_family = none)]
fn fixParagraphStyleAttributeInRange(&self, range: NSRange);
#[unsafe(method(fixAttachmentAttributeInRange:))]
#[unsafe(method_family = none)]
fn fixAttachmentAttributeInRange(&self, range: NSRange);
);
}
impl private_NSAttributedStringAppKitAttributeFixing::Sealed for NSMutableAttributedString {}
unsafe impl NSAttributedStringAppKitAttributeFixing for NSMutableAttributedString {}
extern "C" {
pub static NSMacSimpleTextDocumentType: &'static NSAttributedStringDocumentType;
}
extern "C" {
pub static NSDocFormatTextDocumentType: &'static NSAttributedStringDocumentType;
}
extern "C" {
pub static NSWordMLTextDocumentType: &'static NSAttributedStringDocumentType;
}
extern "C" {
pub static NSWebArchiveTextDocumentType: &'static NSAttributedStringDocumentType;
}
extern "C" {
pub static NSOfficeOpenXMLTextDocumentType: &'static NSAttributedStringDocumentType;
}
extern "C" {
pub static NSOpenDocumentTextDocumentType: &'static NSAttributedStringDocumentType;
}
extern "C" {
pub static NSConvertedDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSFileTypeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSTitleDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSCompanyDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSCopyrightDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSSubjectDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSAuthorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSKeywordsDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSCommentDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSEditorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSCreationTimeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSModificationTimeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSManagerDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSCategoryDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSAppearanceDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSExcludedElementsDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSTextEncodingNameDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSPrefixSpacesDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSLeftMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSRightMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSTopMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSBottomMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey;
}
extern "C" {
pub static NSTextEncodingNameDocumentOption:
&'static NSAttributedStringDocumentReadingOptionKey;
}
extern "C" {
pub static NSBaseURLDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey;
}
extern "C" {
pub static NSTimeoutDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey;
}
extern "C" {
pub static NSWebPreferencesDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey;
}
extern "C" {
pub static NSWebResourceLoadDelegateDocumentOption:
&'static NSAttributedStringDocumentReadingOptionKey;
}
extern "C" {
pub static NSTextSizeMultiplierDocumentOption:
&'static NSAttributedStringDocumentReadingOptionKey;
}
extern "C" {
pub static NSFileTypeDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey;
}
mod private_NSAttributedStringAppKitDocumentFormats {
pub trait Sealed {}
}
pub unsafe trait NSAttributedStringAppKitDocumentFormats:
ClassType + Sized + private_NSAttributedStringAppKitDocumentFormats::Sealed
{
extern_methods!(
#[unsafe(method(initWithRTF:documentAttributes:))]
#[unsafe(method_family = init)]
unsafe fn initWithRTF_documentAttributes(
this: Allocated<Self>,
data: &NSData,
dict: Option<
&mut Option<
Retained<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>,
>,
>,
) -> Option<Retained<Self>>;
#[unsafe(method(initWithRTFD:documentAttributes:))]
#[unsafe(method_family = init)]
unsafe fn initWithRTFD_documentAttributes(
this: Allocated<Self>,
data: &NSData,
dict: Option<
&mut Option<
Retained<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>,
>,
>,
) -> Option<Retained<Self>>;
#[unsafe(method(initWithHTML:documentAttributes:))]
#[unsafe(method_family = init)]
unsafe fn initWithHTML_documentAttributes(
this: Allocated<Self>,
data: &NSData,
dict: Option<
&mut Option<
Retained<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>,
>,
>,
) -> Option<Retained<Self>>;
#[unsafe(method(initWithHTML:baseURL:documentAttributes:))]
#[unsafe(method_family = init)]
unsafe fn initWithHTML_baseURL_documentAttributes(
this: Allocated<Self>,
data: &NSData,
base: &NSURL,
dict: Option<
&mut Option<
Retained<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>,
>,
>,
) -> Option<Retained<Self>>;
#[unsafe(method(initWithDocFormat:documentAttributes:))]
#[unsafe(method_family = init)]
unsafe fn initWithDocFormat_documentAttributes(
this: Allocated<Self>,
data: &NSData,
dict: Option<
&mut Option<
Retained<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>,
>,
>,
) -> Option<Retained<Self>>;
#[unsafe(method(initWithHTML:options:documentAttributes:))]
#[unsafe(method_family = init)]
unsafe fn initWithHTML_options_documentAttributes(
this: Allocated<Self>,
data: &NSData,
options: &NSDictionary<NSAttributedStringDocumentReadingOptionKey, AnyObject>,
dict: Option<
&mut Option<
Retained<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>,
>,
>,
) -> Option<Retained<Self>>;
#[unsafe(method(initWithRTFDFileWrapper:documentAttributes:))]
#[unsafe(method_family = init)]
unsafe fn initWithRTFDFileWrapper_documentAttributes(
this: Allocated<Self>,
wrapper: &NSFileWrapper,
dict: Option<
&mut Option<
Retained<NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>>,
>,
>,
) -> Option<Retained<Self>>;
#[unsafe(method(RTFFromRange:documentAttributes:))]
#[unsafe(method_family = none)]
unsafe fn RTFFromRange_documentAttributes(
&self,
range: NSRange,
dict: &NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>,
) -> Option<Retained<NSData>>;
#[unsafe(method(RTFDFromRange:documentAttributes:))]
#[unsafe(method_family = none)]
unsafe fn RTFDFromRange_documentAttributes(
&self,
range: NSRange,
dict: &NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>,
) -> Option<Retained<NSData>>;
#[unsafe(method(RTFDFileWrapperFromRange:documentAttributes:))]
#[unsafe(method_family = none)]
unsafe fn RTFDFileWrapperFromRange_documentAttributes(
&self,
range: NSRange,
dict: &NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>,
) -> Option<Retained<NSFileWrapper>>;
#[unsafe(method(docFormatFromRange:documentAttributes:))]
#[unsafe(method_family = none)]
unsafe fn docFormatFromRange_documentAttributes(
&self,
range: NSRange,
dict: &NSDictionary<NSAttributedStringDocumentAttributeKey, AnyObject>,
) -> Option<Retained<NSData>>;
);
}
impl private_NSAttributedStringAppKitDocumentFormats::Sealed for NSAttributedString {}
unsafe impl NSAttributedStringAppKitDocumentFormats for NSAttributedString {}
mod private_NSAttributedStringAppKitAdditions {
pub trait Sealed {}
}
pub unsafe trait NSAttributedStringAppKitAdditions:
ClassType + Sized + private_NSAttributedStringAppKitAdditions::Sealed
{
extern_methods!(
#[unsafe(method(fontAttributesInRange:))]
#[unsafe(method_family = none)]
fn fontAttributesInRange(
&self,
range: NSRange,
) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>;
#[unsafe(method(rulerAttributesInRange:))]
#[unsafe(method_family = none)]
fn rulerAttributesInRange(
&self,
range: NSRange,
) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>;
#[unsafe(method(lineBreakBeforeIndex:withinRange:))]
#[unsafe(method_family = none)]
fn lineBreakBeforeIndex_withinRange(
&self,
location: NSUInteger,
a_range: NSRange,
) -> NSUInteger;
#[unsafe(method(lineBreakByHyphenatingBeforeIndex:withinRange:))]
#[unsafe(method_family = none)]
fn lineBreakByHyphenatingBeforeIndex_withinRange(
&self,
location: NSUInteger,
a_range: NSRange,
) -> NSUInteger;
#[unsafe(method(doubleClickAtIndex:))]
#[unsafe(method_family = none)]
fn doubleClickAtIndex(&self, location: NSUInteger) -> NSRange;
#[unsafe(method(nextWordFromIndex:forward:))]
#[unsafe(method_family = none)]
fn nextWordFromIndex_forward(&self, location: NSUInteger, is_forward: bool) -> NSUInteger;
#[cfg(feature = "NSTextTable")]
#[unsafe(method(rangeOfTextBlock:atIndex:))]
#[unsafe(method_family = none)]
fn rangeOfTextBlock_atIndex(&self, block: &NSTextBlock, location: NSUInteger) -> NSRange;
#[cfg(feature = "NSTextTable")]
#[unsafe(method(rangeOfTextTable:atIndex:))]
#[unsafe(method_family = none)]
fn rangeOfTextTable_atIndex(&self, table: &NSTextTable, location: NSUInteger) -> NSRange;
#[cfg(feature = "NSTextList")]
#[unsafe(method(rangeOfTextList:atIndex:))]
#[unsafe(method_family = none)]
fn rangeOfTextList_atIndex(&self, list: &NSTextList, location: NSUInteger) -> NSRange;
#[cfg(feature = "NSTextList")]
#[unsafe(method(itemNumberInTextList:atIndex:))]
#[unsafe(method_family = none)]
fn itemNumberInTextList_atIndex(
&self,
list: &NSTextList,
location: NSUInteger,
) -> NSInteger;
);
}
impl private_NSAttributedStringAppKitAdditions::Sealed for NSAttributedString {}
unsafe impl NSAttributedStringAppKitAdditions for NSAttributedString {}
mod private_NSAttributedStringPasteboardAdditions {
pub trait Sealed {}
}
pub unsafe trait NSAttributedStringPasteboardAdditions:
ClassType + Sized + private_NSAttributedStringPasteboardAdditions::Sealed
{
extern_methods!(
#[unsafe(method(textTypes))]
#[unsafe(method_family = none)]
fn textTypes() -> Retained<NSArray<NSString>>;
#[unsafe(method(textUnfilteredTypes))]
#[unsafe(method_family = none)]
fn textUnfilteredTypes() -> Retained<NSArray<NSString>>;
);
}
impl private_NSAttributedStringPasteboardAdditions::Sealed for NSAttributedString {}
unsafe impl NSAttributedStringPasteboardAdditions for NSAttributedString {}
#[cfg(feature = "NSPasteboard")]
extern_conformance!(
unsafe impl NSPasteboardReading for NSAttributedString {}
);
#[cfg(feature = "NSPasteboard")]
extern_conformance!(
unsafe impl NSPasteboardWriting for NSAttributedString {}
);
mod private_NSMutableAttributedStringAppKitAdditions {
pub trait Sealed {}
}
pub unsafe trait NSMutableAttributedStringAppKitAdditions:
ClassType + Sized + private_NSMutableAttributedStringAppKitAdditions::Sealed
{
extern_methods!(
#[unsafe(method(superscriptRange:))]
#[unsafe(method_family = none)]
fn superscriptRange(&self, range: NSRange);
#[unsafe(method(subscriptRange:))]
#[unsafe(method_family = none)]
fn subscriptRange(&self, range: NSRange);
#[unsafe(method(unscriptRange:))]
#[unsafe(method_family = none)]
fn unscriptRange(&self, range: NSRange);
#[cfg(feature = "NSFontManager")]
#[unsafe(method(applyFontTraits:range:))]
#[unsafe(method_family = none)]
fn applyFontTraits_range(&self, trait_mask: NSFontTraitMask, range: NSRange);
#[cfg(feature = "NSText")]
#[unsafe(method(setAlignment:range:))]
#[unsafe(method_family = none)]
fn setAlignment_range(&self, alignment: NSTextAlignment, range: NSRange);
#[cfg(feature = "NSText")]
#[unsafe(method(setBaseWritingDirection:range:))]
#[unsafe(method_family = none)]
fn setBaseWritingDirection_range(
&self,
writing_direction: NSWritingDirection,
range: NSRange,
);
);
}
impl private_NSMutableAttributedStringAppKitAdditions::Sealed for NSMutableAttributedString {}
unsafe impl NSMutableAttributedStringAppKitAdditions for NSMutableAttributedString {}
pub static NSUnderlinePatternSolid: NSUnderlineStyle =
NSUnderlineStyle(NSUnderlineStyle::PatternSolid.0);
pub static NSUnderlinePatternDot: NSUnderlineStyle =
NSUnderlineStyle(NSUnderlineStyle::PatternDot.0);
pub static NSUnderlinePatternDash: NSUnderlineStyle =
NSUnderlineStyle(NSUnderlineStyle::PatternDash.0);
pub static NSUnderlinePatternDashDot: NSUnderlineStyle =
NSUnderlineStyle(NSUnderlineStyle::PatternDashDot.0);
pub static NSUnderlinePatternDashDotDot: NSUnderlineStyle =
NSUnderlineStyle(NSUnderlineStyle::PatternDashDotDot.0);
pub static NSUnderlineByWord: NSUnderlineStyle = NSUnderlineStyle(NSUnderlineStyle::ByWord.0);
extern "C" {
#[deprecated = "This attribute is bound to a specific implementation of ATS feature and not generically supported by wide range of fonts. The majority of characters accessed through this API are now encoded in the Unicode standard. Use the CTFont feature API for fine control over character shape choices."]
pub static NSCharacterShapeAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
#[deprecated]
pub static NSUsesScreenFontsDocumentAttribute: &'static NSAttributedStringKey;
}
extern "C" {
#[deprecated = "This attribute is not supported with TextKit 2"]
pub static NSObliquenessAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
#[deprecated = "This attribute is not supported with TextKit 2"]
pub static NSExpansionAttributeName: &'static NSAttributedStringKey;
}
extern "C" {
#[deprecated = "This attribute is not supported with TextKit 2"]
pub static NSVerticalGlyphFormAttributeName: &'static NSAttributedStringKey;
}
#[deprecated = "Use NSUnderlineStyleNone instead"]
pub const NSNoUnderlineStyle: c_uint = 0;
#[deprecated = "Use NSUnderlineStyleSingle instead"]
pub const NSSingleUnderlineStyle: c_uint = 1;
extern "C" {
#[deprecated = "Use NSStrikethroughStyleAttributeName instead"]
pub static NSUnderlineStrikethroughMask: NSUInteger;
}
extern "C" {
#[deprecated = "Use NSUnderlineByWord instead"]
pub static NSUnderlineByWordMask: NSUInteger;
}
mod private_NSAttributedStringNSDeprecatedKitAdditions {
pub trait Sealed {}
}
#[doc(alias = "NSDeprecatedKitAdditions")]
pub unsafe trait NSAttributedStringNSDeprecatedKitAdditions:
ClassType + Sized + private_NSAttributedStringNSDeprecatedKitAdditions::Sealed
{
extern_methods!(
#[unsafe(method(containsAttachments))]
#[unsafe(method_family = none)]
fn containsAttachments(&self) -> bool;
#[deprecated]
#[unsafe(method(textFileTypes))]
#[unsafe(method_family = none)]
fn textFileTypes() -> Retained<NSArray>;
#[deprecated]
#[unsafe(method(textPasteboardTypes))]
#[unsafe(method_family = none)]
fn textPasteboardTypes() -> Retained<NSArray>;
#[deprecated]
#[unsafe(method(textUnfilteredFileTypes))]
#[unsafe(method_family = none)]
fn textUnfilteredFileTypes() -> Retained<NSArray>;
#[deprecated]
#[unsafe(method(textUnfilteredPasteboardTypes))]
#[unsafe(method_family = none)]
fn textUnfilteredPasteboardTypes() -> Retained<NSArray>;
#[deprecated = "Use -initWithURL:options:documentAttributes:error: instead"]
#[unsafe(method(initWithURL:documentAttributes:))]
#[unsafe(method_family = init)]
unsafe fn initWithURL_documentAttributes(
this: Allocated<Self>,
url: &NSURL,
dict: Option<&mut Option<Retained<NSDictionary>>>,
) -> Option<Retained<Self>>;
#[deprecated = "Use -initWithURL:options:documentAttributes:error: instead"]
#[unsafe(method(initWithPath:documentAttributes:))]
#[unsafe(method_family = init)]
unsafe fn initWithPath_documentAttributes(
this: Allocated<Self>,
path: &NSString,
dict: Option<&mut Option<Retained<NSDictionary>>>,
) -> Option<Retained<Self>>;
#[deprecated = "Use NSDataDetector instead"]
#[unsafe(method(URLAtIndex:effectiveRange:))]
#[unsafe(method_family = none)]
unsafe fn URLAtIndex_effectiveRange(
&self,
location: NSUInteger,
effective_range: NSRangePointer,
) -> Option<Retained<NSURL>>;
);
}
impl private_NSAttributedStringNSDeprecatedKitAdditions::Sealed for NSAttributedString {}
unsafe impl NSAttributedStringNSDeprecatedKitAdditions for NSAttributedString {}