objc2_app_kit/generated/
NSSecureTextField.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/nssecuretextfield?language=objc)
12    #[unsafe(super(NSTextField, NSControl, NSView, NSResponder, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(all(
15        feature = "NSControl",
16        feature = "NSResponder",
17        feature = "NSTextField",
18        feature = "NSView"
19    ))]
20    pub struct NSSecureTextField;
21);
22
23#[cfg(all(
24    feature = "NSAccessibilityProtocols",
25    feature = "NSControl",
26    feature = "NSResponder",
27    feature = "NSTextField",
28    feature = "NSView"
29))]
30extern_conformance!(
31    unsafe impl NSAccessibility for NSSecureTextField {}
32);
33
34#[cfg(all(
35    feature = "NSAccessibilityProtocols",
36    feature = "NSControl",
37    feature = "NSResponder",
38    feature = "NSTextField",
39    feature = "NSView"
40))]
41extern_conformance!(
42    unsafe impl NSAccessibilityElementProtocol for NSSecureTextField {}
43);
44
45#[cfg(all(
46    feature = "NSAccessibilityProtocols",
47    feature = "NSControl",
48    feature = "NSResponder",
49    feature = "NSTextField",
50    feature = "NSView"
51))]
52extern_conformance!(
53    unsafe impl NSAccessibilityNavigableStaticText for NSSecureTextField {}
54);
55
56#[cfg(all(
57    feature = "NSAccessibilityProtocols",
58    feature = "NSControl",
59    feature = "NSResponder",
60    feature = "NSTextField",
61    feature = "NSView"
62))]
63extern_conformance!(
64    unsafe impl NSAccessibilityStaticText for NSSecureTextField {}
65);
66
67#[cfg(all(
68    feature = "NSAnimation",
69    feature = "NSControl",
70    feature = "NSResponder",
71    feature = "NSTextField",
72    feature = "NSView"
73))]
74extern_conformance!(
75    unsafe impl NSAnimatablePropertyContainer for NSSecureTextField {}
76);
77
78#[cfg(all(
79    feature = "NSAppearance",
80    feature = "NSControl",
81    feature = "NSResponder",
82    feature = "NSTextField",
83    feature = "NSView"
84))]
85extern_conformance!(
86    unsafe impl NSAppearanceCustomization for NSSecureTextField {}
87);
88
89#[cfg(all(
90    feature = "NSControl",
91    feature = "NSResponder",
92    feature = "NSTextField",
93    feature = "NSView"
94))]
95extern_conformance!(
96    unsafe impl NSCoding for NSSecureTextField {}
97);
98
99#[cfg(all(
100    feature = "NSControl",
101    feature = "NSDragging",
102    feature = "NSResponder",
103    feature = "NSTextField",
104    feature = "NSView"
105))]
106extern_conformance!(
107    unsafe impl NSDraggingDestination for NSSecureTextField {}
108);
109
110#[cfg(all(
111    feature = "NSControl",
112    feature = "NSResponder",
113    feature = "NSTextField",
114    feature = "NSView"
115))]
116extern_conformance!(
117    unsafe impl NSObjectProtocol for NSSecureTextField {}
118);
119
120#[cfg(all(
121    feature = "NSControl",
122    feature = "NSResponder",
123    feature = "NSTextContent",
124    feature = "NSTextField",
125    feature = "NSView"
126))]
127extern_conformance!(
128    unsafe impl NSTextContent for NSSecureTextField {}
129);
130
131#[cfg(all(
132    feature = "NSControl",
133    feature = "NSResponder",
134    feature = "NSTextField",
135    feature = "NSUserInterfaceItemIdentification",
136    feature = "NSView"
137))]
138extern_conformance!(
139    unsafe impl NSUserInterfaceItemIdentification for NSSecureTextField {}
140);
141
142#[cfg(all(
143    feature = "NSControl",
144    feature = "NSResponder",
145    feature = "NSTextField",
146    feature = "NSUserInterfaceValidation",
147    feature = "NSView"
148))]
149extern_conformance!(
150    unsafe impl NSUserInterfaceValidations for NSSecureTextField {}
151);
152
153#[cfg(all(
154    feature = "NSControl",
155    feature = "NSResponder",
156    feature = "NSTextField",
157    feature = "NSView"
158))]
159impl NSSecureTextField {
160    extern_methods!();
161}
162
163/// Methods declared on superclass `NSControl`.
164#[cfg(all(
165    feature = "NSControl",
166    feature = "NSResponder",
167    feature = "NSTextField",
168    feature = "NSView"
169))]
170impl NSSecureTextField {
171    extern_methods!(
172        #[unsafe(method(initWithFrame:))]
173        #[unsafe(method_family = init)]
174        pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
175
176        #[unsafe(method(initWithCoder:))]
177        #[unsafe(method_family = init)]
178        pub unsafe fn initWithCoder(
179            this: Allocated<Self>,
180            coder: &NSCoder,
181        ) -> Option<Retained<Self>>;
182    );
183}
184
185/// Methods declared on superclass `NSResponder`.
186#[cfg(all(
187    feature = "NSControl",
188    feature = "NSResponder",
189    feature = "NSTextField",
190    feature = "NSView"
191))]
192impl NSSecureTextField {
193    extern_methods!(
194        #[unsafe(method(init))]
195        #[unsafe(method_family = init)]
196        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
197    );
198}
199
200/// Methods declared on superclass `NSObject`.
201#[cfg(all(
202    feature = "NSControl",
203    feature = "NSResponder",
204    feature = "NSTextField",
205    feature = "NSView"
206))]
207impl NSSecureTextField {
208    extern_methods!(
209        #[unsafe(method(new))]
210        #[unsafe(method_family = new)]
211        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
212    );
213}
214
215extern_class!(
216    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nssecuretextfieldcell?language=objc)
217    #[unsafe(super(NSTextFieldCell, NSActionCell, NSCell, NSObject))]
218    #[derive(Debug, PartialEq, Eq, Hash)]
219    #[cfg(all(
220        feature = "NSActionCell",
221        feature = "NSCell",
222        feature = "NSTextFieldCell"
223    ))]
224    pub struct NSSecureTextFieldCell;
225);
226
227#[cfg(all(
228    feature = "NSAccessibilityProtocols",
229    feature = "NSActionCell",
230    feature = "NSCell",
231    feature = "NSTextFieldCell"
232))]
233extern_conformance!(
234    unsafe impl NSAccessibility for NSSecureTextFieldCell {}
235);
236
237#[cfg(all(
238    feature = "NSAccessibilityProtocols",
239    feature = "NSActionCell",
240    feature = "NSCell",
241    feature = "NSTextFieldCell"
242))]
243extern_conformance!(
244    unsafe impl NSAccessibilityElementProtocol for NSSecureTextFieldCell {}
245);
246
247#[cfg(all(
248    feature = "NSActionCell",
249    feature = "NSCell",
250    feature = "NSTextFieldCell"
251))]
252extern_conformance!(
253    unsafe impl NSCoding for NSSecureTextFieldCell {}
254);
255
256#[cfg(all(
257    feature = "NSActionCell",
258    feature = "NSCell",
259    feature = "NSTextFieldCell"
260))]
261extern_conformance!(
262    unsafe impl NSCopying for NSSecureTextFieldCell {}
263);
264
265#[cfg(all(
266    feature = "NSActionCell",
267    feature = "NSCell",
268    feature = "NSTextFieldCell"
269))]
270unsafe impl CopyingHelper for NSSecureTextFieldCell {
271    type Result = Self;
272}
273
274#[cfg(all(
275    feature = "NSActionCell",
276    feature = "NSCell",
277    feature = "NSTextFieldCell"
278))]
279extern_conformance!(
280    unsafe impl NSObjectProtocol for NSSecureTextFieldCell {}
281);
282
283#[cfg(all(
284    feature = "NSActionCell",
285    feature = "NSCell",
286    feature = "NSTextFieldCell",
287    feature = "NSUserInterfaceItemIdentification"
288))]
289extern_conformance!(
290    unsafe impl NSUserInterfaceItemIdentification for NSSecureTextFieldCell {}
291);
292
293#[cfg(all(
294    feature = "NSActionCell",
295    feature = "NSCell",
296    feature = "NSTextFieldCell"
297))]
298impl NSSecureTextFieldCell {
299    extern_methods!(
300        #[unsafe(method(echosBullets))]
301        #[unsafe(method_family = none)]
302        pub unsafe fn echosBullets(&self) -> bool;
303
304        /// Setter for [`echosBullets`][Self::echosBullets].
305        #[unsafe(method(setEchosBullets:))]
306        #[unsafe(method_family = none)]
307        pub unsafe fn setEchosBullets(&self, echos_bullets: bool);
308    );
309}
310
311/// Methods declared on superclass `NSTextFieldCell`.
312#[cfg(all(
313    feature = "NSActionCell",
314    feature = "NSCell",
315    feature = "NSTextFieldCell"
316))]
317impl NSSecureTextFieldCell {
318    extern_methods!(
319        #[unsafe(method(initTextCell:))]
320        #[unsafe(method_family = init)]
321        pub unsafe fn initTextCell(this: Allocated<Self>, string: &NSString) -> Retained<Self>;
322
323        #[unsafe(method(initWithCoder:))]
324        #[unsafe(method_family = init)]
325        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
326
327        #[cfg(feature = "NSImage")]
328        #[unsafe(method(initImageCell:))]
329        #[unsafe(method_family = init)]
330        pub unsafe fn initImageCell(
331            this: Allocated<Self>,
332            image: Option<&NSImage>,
333        ) -> Retained<Self>;
334    );
335}
336
337/// Methods declared on superclass `NSCell`.
338#[cfg(all(
339    feature = "NSActionCell",
340    feature = "NSCell",
341    feature = "NSTextFieldCell"
342))]
343impl NSSecureTextFieldCell {
344    extern_methods!(
345        #[unsafe(method(init))]
346        #[unsafe(method_family = init)]
347        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
348    );
349}
350
351/// Methods declared on superclass `NSObject`.
352#[cfg(all(
353    feature = "NSActionCell",
354    feature = "NSCell",
355    feature = "NSTextFieldCell"
356))]
357impl NSSecureTextFieldCell {
358    extern_methods!(
359        #[unsafe(method(new))]
360        #[unsafe(method_family = new)]
361        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
362    );
363}