//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontsymbolictraits?language=objc)
pub type NSFontSymbolicTraits = u32;

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontdescriptorsymbolictraits?language=objc)
// NS_OPTIONS
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSFontDescriptorSymbolicTraits(pub u32);
bitflags::bitflags! {
    impl NSFontDescriptorSymbolicTraits: u32 {
        #[doc(alias = "NSFontDescriptorTraitItalic")]
        const TraitItalic = 1<<0;
        #[doc(alias = "NSFontDescriptorTraitBold")]
        const TraitBold = 1<<1;
        #[doc(alias = "NSFontDescriptorTraitExpanded")]
        const TraitExpanded = 1<<5;
        #[doc(alias = "NSFontDescriptorTraitCondensed")]
        const TraitCondensed = 1<<6;
        #[doc(alias = "NSFontDescriptorTraitMonoSpace")]
        const TraitMonoSpace = 1<<10;
        #[doc(alias = "NSFontDescriptorTraitVertical")]
        const TraitVertical = 1<<11;
        #[doc(alias = "NSFontDescriptorTraitUIOptimized")]
        const TraitUIOptimized = 1<<12;
        #[doc(alias = "NSFontDescriptorTraitTightLeading")]
        const TraitTightLeading = 1<<15;
        #[doc(alias = "NSFontDescriptorTraitLooseLeading")]
        const TraitLooseLeading = 1<<16;
        #[doc(alias = "NSFontDescriptorTraitEmphasized")]
        const TraitEmphasized = NSFontDescriptorSymbolicTraits::TraitBold.0;
        #[doc(alias = "NSFontDescriptorClassMask")]
        const ClassMask = 0xF0000000;
        #[doc(alias = "NSFontDescriptorClassUnknown")]
        const ClassUnknown = 0<<28;
        #[doc(alias = "NSFontDescriptorClassOldStyleSerifs")]
        const ClassOldStyleSerifs = 1<<28;
        #[doc(alias = "NSFontDescriptorClassTransitionalSerifs")]
        const ClassTransitionalSerifs = 2<<28;
        #[doc(alias = "NSFontDescriptorClassModernSerifs")]
        const ClassModernSerifs = 3<<28;
        #[doc(alias = "NSFontDescriptorClassClarendonSerifs")]
        const ClassClarendonSerifs = 4<<28;
        #[doc(alias = "NSFontDescriptorClassSlabSerifs")]
        const ClassSlabSerifs = 5<<28;
        #[doc(alias = "NSFontDescriptorClassFreeformSerifs")]
        const ClassFreeformSerifs = 7<<28;
        #[doc(alias = "NSFontDescriptorClassSansSerif")]
        const ClassSansSerif = 8<<28;
        #[doc(alias = "NSFontDescriptorClassOrnamentals")]
        const ClassOrnamentals = 9<<28;
        #[doc(alias = "NSFontDescriptorClassScripts")]
        const ClassScripts = 10<<28;
        #[doc(alias = "NSFontDescriptorClassSymbolic")]
        const ClassSymbolic = 12<<28;
    }
}

unsafe impl Encode for NSFontDescriptorSymbolicTraits {
    const ENCODING: Encoding = u32::ENCODING;
}

unsafe impl RefEncode for NSFontDescriptorSymbolicTraits {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontdescriptorattributename?language=objc)
// NS_TYPED_EXTENSIBLE_ENUM
pub type NSFontDescriptorAttributeName = NSString;

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontdescriptortraitkey?language=objc)
// NS_TYPED_ENUM
pub type NSFontDescriptorTraitKey = NSString;

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontdescriptorvariationkey?language=objc)
// NS_TYPED_ENUM
pub type NSFontDescriptorVariationKey = NSString;

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontdescriptorfeaturekey?language=objc)
// NS_TYPED_EXTENSIBLE_ENUM
pub type NSFontDescriptorFeatureKey = NSString;

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontweight?language=objc)
// NS_TYPED_EXTENSIBLE_ENUM
#[cfg(feature = "objc2-core-foundation")]
pub type NSFontWeight = CGFloat;

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontwidth?language=objc)
// NS_TYPED_EXTENSIBLE_ENUM
#[cfg(feature = "objc2-core-foundation")]
pub type NSFontWidth = CGFloat;

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontdescriptorsystemdesign?language=objc)
// NS_TYPED_ENUM
pub type NSFontDescriptorSystemDesign = NSString;

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfonttextstyle?language=objc)
// NS_TYPED_ENUM
pub type NSFontTextStyle = NSString;

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfonttextstyleoptionkey?language=objc)
// NS_TYPED_ENUM
pub type NSFontTextStyleOptionKey = NSString;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontdescriptor?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSFontDescriptor;
);

unsafe impl NSCoding for NSFontDescriptor {}

unsafe impl NSCopying for NSFontDescriptor {}

