//! 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::*;
use objc2_foundation::*;

use crate::*;

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

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

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

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

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

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

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

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

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

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

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

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

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nscorrectionresponse?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSCorrectionResponse(pub NSInteger);
impl NSCorrectionResponse {
    #[doc(alias = "NSCorrectionResponseNone")]
    pub const None: Self = Self(0);
    #[doc(alias = "NSCorrectionResponseAccepted")]
    pub const Accepted: Self = Self(1);
    #[doc(alias = "NSCorrectionResponseRejected")]
    pub const Rejected: Self = Self(2);
    #[doc(alias = "NSCorrectionResponseIgnored")]
    pub const Ignored: Self = Self(3);
    #[doc(alias = "NSCorrectionResponseEdited")]
    pub const Edited: Self = Self(4);
    #[doc(alias = "NSCorrectionResponseReverted")]
    pub const Reverted: Self = Self(5);
}

unsafe impl Encode for NSCorrectionResponse {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

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

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nscorrectionindicatortype?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSCorrectionIndicatorType(pub NSInteger);
impl NSCorrectionIndicatorType {
    #[doc(alias = "NSCorrectionIndicatorTypeDefault")]
    pub const Default: Self = Self(0);
    #[doc(alias = "NSCorrectionIndicatorTypeReversion")]
    pub const Reversion: Self = Self(1);
    #[doc(alias = "NSCorrectionIndicatorTypeGuesses")]
    pub const Guesses: Self = Self(2);
}

unsafe impl Encode for NSCorrectionIndicatorType {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

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

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

extern_conformance!(
    unsafe impl NSObjectProtocol for NSSpellChecker {}
);

impl NSSpellChecker {
    extern_methods!(
        #[unsafe(method(sharedSpellChecker))]
        #[unsafe(method_family = none)]
        pub fn sharedSpellChecker() -> Retained<NSSpellChecker>;

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

        #[unsafe(method(uniqueSpellDocumentTag))]
        #[unsafe(method_family = none)]
        pub fn uniqueSpellDocumentTag() -> NSInteger;

        /// # Safety
        ///
        /// `word_count` must be a valid pointer or null.
        #[unsafe(method(checkSpellingOfString:startingAt:language:wrap:inSpellDocumentWithTag:wordCount:))]
        #[unsafe(method_family = none)]
        pub unsafe fn checkSpellingOfString_startingAt_language_wrap_inSpellDocumentWithTag_wordCount(
            &self,
            string_to_check: &NSString,
            starting_offset: NSInteger,
            language: Option<&NSString>,
            wrap_flag: bool,
            tag: NSInteger,
            word_count: *mut NSInteger,
        ) -> NSRange;

        #[unsafe(method(checkSpellingOfString:startingAt:))]
        #[unsafe(method_family = none)]
        pub fn checkSpellingOfString_startingAt(
            &self,
            string_to_check: &NSString,
            starting_offset: NSInteger,
        ) -> NSRange;

        #[unsafe(method(countWordsInString:language:))]
        #[unsafe(method_family = none)]
        pub fn countWordsInString_language(
            &self,
            string_to_count: &NSString,
            language: Option<&NSString>,
        ) -> NSInteger;

        /// # Safety
        ///
        /// `details` generic generic should be of the correct type.
        #[unsafe(method(checkGrammarOfString:startingAt:language:wrap:inSpellDocumentWithTag:details:))]
        #[unsafe(method_family = none)]
        pub unsafe fn checkGrammarOfString_startingAt_language_wrap_inSpellDocumentWithTag_details(
            &self,
            string_to_check: &NSString,
            starting_offset: NSInteger,
            language: Option<&NSString>,
            wrap_flag: bool,
            tag: NSInteger,
            details: Option<&mut Option<Retained<NSArray<NSDictionary<NSString, AnyObject>>>>>,
        ) -> NSRange;

        /// # Safety
        ///
        /// - `options` generic should be of the correct type.
        /// - `word_count` must be a valid pointer or null.
        #[unsafe(method(checkString:range:types:options:inSpellDocumentWithTag:orthography:wordCount:))]
        #[unsafe(method_family = none)]
        pub unsafe fn checkString_range_types_options_inSpellDocumentWithTag_orthography_wordCount(
            &self,
            string_to_check: &NSString,
            range: NSRange,
            checking_types: NSTextCheckingTypes,
            options: Option<&NSDictionary<NSTextCheckingOptionKey, AnyObject>>,
            tag: NSInteger,
            orthography: Option<&mut Option<Retained<NSOrthography>>>,
            word_count: *mut NSInteger,
        ) -> Retained<NSArray<NSTextCheckingResult>>;

        #[cfg(feature = "block2")]
        /// # Safety
        ///
        /// `options` generic should be of the correct type.
        #[unsafe(method(requestCheckingOfString:range:types:options:inSpellDocumentWithTag:completionHandler:))]
        #[unsafe(method_family = none)]
        pub unsafe fn requestCheckingOfString_range_types_options_inSpellDocumentWithTag_completionHandler(
            &self,
            string_to_check: &NSString,
            range: NSRange,
            checking_types: NSTextCheckingTypes,
            options: Option<&NSDictionary<NSTextCheckingOptionKey, AnyObject>>,
            tag: NSInteger,
            completion_handler: Option<
                &block2::DynBlock<
                    dyn Fn(
                        NSInteger,
                        NonNull<NSArray<NSTextCheckingResult>>,
                        NonNull<NSOrthography>,
                        NSInteger,
                    ),
                >,
            >,
        ) -> NSInteger;

        #[cfg(feature = "block2")]
        /// # Safety
        ///
        /// `options` generic should be of the correct type.
        #[unsafe(method(requestCandidatesForSelectedRange:inString:types:options:inSpellDocumentWithTag:completionHandler:))]
        #[unsafe(method_family = none)]
        pub unsafe fn requestCandidatesForSelectedRange_inString_types_options_inSpellDocumentWithTag_completionHandler(
            &self,
            selected_range: NSRange,
            string_to_check: &NSString,
            checking_types: NSTextCheckingTypes,
            options: Option<&NSDictionary<NSTextCheckingOptionKey, AnyObject>>,
            tag: NSInteger,
            completion_handler: Option<
                &block2::DynBlock<dyn Fn(NSInteger, NonNull<NSArray<NSTextCheckingResult>>)>,
            >,
        ) -> NSInteger;

        #[cfg(all(feature = "NSMenu", feature = "NSResponder", feature = "NSView"))]
        /// # Safety
        ///
        /// `options` generic should be of the correct type.
        #[unsafe(method(menuForResult:string:options:atLocation:inView:))]
        #[unsafe(method_family = none)]
        pub unsafe fn menuForResult_string_options_atLocation_inView(
            &self,
            result: &NSTextCheckingResult,
            checked_string: &NSString,
            options: Option<&NSDictionary<NSTextCheckingOptionKey, AnyObject>>,
            location: NSPoint,
            view: &NSView,
        ) -> Option<Retained<NSMenu>>;

        #[unsafe(method(userQuotesArrayForLanguage:))]
        #[unsafe(method_family = none)]
        pub fn userQuotesArrayForLanguage(
            &self,
            language: &NSString,
        ) -> Retained<NSArray<NSString>>;

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

        #[unsafe(method(updateSpellingPanelWithMisspelledWord:))]
        #[unsafe(method_family = none)]
        pub fn updateSpellingPanelWithMisspelledWord(&self, word: &NSString);

        /// # Safety
        ///
        /// `detail` generic should be of the correct type.
        #[unsafe(method(updateSpellingPanelWithGrammarString:detail:))]
        #[unsafe(method_family = none)]
        pub unsafe fn updateSpellingPanelWithGrammarString_detail(
            &self,
            string: &NSString,
            detail: &NSDictionary<NSString, AnyObject>,
        );

        #[cfg(all(feature = "NSPanel", feature = "NSResponder", feature = "NSWindow"))]
        #[unsafe(method(spellingPanel))]
        #[unsafe(method_family = none)]
        pub fn spellingPanel(&self, mtm: MainThreadMarker) -> Retained<NSPanel>;

        #[cfg(all(feature = "NSResponder", feature = "NSView"))]
        #[unsafe(method(accessoryView))]
        #[unsafe(method_family = none)]
        pub fn accessoryView(&self, mtm: MainThreadMarker) -> Option<Retained<NSView>>;

        #[cfg(all(feature = "NSResponder", feature = "NSView"))]
        /// Setter for [`accessoryView`][Self::accessoryView].
        #[unsafe(method(setAccessoryView:))]
        #[unsafe(method_family = none)]
        pub fn setAccessoryView(&self, accessory_view: Option<&NSView>);

        #[cfg(all(feature = "NSPanel", feature = "NSResponder", feature = "NSWindow"))]
        #[unsafe(method(substitutionsPanel))]
        #[unsafe(method_family = none)]
        pub fn substitutionsPanel(&self, mtm: MainThreadMarker) -> Retained<NSPanel>;

        #[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
        #[unsafe(method(substitutionsPanelAccessoryViewController))]
        #[unsafe(method_family = none)]
        pub fn substitutionsPanelAccessoryViewController(
            &self,
            mtm: MainThreadMarker,
        ) -> Option<Retained<NSViewController>>;

        #[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
        /// Setter for [`substitutionsPanelAccessoryViewController`][Self::substitutionsPanelAccessoryViewController].
        #[unsafe(method(setSubstitutionsPanelAccessoryViewController:))]
        #[unsafe(method_family = none)]
        pub fn setSubstitutionsPanelAccessoryViewController(
            &self,
            substitutions_panel_accessory_view_controller: Option<&NSViewController>,
        );

        #[unsafe(method(updatePanels))]
        #[unsafe(method_family = none)]
        pub fn updatePanels(&self);

        #[unsafe(method(ignoreWord:inSpellDocumentWithTag:))]
        #[unsafe(method_family = none)]
        pub fn ignoreWord_inSpellDocumentWithTag(&self, word_to_ignore: &NSString, tag: NSInteger);

        #[unsafe(method(ignoredWordsInSpellDocumentWithTag:))]
        #[unsafe(method_family = none)]
        pub fn ignoredWordsInSpellDocumentWithTag(
            &self,
            tag: NSInteger,
        ) -> Option<Retained<NSArray<NSString>>>;

        #[unsafe(method(setIgnoredWords:inSpellDocumentWithTag:))]
        #[unsafe(method_family = none)]
        pub fn setIgnoredWords_inSpellDocumentWithTag(
            &self,
            words: &NSArray<NSString>,
            tag: NSInteger,
        );

        #[unsafe(method(guessesForWordRange:inString:language:inSpellDocumentWithTag:))]
        #[unsafe(method_family = none)]
        pub fn guessesForWordRange_inString_language_inSpellDocumentWithTag(
            &self,
            range: NSRange,
            string: &NSString,
            language: Option<&NSString>,
            tag: NSInteger,
        ) -> Option<Retained<NSArray<NSString>>>;

        #[unsafe(method(correctionForWordRange:inString:language:inSpellDocumentWithTag:))]
        #[unsafe(method_family = none)]
        pub fn correctionForWordRange_inString_language_inSpellDocumentWithTag(
            &self,
            range: NSRange,
            string: &NSString,
            language: &NSString,
            tag: NSInteger,
        ) -> Option<Retained<NSString>>;

        #[unsafe(method(completionsForPartialWordRange:inString:language:inSpellDocumentWithTag:))]
        #[unsafe(method_family = none)]
        pub fn completionsForPartialWordRange_inString_language_inSpellDocumentWithTag(
            &self,
            range: NSRange,
            string: &NSString,
            language: Option<&NSString>,
            tag: NSInteger,
        ) -> Option<Retained<NSArray<NSString>>>;

        #[unsafe(method(languageForWordRange:inString:orthography:))]
        #[unsafe(method_family = none)]
        pub fn languageForWordRange_inString_orthography(
            &self,
            range: NSRange,
            string: &NSString,
            orthography: Option<&NSOrthography>,
        ) -> Option<Retained<NSString>>;

        #[unsafe(method(closeSpellDocumentWithTag:))]
        #[unsafe(method_family = none)]
        pub fn closeSpellDocumentWithTag(&self, tag: NSInteger);

        #[unsafe(method(recordResponse:toCorrection:forWord:language:inSpellDocumentWithTag:))]
        #[unsafe(method_family = none)]
        pub fn recordResponse_toCorrection_forWord_language_inSpellDocumentWithTag(
            &self,
            response: NSCorrectionResponse,
            correction: &NSString,
            word: &NSString,
            language: Option<&NSString>,
            tag: NSInteger,
        );

        #[cfg(all(feature = "NSResponder", feature = "NSView", feature = "block2"))]
        #[unsafe(method(showCorrectionIndicatorOfType:primaryString:alternativeStrings:forStringInRect:view:completionHandler:))]
        #[unsafe(method_family = none)]
        pub fn showCorrectionIndicatorOfType_primaryString_alternativeStrings_forStringInRect_view_completionHandler(
            &self,
            r#type: NSCorrectionIndicatorType,
            primary_string: &NSString,
            alternative_strings: &NSArray<NSString>,
            rect_of_typed_string: NSRect,
            view: &NSView,
            completion_block: Option<&block2::DynBlock<dyn Fn(*mut NSString)>>,
        );

        #[cfg(all(feature = "NSResponder", feature = "NSView"))]
        #[unsafe(method(dismissCorrectionIndicatorForView:))]
        #[unsafe(method_family = none)]
        pub fn dismissCorrectionIndicatorForView(&self, view: &NSView);

        #[cfg(feature = "NSTextInputClient")]
        #[unsafe(method(showInlinePredictionForCandidates:client:))]
        #[unsafe(method_family = none)]
        pub fn showInlinePredictionForCandidates_client(
            &self,
            candidates: &NSArray<NSTextCheckingResult>,
            client: &ProtocolObject<dyn NSTextInputClient>,
        );

        #[unsafe(method(preventsAutocorrectionBeforeString:language:))]
        #[unsafe(method_family = none)]
        pub fn preventsAutocorrectionBeforeString_language(
            &self,
            string: &NSString,
            language: Option<&NSString>,
        ) -> bool;

        #[unsafe(method(deletesAutospaceBetweenString:andString:language:))]
        #[unsafe(method_family = none)]
        pub fn deletesAutospaceBetweenString_andString_language(
            &self,
            preceding_string: &NSString,
            following_string: &NSString,
            language: Option<&NSString>,
        ) -> bool;

        #[unsafe(method(availableLanguages))]
        #[unsafe(method_family = none)]
        pub fn availableLanguages(&self) -> Retained<NSArray<NSString>>;

        #[unsafe(method(userPreferredLanguages))]
        #[unsafe(method_family = none)]
        pub fn userPreferredLanguages(&self) -> Retained<NSArray<NSString>>;

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

        /// Setter for [`automaticallyIdentifiesLanguages`][Self::automaticallyIdentifiesLanguages].
        #[unsafe(method(setAutomaticallyIdentifiesLanguages:))]
        #[unsafe(method_family = none)]
        pub fn setAutomaticallyIdentifiesLanguages(&self, automatically_identifies_languages: bool);

        #[unsafe(method(setWordFieldStringValue:))]
        #[unsafe(method_family = none)]
        pub fn setWordFieldStringValue(&self, string: &NSString);

        #[unsafe(method(learnWord:))]
        #[unsafe(method_family = none)]
        pub fn learnWord(&self, word: &NSString);

        #[unsafe(method(hasLearnedWord:))]
        #[unsafe(method_family = none)]
        pub fn hasLearnedWord(&self, word: &NSString) -> bool;

        #[unsafe(method(unlearnWord:))]
        #[unsafe(method_family = none)]
        pub fn unlearnWord(&self, word: &NSString);

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

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

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

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

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

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

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

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

        #[unsafe(method(language))]
        #[unsafe(method_family = none)]
        pub fn language(&self) -> Retained<NSString>;

        #[unsafe(method(setLanguage:))]
        #[unsafe(method_family = none)]
        pub fn setLanguage(&self, language: &NSString) -> bool;
    );
}

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

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

impl DefaultRetained for NSSpellChecker {
    #[inline]
    fn default_retained() -> Retained<Self> {
        Self::new()
    }
}

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

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

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

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

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

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

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

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

/// NSDeprecated.
impl NSSpellChecker {
    extern_methods!(
        /// # Safety
        ///
        /// `word` might not allow `None`.
        #[deprecated = "Use -guessesForWordRange:inString:language:inSpellDocumentWithTag instead"]
        #[unsafe(method(guessesForWord:))]
        #[unsafe(method_family = none)]
        pub unsafe fn guessesForWord(&self, word: Option<&NSString>) -> Option<Retained<NSArray>>;

        /// # Safety
        ///
        /// `word` might not allow `None`.
        #[deprecated]
        #[unsafe(method(forgetWord:))]
        #[unsafe(method_family = none)]
        pub unsafe fn forgetWord(&self, word: Option<&NSString>);
    );
}
