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 fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
175
176        /// # Safety
177        ///
178        /// `coder` possibly has further requirements.
179        #[unsafe(method(initWithCoder:))]
180        #[unsafe(method_family = init)]
181        pub unsafe fn initWithCoder(
182            this: Allocated<Self>,
183            coder: &NSCoder,
184        ) -> Option<Retained<Self>>;
185    );
186}
187
188/// Methods declared on superclass `NSResponder`.
189#[cfg(all(
190    feature = "NSControl",
191    feature = "NSResponder",
192    feature = "NSTextField",
193    feature = "NSView"
194))]
195impl NSSecureTextField {
196    extern_methods!(
197        #[unsafe(method(init))]
198        #[unsafe(method_family = init)]
199        pub fn init(this: Allocated<Self>) -> Retained<Self>;
200    );
201}
202
203/// Methods declared on superclass `NSObject`.
204#[cfg(all(
205    feature = "NSControl",
206    feature = "NSResponder",
207    feature = "NSTextField",
208    feature = "NSView"
209))]
210impl NSSecureTextField {
211    extern_methods!(
212        #[unsafe(method(new))]
213        #[unsafe(method_family = new)]
214        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
215    );
216}
217
218extern_class!(
219    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nssecuretextfieldcell?language=objc)
220    #[unsafe(super(NSTextFieldCell, NSActionCell, NSCell, NSObject))]
221    #[derive(Debug, PartialEq, Eq, Hash)]
222    #[cfg(all(
223        feature = "NSActionCell",
224        feature = "NSCell",
225        feature = "NSTextFieldCell"
226    ))]
227    pub struct NSSecureTextFieldCell;
228);
229
230#[cfg(all(
231    feature = "NSAccessibilityProtocols",
232    feature = "NSActionCell",
233    feature = "NSCell",
234    feature = "NSTextFieldCell"
235))]
236extern_conformance!(
237    unsafe impl NSAccessibility for NSSecureTextFieldCell {}
238);
239
240#[cfg(all(
241    feature = "NSAccessibilityProtocols",
242    feature = "NSActionCell",
243    feature = "NSCell",
244    feature = "NSTextFieldCell"
245))]
246extern_conformance!(
247    unsafe impl NSAccessibilityElementProtocol for NSSecureTextFieldCell {}
248);
249
250#[cfg(all(
251    feature = "NSActionCell",
252    feature = "NSCell",
253    feature = "NSTextFieldCell"
254))]
255extern_conformance!(
256    unsafe impl NSCoding for NSSecureTextFieldCell {}
257);
258
259#[cfg(all(
260    feature = "NSActionCell",
261    feature = "NSCell",
262    feature = "NSTextFieldCell"
263))]
264extern_conformance!(
265    unsafe impl NSCopying for NSSecureTextFieldCell {}
266);
267
268#[cfg(all(
269    feature = "NSActionCell",
270    feature = "NSCell",
271    feature = "NSTextFieldCell"
272))]
273unsafe impl CopyingHelper for NSSecureTextFieldCell {
274    type Result = Self;
275}
276
277#[cfg(all(
278    feature = "NSActionCell",
279    feature = "NSCell",
280    feature = "NSTextFieldCell"
281))]
282extern_conformance!(
283    unsafe impl NSObjectProtocol for NSSecureTextFieldCell {}
284);
285
286#[cfg(all(
287    feature = "NSActionCell",
288    feature = "NSCell",
289    feature = "NSTextFieldCell",
290    feature = "NSUserInterfaceItemIdentification"
291))]
292extern_conformance!(
293    unsafe impl NSUserInterfaceItemIdentification for NSSecureTextFieldCell {}
294);
295
296#[cfg(all(
297    feature = "NSActionCell",
298    feature = "NSCell",
299    feature = "NSTextFieldCell"
300))]
301impl NSSecureTextFieldCell {
302    extern_methods!(
303        #[unsafe(method(echosBullets))]
304        #[unsafe(method_family = none)]
305        pub fn echosBullets(&self) -> bool;
306
307        /// Setter for [`echosBullets`][Self::echosBullets].
308        #[unsafe(method(setEchosBullets:))]
309        #[unsafe(method_family = none)]
310        pub fn setEchosBullets(&self, echos_bullets: bool);
311    );
312}
313
314/// Methods declared on superclass `NSTextFieldCell`.
315#[cfg(all(
316    feature = "NSActionCell",
317    feature = "NSCell",
318    feature = "NSTextFieldCell"
319))]
320impl NSSecureTextFieldCell {
321    extern_methods!(
322        #[unsafe(method(initTextCell:))]
323        #[unsafe(method_family = init)]
324        pub fn initTextCell(this: Allocated<Self>, string: &NSString) -> Retained<Self>;
325
326        /// # Safety
327        ///
328        /// `coder` possibly has further requirements.
329        #[unsafe(method(initWithCoder:))]
330        #[unsafe(method_family = init)]
331        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
332
333        #[cfg(feature = "NSImage")]
334        #[unsafe(method(initImageCell:))]
335        #[unsafe(method_family = init)]
336        pub unsafe fn initImageCell(
337            this: Allocated<Self>,
338            image: Option<&NSImage>,
339        ) -> Retained<Self>;
340    );
341}
342
343/// Methods declared on superclass `NSCell`.
344#[cfg(all(
345    feature = "NSActionCell",
346    feature = "NSCell",
347    feature = "NSTextFieldCell"
348))]
349impl NSSecureTextFieldCell {
350    extern_methods!(
351        #[unsafe(method(init))]
352        #[unsafe(method_family = init)]
353        pub fn init(this: Allocated<Self>) -> Retained<Self>;
354    );
355}
356
357/// Methods declared on superclass `NSObject`.
358#[cfg(all(
359    feature = "NSActionCell",
360    feature = "NSCell",
361    feature = "NSTextFieldCell"
362))]
363impl NSSecureTextFieldCell {
364    extern_methods!(
365        #[unsafe(method(new))]
366        #[unsafe(method_family = new)]
367        pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
368    );
369}