unsafe impl CopyingHelper for NSFontDescriptor {
    type Result = Self;
}

unsafe impl NSObjectProtocol for NSFontDescriptor {}

unsafe impl NSSecureCoding for NSFontDescriptor {}

impl NSFontDescriptor {
    extern_methods!(
        #[unsafe(method(postscriptName))]
        #[unsafe(method_family = none)]
        pub unsafe fn postscriptName(&self) -> Option<Retained<NSString>>;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(pointSize))]
        #[unsafe(method_family = none)]
        pub unsafe fn pointSize(&self) -> CGFloat;

        #[unsafe(method(matrix))]
        #[unsafe(method_family = none)]
        pub unsafe fn matrix(&self) -> Option<Retained<NSAffineTransform>>;

        #[unsafe(method(symbolicTraits))]
        #[unsafe(method_family = none)]
        pub unsafe fn symbolicTraits(&self) -> NSFontDescriptorSymbolicTraits;

        #[unsafe(method(requiresFontAssetRequest))]
        #[unsafe(method_family = none)]
        pub unsafe fn requiresFontAssetRequest(&self) -> bool;

        #[unsafe(method(objectForKey:))]
        #[unsafe(method_family = none)]
        pub unsafe fn objectForKey(
            &self,
            attribute: &NSFontDescriptorAttributeName,
        ) -> Option<Retained<AnyObject>>;

        #[unsafe(method(fontAttributes))]
        #[unsafe(method_family = none)]
        pub unsafe fn fontAttributes(
            &self,
        ) -> Retained<NSDictionary<NSFontDescriptorAttributeName, AnyObject>>;

        #[unsafe(method(fontDescriptorWithFontAttributes:))]
        #[unsafe(method_family = none)]
        pub unsafe fn fontDescriptorWithFontAttributes(
            attributes: Option<&NSDictionary<NSFontDescriptorAttributeName, AnyObject>>,
        ) -> Retained<NSFontDescriptor>;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(fontDescriptorWithName:size:))]
        #[unsafe(method_family = none)]
        pub unsafe fn fontDescriptorWithName_size(
            font_name: &NSString,
            size: CGFloat,
        ) -> Retained<NSFontDescriptor>;

        #[unsafe(method(fontDescriptorWithName:matrix:))]
        #[unsafe(method_family = none)]
        pub unsafe fn fontDescriptorWithName_matrix(
            font_name: &NSString,
            matrix: &NSAffineTransform,
        ) -> Retained<NSFontDescriptor>;

        #[unsafe(method(initWithFontAttributes:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithFontAttributes(
            this: Allocated<Self>,
            attributes: Option<&NSDictionary<NSFontDescriptorAttributeName, AnyObject>>,
        ) -> Retained<Self>;

        #[unsafe(method(matchingFontDescriptorsWithMandatoryKeys:))]
        #[unsafe(method_family = none)]
        pub unsafe fn matchingFontDescriptorsWithMandatoryKeys(
            &self,
            mandatory_keys: Option<&NSSet<NSFontDescriptorAttributeName>>,
        ) -> Retained<NSArray<NSFontDescriptor>>;

        #[unsafe(method(matchingFontDescriptorWithMandatoryKeys:))]
        #[unsafe(method_family = none)]
        pub unsafe fn matchingFontDescriptorWithMandatoryKeys(
            &self,
            mandatory_keys: Option<&NSSet<NSFontDescriptorAttributeName>>,
        ) -> Option<Retained<NSFontDescriptor>>;

        #[unsafe(method(fontDescriptorByAddingAttributes:))]
        #[unsafe(method_family = none)]
        pub unsafe fn fontDescriptorByAddingAttributes(
            &self,
            attributes: &NSDictionary<NSFontDescriptorAttributeName, AnyObject>,
        ) -> Retained<NSFontDescriptor>;

        #[unsafe(method(fontDescriptorWithSymbolicTraits:))]
        #[unsafe(method_family = none)]
        pub unsafe fn fontDescriptorWithSymbolicTraits(
            &self,
            symbolic_traits: NSFontDescriptorSymbolicTraits,
        ) -> Retained<NSFontDescriptor>;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(fontDescriptorWithSize:))]
        #[unsafe(method_family = none)]
        pub unsafe fn fontDescriptorWithSize(
            &self,
            new_point_size: CGFloat,
        ) -> Retained<NSFontDescriptor>;

        #[unsafe(method(fontDescriptorWithMatrix:))]
        #[unsafe(method_family = none)]
        pub unsafe fn fontDescriptorWithMatrix(
            &self,
            matrix: &NSAffineTransform,
        ) -> Retained<NSFontDescriptor>;

        #[unsafe(method(fontDescriptorWithFace:))]
        #[unsafe(method_family = none)]
        pub unsafe fn fontDescriptorWithFace(
            &self,
            new_face: &NSString,
        ) -> Retained<NSFontDescriptor>;

        #[unsafe(method(fontDescriptorWithFamily:))]
        #[unsafe(method_family = none)]
        pub unsafe fn fontDescriptorWithFamily(
            &self,
            new_family: &NSString,
        ) -> Retained<NSFontDescriptor>;

        #[unsafe(method(fontDescriptorWithDesign:))]
        #[unsafe(method_family = none)]
        pub unsafe fn fontDescriptorWithDesign(
            &self,
            design: &NSFontDescriptorSystemDesign,
        ) -> Option<Retained<Self>>;
    );
}

