use crate::common::*;
use crate::AppKit::*;
use crate::CoreData::*;
use crate::Foundation::*;
ns_enum!(
#[underlying(NSInteger)]
pub enum NSTextInputTraitType {
NSTextInputTraitTypeDefault = 0,
NSTextInputTraitTypeNo = 1,
NSTextInputTraitTypeYes = 2,
}
);
extern_protocol!(
pub unsafe trait NSTextInputTraits {
#[optional]
#[method(autocorrectionType)]
unsafe fn autocorrectionType(&self) -> NSTextInputTraitType;
#[optional]
#[method(setAutocorrectionType:)]
unsafe fn setAutocorrectionType(&self, autocorrection_type: NSTextInputTraitType);
#[optional]
#[method(spellCheckingType)]
unsafe fn spellCheckingType(&self) -> NSTextInputTraitType;
#[optional]
#[method(setSpellCheckingType:)]
unsafe fn setSpellCheckingType(&self, spell_checking_type: NSTextInputTraitType);
#[optional]
#[method(grammarCheckingType)]
unsafe fn grammarCheckingType(&self) -> NSTextInputTraitType;
#[optional]
#[method(setGrammarCheckingType:)]
unsafe fn setGrammarCheckingType(&self, grammar_checking_type: NSTextInputTraitType);
#[optional]
#[method(smartQuotesType)]
unsafe fn smartQuotesType(&self) -> NSTextInputTraitType;
#[optional]
#[method(setSmartQuotesType:)]
unsafe fn setSmartQuotesType(&self, smart_quotes_type: NSTextInputTraitType);
#[optional]
#[method(smartDashesType)]
unsafe fn smartDashesType(&self) -> NSTextInputTraitType;
#[optional]
#[method(setSmartDashesType:)]
unsafe fn setSmartDashesType(&self, smart_dashes_type: NSTextInputTraitType);
#[optional]
#[method(smartInsertDeleteType)]
unsafe fn smartInsertDeleteType(&self) -> NSTextInputTraitType;
#[optional]
#[method(setSmartInsertDeleteType:)]
unsafe fn setSmartInsertDeleteType(&self, smart_insert_delete_type: NSTextInputTraitType);
#[optional]
#[method(textReplacementType)]
unsafe fn textReplacementType(&self) -> NSTextInputTraitType;
#[optional]
#[method(setTextReplacementType:)]
unsafe fn setTextReplacementType(&self, text_replacement_type: NSTextInputTraitType);
#[optional]
#[method(dataDetectionType)]
unsafe fn dataDetectionType(&self) -> NSTextInputTraitType;
#[optional]
#[method(setDataDetectionType:)]
unsafe fn setDataDetectionType(&self, data_detection_type: NSTextInputTraitType);
#[optional]
#[method(linkDetectionType)]
unsafe fn linkDetectionType(&self) -> NSTextInputTraitType;
#[optional]
#[method(setLinkDetectionType:)]
unsafe fn setLinkDetectionType(&self, link_detection_type: NSTextInputTraitType);
#[optional]
#[method(textCompletionType)]
unsafe fn textCompletionType(&self) -> NSTextInputTraitType;
#[optional]
#[method(setTextCompletionType:)]
unsafe fn setTextCompletionType(&self, text_completion_type: NSTextInputTraitType);
#[optional]
#[method(inlinePredictionType)]
unsafe fn inlinePredictionType(&self) -> NSTextInputTraitType;
#[optional]
#[method(setInlinePredictionType:)]
unsafe fn setInlinePredictionType(&self, inline_prediction_type: NSTextInputTraitType);
}
unsafe impl ProtocolType for dyn NSTextInputTraits {}
);
extern_protocol!(
pub unsafe trait NSTextCheckingClient: NSTextInputClient + NSTextInputTraits {
#[cfg(feature = "Foundation_NSAttributedString")]
#[method_id(@__retain_semantics Other annotatedSubstringForProposedRange:actualRange:)]
unsafe fn annotatedSubstringForProposedRange_actualRange(
&self,
range: NSRange,
actual_range: NSRangePointer,
) -> Option<Id<NSAttributedString>>;
#[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))]
#[method(setAnnotations:range:)]
unsafe fn setAnnotations_range(
&self,
annotations: &NSDictionary<NSAttributedStringKey, NSString>,
range: NSRange,
);
#[cfg(all(feature = "Foundation_NSDictionary", feature = "Foundation_NSString"))]
#[method(addAnnotations:range:)]
unsafe fn addAnnotations_range(
&self,
annotations: &NSDictionary<NSAttributedStringKey, NSString>,
range: NSRange,
);
#[method(removeAnnotation:range:)]
unsafe fn removeAnnotation_range(
&self,
annotation_name: &NSAttributedStringKey,
range: NSRange,
);
#[cfg(feature = "Foundation_NSAttributedString")]
#[method(replaceCharactersInRange:withAnnotatedString:)]
unsafe fn replaceCharactersInRange_withAnnotatedString(
&self,
range: NSRange,
annotated_string: &NSAttributedString,
);
#[method(selectAndShowRange:)]
unsafe fn selectAndShowRange(&self, range: NSRange);
#[cfg(feature = "AppKit_NSView")]
#[method_id(@__retain_semantics Other viewForRange:firstRect:actualRange:)]
unsafe fn viewForRange_firstRect_actualRange(
&self,
range: NSRange,
first_rect: NSRectPointer,
actual_range: NSRangePointer,
mtm: MainThreadMarker,
) -> Option<Id<NSView>>;
#[cfg(feature = "AppKit_NSCandidateListTouchBarItem")]
#[method_id(@__retain_semantics Other candidateListTouchBarItem)]
unsafe fn candidateListTouchBarItem(
&self,
mtm: MainThreadMarker,
) -> Option<Id<NSCandidateListTouchBarItem>>;
}
unsafe impl ProtocolType for dyn NSTextCheckingClient {}
);