icrate 0.1.2

Bindings to Apple's frameworks
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::AppKit::*;
use crate::CoreData::*;
use crate::Foundation::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "AppKit_NSGlyphInfo")]
    pub struct NSGlyphInfo;

    #[cfg(feature = "AppKit_NSGlyphInfo")]
    unsafe impl ClassType for NSGlyphInfo {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "AppKit_NSGlyphInfo")]
unsafe impl NSCoding for NSGlyphInfo {}

#[cfg(feature = "AppKit_NSGlyphInfo")]
unsafe impl NSCopying for NSGlyphInfo {}

#[cfg(feature = "AppKit_NSGlyphInfo")]
unsafe impl NSObjectProtocol for NSGlyphInfo {}

#[cfg(feature = "AppKit_NSGlyphInfo")]
unsafe impl NSSecureCoding for NSGlyphInfo {}

extern_methods!(
    #[cfg(feature = "AppKit_NSGlyphInfo")]
    unsafe impl NSGlyphInfo {
        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other baseString)]
        pub unsafe fn baseString(&self) -> Id<NSString>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "AppKit_NSGlyphInfo")]
    unsafe impl NSGlyphInfo {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

ns_enum!(
    #[underlying(NSUInteger)]
    pub enum NSCharacterCollection {
        NSIdentityMappingCharacterCollection = 0,
        NSAdobeCNS1CharacterCollection = 1,
        NSAdobeGB1CharacterCollection = 2,
        NSAdobeJapan1CharacterCollection = 3,
        NSAdobeJapan2CharacterCollection = 4,
        NSAdobeKorea1CharacterCollection = 5,
    }
);

extern_methods!(
    /// NSGlyphInfo_Deprecated
    #[cfg(feature = "AppKit_NSGlyphInfo")]
    unsafe impl NSGlyphInfo {
        #[cfg(all(feature = "AppKit_NSFont", feature = "Foundation_NSString"))]
        #[method_id(@__retain_semantics Other glyphInfoWithGlyphName:forFont:baseString:)]
        pub unsafe fn glyphInfoWithGlyphName_forFont_baseString(
            glyph_name: &NSString,
            font: &NSFont,
            string: &NSString,
        ) -> Option<Id<NSGlyphInfo>>;

        #[cfg(all(feature = "AppKit_NSFont", feature = "Foundation_NSString"))]
        #[method_id(@__retain_semantics Other glyphInfoWithGlyph:forFont:baseString:)]
        pub unsafe fn glyphInfoWithGlyph_forFont_baseString(
            glyph: NSGlyph,
            font: &NSFont,
            string: &NSString,
        ) -> Option<Id<NSGlyphInfo>>;

        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other glyphInfoWithCharacterIdentifier:collection:baseString:)]
        pub unsafe fn glyphInfoWithCharacterIdentifier_collection_baseString(
            cid: NSUInteger,
            character_collection: NSCharacterCollection,
            string: &NSString,
        ) -> Option<Id<NSGlyphInfo>>;

        #[cfg(feature = "Foundation_NSString")]
        #[method_id(@__retain_semantics Other glyphName)]
        pub unsafe fn glyphName(&self) -> Option<Id<NSString>>;

        #[method(characterIdentifier)]
        pub unsafe fn characterIdentifier(&self) -> NSUInteger;

        #[method(characterCollection)]
        pub unsafe fn characterCollection(&self) -> NSCharacterCollection;
    }
);