use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSTextCheckingController;
);
extern_conformance!(
unsafe impl NSObjectProtocol for NSTextCheckingController {}
);
impl NSTextCheckingController {
extern_methods!(
#[cfg(all(feature = "NSTextCheckingClient", feature = "NSTextInputClient"))]
#[unsafe(method(initWithClient:))]
#[unsafe(method_family = init)]
pub fn initWithClient(
this: Allocated<Self>,
client: &ProtocolObject<dyn NSTextCheckingClient>,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(all(feature = "NSTextCheckingClient", feature = "NSTextInputClient"))]
#[unsafe(method(client))]
#[unsafe(method_family = none)]
pub fn client(&self) -> Retained<ProtocolObject<dyn NSTextCheckingClient>>;
#[unsafe(method(invalidate))]
#[unsafe(method_family = none)]
pub fn invalidate(&self);
#[unsafe(method(didChangeTextInRange:))]
#[unsafe(method_family = none)]
pub fn didChangeTextInRange(&self, range: NSRange);
#[unsafe(method(insertedTextInRange:))]
#[unsafe(method_family = none)]
pub fn insertedTextInRange(&self, range: NSRange);
#[unsafe(method(didChangeSelectedRange))]
#[unsafe(method_family = none)]
pub fn didChangeSelectedRange(&self);
#[unsafe(method(considerTextCheckingForRange:))]
#[unsafe(method_family = none)]
pub fn considerTextCheckingForRange(&self, range: NSRange);
#[cfg(feature = "NSSpellChecker")]
#[unsafe(method(checkTextInRange:types:options:))]
#[unsafe(method_family = none)]
pub unsafe fn checkTextInRange_types_options(
&self,
range: NSRange,
checking_types: NSTextCheckingTypes,
options: &NSDictionary<NSTextCheckingOptionKey, AnyObject>,
);
#[unsafe(method(checkTextInSelection:))]
#[unsafe(method_family = none)]
pub unsafe fn checkTextInSelection(&self, sender: Option<&AnyObject>);
#[unsafe(method(checkTextInDocument:))]
#[unsafe(method_family = none)]
pub unsafe fn checkTextInDocument(&self, sender: Option<&AnyObject>);
#[unsafe(method(orderFrontSubstitutionsPanel:))]
#[unsafe(method_family = none)]
pub unsafe fn orderFrontSubstitutionsPanel(&self, sender: Option<&AnyObject>);
#[unsafe(method(checkSpelling:))]
#[unsafe(method_family = none)]
pub unsafe fn checkSpelling(&self, sender: Option<&AnyObject>);
#[unsafe(method(showGuessPanel:))]
#[unsafe(method_family = none)]
pub unsafe fn showGuessPanel(&self, sender: Option<&AnyObject>);
#[unsafe(method(changeSpelling:))]
#[unsafe(method_family = none)]
pub unsafe fn changeSpelling(&self, sender: Option<&AnyObject>);
#[unsafe(method(ignoreSpelling:))]
#[unsafe(method_family = none)]
pub unsafe fn ignoreSpelling(&self, sender: Option<&AnyObject>);
#[unsafe(method(updateCandidates))]
#[unsafe(method_family = none)]
pub fn updateCandidates(&self);
#[unsafe(method(validAnnotations))]
#[unsafe(method_family = none)]
pub fn validAnnotations(&self) -> Retained<NSArray<NSAttributedStringKey>>;
#[cfg(feature = "NSMenu")]
#[unsafe(method(menuAtIndex:clickedOnSelection:effectiveRange:))]
#[unsafe(method_family = none)]
pub unsafe fn menuAtIndex_clickedOnSelection_effectiveRange(
&self,
location: NSUInteger,
clicked_on_selection: bool,
effective_range: NSRangePointer,
mtm: MainThreadMarker,
) -> Option<Retained<NSMenu>>;
#[unsafe(method(spellCheckerDocumentTag))]
#[unsafe(method_family = none)]
pub fn spellCheckerDocumentTag(&self) -> NSInteger;
#[unsafe(method(setSpellCheckerDocumentTag:))]
#[unsafe(method_family = none)]
pub fn setSpellCheckerDocumentTag(&self, spell_checker_document_tag: NSInteger);
);
}
impl NSTextCheckingController {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}