objc2_app_kit/generated/
NSTextCheckingController.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstextcheckingcontroller?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct NSTextCheckingController;
15);
16
17extern_conformance!(
18    unsafe impl NSObjectProtocol for NSTextCheckingController {}
19);
20
21impl NSTextCheckingController {
22    extern_methods!(
23        #[cfg(all(feature = "NSTextCheckingClient", feature = "NSTextInputClient"))]
24        #[unsafe(method(initWithClient:))]
25        #[unsafe(method_family = init)]
26        pub unsafe fn initWithClient(
27            this: Allocated<Self>,
28            client: &ProtocolObject<dyn NSTextCheckingClient>,
29        ) -> Retained<Self>;
30
31        #[unsafe(method(init))]
32        #[unsafe(method_family = init)]
33        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
34
35        #[cfg(all(feature = "NSTextCheckingClient", feature = "NSTextInputClient"))]
36        #[unsafe(method(client))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn client(&self) -> Retained<ProtocolObject<dyn NSTextCheckingClient>>;
39
40        #[unsafe(method(invalidate))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn invalidate(&self);
43
44        #[unsafe(method(didChangeTextInRange:))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn didChangeTextInRange(&self, range: NSRange);
47
48        #[unsafe(method(insertedTextInRange:))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn insertedTextInRange(&self, range: NSRange);
51
52        #[unsafe(method(didChangeSelectedRange))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn didChangeSelectedRange(&self);
55
56        #[unsafe(method(considerTextCheckingForRange:))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn considerTextCheckingForRange(&self, range: NSRange);
59
60        #[cfg(feature = "NSSpellChecker")]
61        #[unsafe(method(checkTextInRange:types:options:))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn checkTextInRange_types_options(
64            &self,
65            range: NSRange,
66            checking_types: NSTextCheckingTypes,
67            options: &NSDictionary<NSTextCheckingOptionKey, AnyObject>,
68        );
69
70        #[unsafe(method(checkTextInSelection:))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn checkTextInSelection(&self, sender: Option<&AnyObject>);
73
74        #[unsafe(method(checkTextInDocument:))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn checkTextInDocument(&self, sender: Option<&AnyObject>);
77
78        #[unsafe(method(orderFrontSubstitutionsPanel:))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn orderFrontSubstitutionsPanel(&self, sender: Option<&AnyObject>);
81
82        #[unsafe(method(checkSpelling:))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn checkSpelling(&self, sender: Option<&AnyObject>);
85
86        #[unsafe(method(showGuessPanel:))]
87        #[unsafe(method_family = none)]
88        pub unsafe fn showGuessPanel(&self, sender: Option<&AnyObject>);
89
90        #[unsafe(method(changeSpelling:))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn changeSpelling(&self, sender: Option<&AnyObject>);
93
94        #[unsafe(method(ignoreSpelling:))]
95        #[unsafe(method_family = none)]
96        pub unsafe fn ignoreSpelling(&self, sender: Option<&AnyObject>);
97
98        #[unsafe(method(updateCandidates))]
99        #[unsafe(method_family = none)]
100        pub unsafe fn updateCandidates(&self);
101
102        #[unsafe(method(validAnnotations))]
103        #[unsafe(method_family = none)]
104        pub unsafe fn validAnnotations(&self) -> Retained<NSArray<NSAttributedStringKey>>;
105
106        #[cfg(feature = "NSMenu")]
107        #[unsafe(method(menuAtIndex:clickedOnSelection:effectiveRange:))]
108        #[unsafe(method_family = none)]
109        pub unsafe fn menuAtIndex_clickedOnSelection_effectiveRange(
110            &self,
111            location: NSUInteger,
112            clicked_on_selection: bool,
113            effective_range: NSRangePointer,
114            mtm: MainThreadMarker,
115        ) -> Option<Retained<NSMenu>>;
116
117        #[unsafe(method(spellCheckerDocumentTag))]
118        #[unsafe(method_family = none)]
119        pub unsafe fn spellCheckerDocumentTag(&self) -> NSInteger;
120
121        /// Setter for [`spellCheckerDocumentTag`][Self::spellCheckerDocumentTag].
122        #[unsafe(method(setSpellCheckerDocumentTag:))]
123        #[unsafe(method_family = none)]
124        pub unsafe fn setSpellCheckerDocumentTag(&self, spell_checker_document_tag: NSInteger);
125    );
126}
127
128/// Methods declared on superclass `NSObject`.
129impl NSTextCheckingController {
130    extern_methods!(
131        #[unsafe(method(new))]
132        #[unsafe(method_family = new)]
133        pub unsafe fn new() -> Retained<Self>;
134    );
135}