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]
14 #[unsafe(method(insertText:client:))]
15 #[unsafe(method_family = none)]
16 unsafe fn insertText_client(&self, string: Option<&AnyObject>, sender: Option<&AnyObject>);
17
18 #[deprecated]
19 #[unsafe(method(doCommandBySelector:client:))]
20 #[unsafe(method_family = none)]
21 unsafe fn doCommandBySelector_client(
22 &self,
23 selector: Option<Sel>,
24 sender: Option<&AnyObject>,
25 );
26
27 #[deprecated]
28 #[unsafe(method(markedTextAbandoned:))]
29 #[unsafe(method_family = none)]
30 unsafe fn markedTextAbandoned(&self, sender: Option<&AnyObject>);
31
32 #[deprecated]
33 #[unsafe(method(markedTextSelectionChanged:client:))]
34 #[unsafe(method_family = none)]
35 unsafe fn markedTextSelectionChanged_client(
36 &self,
37 new_sel: NSRange,
38 sender: Option<&AnyObject>,
39 );
40
41 #[deprecated]
42 #[unsafe(method(terminate:))]
43 #[unsafe(method_family = none)]
44 unsafe fn terminate(&self, sender: Option<&AnyObject>);
45
46 #[deprecated]
47 #[unsafe(method(canBeDisabled))]
48 #[unsafe(method_family = none)]
49 unsafe fn canBeDisabled(&self) -> bool;
50
51 #[deprecated]
52 #[unsafe(method(wantsToInterpretAllKeystrokes))]
53 #[unsafe(method_family = none)]
54 unsafe fn wantsToInterpretAllKeystrokes(&self) -> bool;
55
56 #[deprecated]
57 #[unsafe(method(wantsToHandleMouseEvents))]
58 #[unsafe(method_family = none)]
59 unsafe fn wantsToHandleMouseEvents(&self) -> bool;
60
61 #[deprecated]
62 #[unsafe(method(wantsToDelayTextChangeNotifications))]
63 #[unsafe(method_family = none)]
64 unsafe fn wantsToDelayTextChangeNotifications(&self) -> bool;
65
66 #[deprecated]
67 #[unsafe(method(inputClientBecomeActive:))]
68 #[unsafe(method_family = none)]
69 unsafe fn inputClientBecomeActive(&self, sender: Option<&AnyObject>);
70
71 #[deprecated]
72 #[unsafe(method(inputClientResignActive:))]
73 #[unsafe(method_family = none)]
74 unsafe fn inputClientResignActive(&self, sender: Option<&AnyObject>);
75
76 #[deprecated]
77 #[unsafe(method(inputClientEnabled:))]
78 #[unsafe(method_family = none)]
79 unsafe fn inputClientEnabled(&self, sender: Option<&AnyObject>);
80
81 #[deprecated]
82 #[unsafe(method(inputClientDisabled:))]
83 #[unsafe(method_family = none)]
84 unsafe fn inputClientDisabled(&self, sender: Option<&AnyObject>);
85
86 #[deprecated]
87 #[unsafe(method(activeConversationWillChange:fromOldConversation:))]
88 #[unsafe(method_family = none)]
89 unsafe fn activeConversationWillChange_fromOldConversation(
90 &self,
91 sender: Option<&AnyObject>,
92 old_conversation: NSInteger,
93 );
94
95 #[deprecated]
96 #[unsafe(method(activeConversationChanged:toNewConversation:))]
97 #[unsafe(method_family = none)]
98 unsafe fn activeConversationChanged_toNewConversation(
99 &self,
100 sender: Option<&AnyObject>,
101 new_conversation: NSInteger,
102 );
103 }
104);
105
106extern_protocol!(
107 pub unsafe trait NSInputServerMouseTracker {
109 #[deprecated]
110 #[unsafe(method(mouseDownOnCharacterIndex:atCoordinate:withModifier:client:))]
111 #[unsafe(method_family = none)]
112 unsafe fn mouseDownOnCharacterIndex_atCoordinate_withModifier_client(
113 &self,
114 index: NSUInteger,
115 point: NSPoint,
116 flags: NSUInteger,
117 sender: Option<&AnyObject>,
118 ) -> bool;
119
120 #[deprecated]
121 #[unsafe(method(mouseDraggedOnCharacterIndex:atCoordinate:withModifier:client:))]
122 #[unsafe(method_family = none)]
123 unsafe fn mouseDraggedOnCharacterIndex_atCoordinate_withModifier_client(
124 &self,
125 index: NSUInteger,
126 point: NSPoint,
127 flags: NSUInteger,
128 sender: Option<&AnyObject>,
129 ) -> bool;
130
131 #[deprecated]
132 #[unsafe(method(mouseUpOnCharacterIndex:atCoordinate:withModifier:client:))]
133 #[unsafe(method_family = none)]
134 unsafe fn mouseUpOnCharacterIndex_atCoordinate_withModifier_client(
135 &self,
136 index: NSUInteger,
137 point: NSPoint,
138 flags: NSUInteger,
139 sender: Option<&AnyObject>,
140 );
141 }
142);
143
144extern_class!(
145 #[unsafe(super(NSObject))]
147 #[derive(Debug, PartialEq, Eq, Hash)]
148 #[deprecated]
149 pub struct NSInputServer;
150);
151
152extern_conformance!(
153 unsafe impl NSInputServerMouseTracker for NSInputServer {}
154);
155
156extern_conformance!(
157 unsafe impl NSInputServiceProvider for NSInputServer {}
158);
159
160extern_conformance!(
161 unsafe impl NSObjectProtocol for NSInputServer {}
162);
163
164impl NSInputServer {
165 extern_methods!(
166 #[deprecated]
167 #[unsafe(method(initWithDelegate:name:))]
168 #[unsafe(method_family = init)]
169 pub unsafe fn initWithDelegate_name(
170 this: Allocated<Self>,
171 delegate: Option<&AnyObject>,
172 name: Option<&NSString>,
173 ) -> Retained<Self>;
174 );
175}
176
177impl NSInputServer {
179 extern_methods!(
180 #[unsafe(method(init))]
181 #[unsafe(method_family = init)]
182 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
183
184 #[unsafe(method(new))]
185 #[unsafe(method_family = new)]
186 pub unsafe fn new() -> Retained<Self>;
187 );
188}