objc2_app_kit/generated/
NSInputServer.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_protocol!(
11 pub unsafe trait NSInputServiceProvider {
13 #[deprecated]
20 #[unsafe(method(insertText:client:))]
21 #[unsafe(method_family = none)]
22 unsafe fn insertText_client(&self, string: Option<&AnyObject>, sender: Option<&AnyObject>);
23
24 #[deprecated]
30 #[unsafe(method(doCommandBySelector:client:))]
31 #[unsafe(method_family = none)]
32 unsafe fn doCommandBySelector_client(
33 &self,
34 selector: Option<Sel>,
35 sender: Option<&AnyObject>,
36 );
37
38 #[deprecated]
42 #[unsafe(method(markedTextAbandoned:))]
43 #[unsafe(method_family = none)]
44 unsafe fn markedTextAbandoned(&self, sender: Option<&AnyObject>);
45
46 #[deprecated]
51 #[unsafe(method(markedTextSelectionChanged:client:))]
52 #[unsafe(method_family = none)]
53 unsafe fn markedTextSelectionChanged_client(
54 &self,
55 new_sel: NSRange,
56 sender: Option<&AnyObject>,
57 );
58
59 #[deprecated]
63 #[unsafe(method(terminate:))]
64 #[unsafe(method_family = none)]
65 unsafe fn terminate(&self, sender: Option<&AnyObject>);
66
67 #[deprecated]
68 #[unsafe(method(canBeDisabled))]
69 #[unsafe(method_family = none)]
70 fn canBeDisabled(&self) -> bool;
71
72 #[deprecated]
73 #[unsafe(method(wantsToInterpretAllKeystrokes))]
74 #[unsafe(method_family = none)]
75 fn wantsToInterpretAllKeystrokes(&self) -> bool;
76
77 #[deprecated]
78 #[unsafe(method(wantsToHandleMouseEvents))]
79 #[unsafe(method_family = none)]
80 fn wantsToHandleMouseEvents(&self) -> bool;
81
82 #[deprecated]
83 #[unsafe(method(wantsToDelayTextChangeNotifications))]
84 #[unsafe(method_family = none)]
85 fn wantsToDelayTextChangeNotifications(&self) -> bool;
86
87 #[deprecated]
91 #[unsafe(method(inputClientBecomeActive:))]
92 #[unsafe(method_family = none)]
93 unsafe fn inputClientBecomeActive(&self, sender: Option<&AnyObject>);
94
95 #[deprecated]
99 #[unsafe(method(inputClientResignActive:))]
100 #[unsafe(method_family = none)]
101 unsafe fn inputClientResignActive(&self, sender: Option<&AnyObject>);
102
103 #[deprecated]
107 #[unsafe(method(inputClientEnabled:))]
108 #[unsafe(method_family = none)]
109 unsafe fn inputClientEnabled(&self, sender: Option<&AnyObject>);
110
111 #[deprecated]
115 #[unsafe(method(inputClientDisabled:))]
116 #[unsafe(method_family = none)]
117 unsafe fn inputClientDisabled(&self, sender: Option<&AnyObject>);
118
119 #[deprecated]
124 #[unsafe(method(activeConversationWillChange:fromOldConversation:))]
125 #[unsafe(method_family = none)]
126 unsafe fn activeConversationWillChange_fromOldConversation(
127 &self,
128 sender: Option<&AnyObject>,
129 old_conversation: NSInteger,
130 );
131
132 #[deprecated]
137 #[unsafe(method(activeConversationChanged:toNewConversation:))]
138 #[unsafe(method_family = none)]
139 unsafe fn activeConversationChanged_toNewConversation(
140 &self,
141 sender: Option<&AnyObject>,
142 new_conversation: NSInteger,
143 );
144 }
145);
146
147extern_protocol!(
148 pub unsafe trait NSInputServerMouseTracker {
150 #[deprecated]
155 #[unsafe(method(mouseDownOnCharacterIndex:atCoordinate:withModifier:client:))]
156 #[unsafe(method_family = none)]
157 unsafe fn mouseDownOnCharacterIndex_atCoordinate_withModifier_client(
158 &self,
159 index: NSUInteger,
160 point: NSPoint,
161 flags: NSUInteger,
162 sender: Option<&AnyObject>,
163 ) -> bool;
164
165 #[deprecated]
170 #[unsafe(method(mouseDraggedOnCharacterIndex:atCoordinate:withModifier:client:))]
171 #[unsafe(method_family = none)]
172 unsafe fn mouseDraggedOnCharacterIndex_atCoordinate_withModifier_client(
173 &self,
174 index: NSUInteger,
175 point: NSPoint,
176 flags: NSUInteger,
177 sender: Option<&AnyObject>,
178 ) -> bool;
179
180 #[deprecated]
185 #[unsafe(method(mouseUpOnCharacterIndex:atCoordinate:withModifier:client:))]
186 #[unsafe(method_family = none)]
187 unsafe fn mouseUpOnCharacterIndex_atCoordinate_withModifier_client(
188 &self,
189 index: NSUInteger,
190 point: NSPoint,
191 flags: NSUInteger,
192 sender: Option<&AnyObject>,
193 );
194 }
195);
196
197extern_class!(
198 #[unsafe(super(NSObject))]
200 #[derive(Debug, PartialEq, Eq, Hash)]
201 #[deprecated]
202 pub struct NSInputServer;
203);
204
205extern_conformance!(
206 unsafe impl NSInputServerMouseTracker for NSInputServer {}
207);
208
209extern_conformance!(
210 unsafe impl NSInputServiceProvider for NSInputServer {}
211);
212
213extern_conformance!(
214 unsafe impl NSObjectProtocol for NSInputServer {}
215);
216
217impl NSInputServer {
218 extern_methods!(
219 #[deprecated]
225 #[unsafe(method(initWithDelegate:name:))]
226 #[unsafe(method_family = init)]
227 pub unsafe fn initWithDelegate_name(
228 this: Allocated<Self>,
229 delegate: Option<&AnyObject>,
230 name: Option<&NSString>,
231 ) -> Retained<Self>;
232 );
233}
234
235impl NSInputServer {
237 extern_methods!(
238 #[unsafe(method(init))]
239 #[unsafe(method_family = init)]
240 pub fn init(this: Allocated<Self>) -> Retained<Self>;
241
242 #[unsafe(method(new))]
243 #[unsafe(method_family = new)]
244 pub fn new() -> Retained<Self>;
245 );
246}
247
248impl DefaultRetained for NSInputServer {
249 #[inline]
250 fn default_retained() -> Retained<Self> {
251 Self::new()
252 }
253}