/// Methods declared on superclass `NSObject`.
impl NSFontDescriptor {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontfamilyattribute?language=objc)
    pub static NSFontFamilyAttribute: &'static NSFontDescriptorAttributeName;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontnameattribute?language=objc)
    pub static NSFontNameAttribute: &'static NSFontDescriptorAttributeName;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontfaceattribute?language=objc)
    pub static NSFontFaceAttribute: &'static NSFontDescriptorAttributeName;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontsizeattribute?language=objc)
    pub static NSFontSizeAttribute: &'static NSFontDescriptorAttributeName;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontvisiblenameattribute?language=objc)
    pub static NSFontVisibleNameAttribute: &'static NSFontDescriptorAttributeName;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontmatrixattribute?language=objc)
    pub static NSFontMatrixAttribute: &'static NSFontDescriptorAttributeName;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontvariationattribute?language=objc)
    pub static NSFontVariationAttribute: &'static NSFontDescriptorAttributeName;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontcharactersetattribute?language=objc)
    pub static NSFontCharacterSetAttribute: &'static NSFontDescriptorAttributeName;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontcascadelistattribute?language=objc)
    pub static NSFontCascadeListAttribute: &'static NSFontDescriptorAttributeName;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfonttraitsattribute?language=objc)
    pub static NSFontTraitsAttribute: &'static NSFontDescriptorAttributeName;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontfixedadvanceattribute?language=objc)
    pub static NSFontFixedAdvanceAttribute: &'static NSFontDescriptorAttributeName;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontfeaturesettingsattribute?language=objc)
    pub static NSFontFeatureSettingsAttribute: &'static NSFontDescriptorAttributeName;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontsymbolictrait?language=objc)
    pub static NSFontSymbolicTrait: &'static NSFontDescriptorTraitKey;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontweighttrait?language=objc)
    pub static NSFontWeightTrait: &'static NSFontDescriptorTraitKey;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontwidthtrait?language=objc)
    pub static NSFontWidthTrait: &'static NSFontDescriptorTraitKey;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontslanttrait?language=objc)
    pub static NSFontSlantTrait: &'static NSFontDescriptorTraitKey;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontvariationaxisidentifierkey?language=objc)
    pub static NSFontVariationAxisIdentifierKey: &'static NSFontDescriptorVariationKey;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontvariationaxisminimumvaluekey?language=objc)
    pub static NSFontVariationAxisMinimumValueKey: &'static NSFontDescriptorVariationKey;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontvariationaxismaximumvaluekey?language=objc)
    pub static NSFontVariationAxisMaximumValueKey: &'static NSFontDescriptorVariationKey;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontvariationaxisdefaultvaluekey?language=objc)
    pub static NSFontVariationAxisDefaultValueKey: &'static NSFontDescriptorVariationKey;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontvariationaxisnamekey?language=objc)
    pub static NSFontVariationAxisNameKey: &'static NSFontDescriptorVariationKey;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontfeaturetypeidentifierkey?language=objc)
    pub static NSFontFeatureTypeIdentifierKey: &'static NSFontDescriptorFeatureKey;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontfeatureselectoridentifierkey?language=objc)
    pub static NSFontFeatureSelectorIdentifierKey: &'static NSFontDescriptorFeatureKey;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontweightultralight?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static NSFontWeightUltraLight: NSFontWeight;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontweightthin?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static NSFontWeightThin: NSFontWeight;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontweightlight?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static NSFontWeightLight: NSFontWeight;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontweightregular?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static NSFontWeightRegular: NSFontWeight;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontweightmedium?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static NSFontWeightMedium: NSFontWeight;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontweightsemibold?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static NSFontWeightSemibold: NSFontWeight;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontweightbold?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static NSFontWeightBold: NSFontWeight;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontweightheavy?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static NSFontWeightHeavy: NSFontWeight;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontweightblack?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static NSFontWeightBlack: NSFontWeight;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontwidthcompressed?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static NSFontWidthCompressed: NSFontWidth;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontwidthcondensed?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static NSFontWidthCondensed: NSFontWidth;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontwidthstandard?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static NSFontWidthStandard: NSFontWidth;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontwidthexpanded?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static NSFontWidthExpanded: NSFontWidth;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontdescriptorsystemdesigndefault?language=objc)
    pub static NSFontDescriptorSystemDesignDefault: &'static NSFontDescriptorSystemDesign;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontdescriptorsystemdesignserif?language=objc)
    pub static NSFontDescriptorSystemDesignSerif: &'static NSFontDescriptorSystemDesign;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontdescriptorsystemdesignmonospaced?language=objc)
    pub static NSFontDescriptorSystemDesignMonospaced: &'static NSFontDescriptorSystemDesign;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontdescriptorsystemdesignrounded?language=objc)
    pub static NSFontDescriptorSystemDesignRounded: &'static NSFontDescriptorSystemDesign;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfonttextstylelargetitle?language=objc)
    pub static NSFontTextStyleLargeTitle: &'static NSFontTextStyle;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfonttextstyletitle1?language=objc)
    pub static NSFontTextStyleTitle1: &'static NSFontTextStyle;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfonttextstyletitle2?language=objc)
    pub static NSFontTextStyleTitle2: &'static NSFontTextStyle;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfonttextstyletitle3?language=objc)
    pub static NSFontTextStyleTitle3: &'static NSFontTextStyle;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfonttextstyleheadline?language=objc)
    pub static NSFontTextStyleHeadline: &'static NSFontTextStyle;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfonttextstylesubheadline?language=objc)
    pub static NSFontTextStyleSubheadline: &'static NSFontTextStyle;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfonttextstylebody?language=objc)
    pub static NSFontTextStyleBody: &'static NSFontTextStyle;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfonttextstylecallout?language=objc)
    pub static NSFontTextStyleCallout: &'static NSFontTextStyle;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfonttextstylefootnote?language=objc)
    pub static NSFontTextStyleFootnote: &'static NSFontTextStyle;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfonttextstylecaption1?language=objc)
    pub static NSFontTextStyleCaption1: &'static NSFontTextStyle;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfonttextstylecaption2?language=objc)
    pub static NSFontTextStyleCaption2: &'static NSFontTextStyle;
}

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontfamilyclass?language=objc)
pub type NSFontFamilyClass = u32;

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontunknownclass?language=objc)
pub const NSFontUnknownClass: c_int = 0 << 28;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontoldstyleserifsclass?language=objc)
pub const NSFontOldStyleSerifsClass: c_int = 1 << 28;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfonttransitionalserifsclass?language=objc)
pub const NSFontTransitionalSerifsClass: c_int = 2 << 28;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontmodernserifsclass?language=objc)
pub const NSFontModernSerifsClass: c_int = 3 << 28;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontclarendonserifsclass?language=objc)
pub const NSFontClarendonSerifsClass: c_int = 4 << 28;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontslabserifsclass?language=objc)
pub const NSFontSlabSerifsClass: c_int = 5 << 28;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontfreeformserifsclass?language=objc)
pub const NSFontFreeformSerifsClass: c_int = 7 << 28;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontsansserifclass?language=objc)
pub const NSFontSansSerifClass: c_int = 8 << 28;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontornamentalsclass?language=objc)
pub const NSFontOrnamentalsClass: c_int = 9 << 28;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontscriptsclass?language=objc)
pub const NSFontScriptsClass: c_int = 10 << 28;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontsymbolicclass?language=objc)
pub const NSFontSymbolicClass: c_int = 12 << 28;

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontfamilyclassmask?language=objc)
pub const NSFontFamilyClassMask: c_uint = 0xF0000000;

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontitalictrait?language=objc)
pub const NSFontItalicTrait: c_uint = 1 << 0;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontboldtrait?language=objc)
pub const NSFontBoldTrait: c_uint = 1 << 1;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontexpandedtrait?language=objc)
pub const NSFontExpandedTrait: c_uint = 1 << 5;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontcondensedtrait?language=objc)
pub const NSFontCondensedTrait: c_uint = 1 << 6;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontmonospacetrait?language=objc)
pub const NSFontMonoSpaceTrait: c_uint = 1 << 10;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontverticaltrait?language=objc)
pub const NSFontVerticalTrait: c_uint = 1 << 11;
/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontuioptimizedtrait?language=objc)
pub const NSFontUIOptimizedTrait: c_uint = 1 << 12;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsfontcolorattribute?language=objc)
    pub static NSFontColorAttribute: &'static NSString;
}

/// NSFontDescriptor_TextStyles.
impl NSFontDescriptor {
    extern_methods!(
        #[unsafe(method(preferredFontDescriptorForTextStyle:options:))]
        #[unsafe(method_family = none)]
        pub unsafe fn preferredFontDescriptorForTextStyle_options(
            style: &NSFontTextStyle,
            options: &NSDictionary<NSFontTextStyleOptionKey, AnyObject>,
        ) -> Retained<NSFontDescriptor>;
    );
}
