objc2_io_bluetooth_ui/generated/objc2/
IOBluetoothPasskeyDisplay.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_app_kit::*;
7use objc2_foundation::*;
8#[cfg(feature = "objc2-io-bluetooth")]
9use objc2_io_bluetooth::*;
10
11use crate::*;
12
13/// [Apple's documentation](https://developer.apple.com/documentation/iobluetoothui/bluetoothkeyboardreturntype?language=objc)
14#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct BluetoothKeyboardReturnType(pub c_uint);
17impl BluetoothKeyboardReturnType {
18    #[doc(alias = "kBluetoothKeyboardANSIReturn")]
19    pub const ANSIReturn: Self = Self(0);
20    #[doc(alias = "kBluetoothKeyboardISOReturn")]
21    pub const ISOReturn: Self = Self(1);
22    #[doc(alias = "kBluetoothKeyboardJISReturn")]
23    pub const JISReturn: Self = Self(2);
24    #[doc(alias = "kBluetoothKeyboardNoReturn")]
25    pub const NoReturn: Self = Self(3);
26}
27
28unsafe impl Encode for BluetoothKeyboardReturnType {
29    const ENCODING: Encoding = c_uint::ENCODING;
30}
31
32unsafe impl RefEncode for BluetoothKeyboardReturnType {
33    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
34}
35
36extern_class!(
37    /// [Apple's documentation](https://developer.apple.com/documentation/iobluetoothui/iobluetoothpasskeydisplay?language=objc)
38    #[unsafe(super(NSView, NSResponder, NSObject))]
39    #[derive(Debug, PartialEq, Eq, Hash)]
40    pub struct IOBluetoothPasskeyDisplay;
41);
42
43extern_conformance!(
44    unsafe impl NSAccessibility for IOBluetoothPasskeyDisplay {}
45);
46
47extern_conformance!(
48    unsafe impl NSAccessibilityElementProtocol for IOBluetoothPasskeyDisplay {}
49);
50
51extern_conformance!(
52    unsafe impl NSAnimatablePropertyContainer for IOBluetoothPasskeyDisplay {}
53);
54
55extern_conformance!(
56    unsafe impl NSAppearanceCustomization for IOBluetoothPasskeyDisplay {}
57);
58
59extern_conformance!(
60    unsafe impl NSCoding for IOBluetoothPasskeyDisplay {}
61);
62
63extern_conformance!(
64    unsafe impl NSDraggingDestination for IOBluetoothPasskeyDisplay {}
65);
66
67extern_conformance!(
68    unsafe impl NSObjectProtocol for IOBluetoothPasskeyDisplay {}
69);
70
71extern_conformance!(
72    unsafe impl NSUserInterfaceItemIdentification for IOBluetoothPasskeyDisplay {}
73);
74
75impl IOBluetoothPasskeyDisplay {
76    extern_methods!(
77        #[unsafe(method(usePasskeyNotificaitons))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn usePasskeyNotificaitons(&self) -> bool;
80
81        /// Setter for [`usePasskeyNotificaitons`][Self::usePasskeyNotificaitons].
82        #[unsafe(method(setUsePasskeyNotificaitons:))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn setUsePasskeyNotificaitons(&self, use_passkey_notificaitons: bool);
85
86        #[unsafe(method(isIncomingRequest))]
87        #[unsafe(method_family = none)]
88        pub unsafe fn isIncomingRequest(&self) -> bool;
89
90        /// Setter for [`isIncomingRequest`][Self::isIncomingRequest].
91        #[unsafe(method(setIsIncomingRequest:))]
92        #[unsafe(method_family = none)]
93        pub unsafe fn setIsIncomingRequest(&self, is_incoming_request: bool);
94
95        #[unsafe(method(passkey))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn passkey(&self) -> Retained<NSString>;
98
99        /// Setter for [`passkey`][Self::passkey].
100        ///
101        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
102        #[unsafe(method(setPasskey:))]
103        #[unsafe(method_family = none)]
104        pub unsafe fn setPasskey(&self, passkey: Option<&NSString>);
105
106        #[unsafe(method(returnImage))]
107        #[unsafe(method_family = none)]
108        pub unsafe fn returnImage(&self) -> Option<Retained<NSImage>>;
109
110        /// Setter for [`returnImage`][Self::returnImage].
111        ///
112        /// # Safety
113        ///
114        /// `return_image` might not allow `None`.
115        #[unsafe(method(setReturnImage:))]
116        #[unsafe(method_family = none)]
117        pub unsafe fn setReturnImage(&self, return_image: Option<&NSImage>);
118
119        #[unsafe(method(returnHighlightImage))]
120        #[unsafe(method_family = none)]
121        pub unsafe fn returnHighlightImage(&self) -> Option<Retained<NSImage>>;
122
123        /// Setter for [`returnHighlightImage`][Self::returnHighlightImage].
124        ///
125        /// # Safety
126        ///
127        /// `return_highlight_image` might not allow `None`.
128        #[unsafe(method(setReturnHighlightImage:))]
129        #[unsafe(method_family = none)]
130        pub unsafe fn setReturnHighlightImage(&self, return_highlight_image: Option<&NSImage>);
131
132        /// # Safety
133        ///
134        /// This is not retained internally, you must ensure the object is still alive.
135        #[unsafe(method(centeredView))]
136        #[unsafe(method_family = none)]
137        pub unsafe fn centeredView(&self) -> Option<Retained<NSView>>;
138
139        /// Setter for [`centeredView`][Self::centeredView].
140        ///
141        /// # Safety
142        ///
143        /// - `centered_view` might not allow `None`.
144        /// - This is unretained, you must ensure the object is kept alive while in use.
145        #[unsafe(method(setCenteredView:))]
146        #[unsafe(method_family = none)]
147        pub unsafe fn setCenteredView(&self, centered_view: Option<&NSView>);
148
149        /// # Safety
150        ///
151        /// This is not retained internally, you must ensure the object is still alive.
152        #[unsafe(method(backgroundImageConstraint))]
153        #[unsafe(method_family = none)]
154        pub unsafe fn backgroundImageConstraint(&self) -> Option<Retained<NSLayoutConstraint>>;
155
156        /// Setter for [`backgroundImageConstraint`][Self::backgroundImageConstraint].
157        ///
158        /// # Safety
159        ///
160        /// - `background_image_constraint` might not allow `None`.
161        /// - This is unretained, you must ensure the object is kept alive while in use.
162        #[unsafe(method(setBackgroundImageConstraint:))]
163        #[unsafe(method_family = none)]
164        pub unsafe fn setBackgroundImageConstraint(
165            &self,
166            background_image_constraint: Option<&NSLayoutConstraint>,
167        );
168
169        #[unsafe(method(sharedDisplayView))]
170        #[unsafe(method_family = none)]
171        pub unsafe fn sharedDisplayView(
172            mtm: MainThreadMarker,
173        ) -> Option<Retained<IOBluetoothPasskeyDisplay>>;
174
175        #[cfg(feature = "objc2-io-bluetooth")]
176        /// # Safety
177        ///
178        /// - `in_string` might not allow `None`.
179        /// - `device` might not allow `None`.
180        #[unsafe(method(setPasskey:forDevice:usingSSP:))]
181        #[unsafe(method_family = none)]
182        pub unsafe fn setPasskey_forDevice_usingSSP(
183            &self,
184            in_string: Option<&NSString>,
185            device: Option<&IOBluetoothDevice>,
186            is_ssp: bool,
187        );
188
189        #[unsafe(method(advancePasskeyIndicator))]
190        #[unsafe(method_family = none)]
191        pub unsafe fn advancePasskeyIndicator(&self);
192
193        #[unsafe(method(retreatPasskeyIndicator))]
194        #[unsafe(method_family = none)]
195        pub unsafe fn retreatPasskeyIndicator(&self);
196
197        #[unsafe(method(resetPasskeyIndicator))]
198        #[unsafe(method_family = none)]
199        pub unsafe fn resetPasskeyIndicator(&self);
200
201        #[cfg(feature = "objc2-io-bluetooth")]
202        /// # Safety
203        ///
204        /// `device` might not allow `None`.
205        #[deprecated]
206        #[unsafe(method(setupUIForDevice:))]
207        #[unsafe(method_family = none)]
208        pub unsafe fn setupUIForDevice(&self, device: Option<&IOBluetoothDevice>);
209
210        #[cfg(feature = "objc2-io-bluetooth")]
211        /// # Safety
212        ///
213        /// `device` might not allow `None`.
214        #[deprecated]
215        #[unsafe(method(setupUIForSSPDevice:))]
216        #[unsafe(method_family = none)]
217        pub unsafe fn setupUIForSSPDevice(&self, device: Option<&IOBluetoothDevice>);
218
219        /// # Safety
220        ///
221        /// `in_string` might not allow `None`.
222        #[deprecated]
223        #[unsafe(method(setPasskeyString:))]
224        #[unsafe(method_family = none)]
225        pub unsafe fn setPasskeyString(&self, in_string: Option<&NSString>);
226
227        #[deprecated]
228        #[unsafe(method(setPasskeyIndicatorEnabled:))]
229        #[unsafe(method_family = none)]
230        pub unsafe fn setPasskeyIndicatorEnabled(&self, in_enabled: bool);
231
232        #[deprecated]
233        #[unsafe(method(resetAll))]
234        #[unsafe(method_family = none)]
235        pub unsafe fn resetAll(&self);
236    );
237}
238
239/// Methods declared on superclass `NSView`.
240impl IOBluetoothPasskeyDisplay {
241    extern_methods!(
242        #[unsafe(method(initWithFrame:))]
243        #[unsafe(method_family = init)]
244        pub unsafe fn initWithFrame(this: Allocated<Self>, frame_rect: NSRect) -> Retained<Self>;
245
246        /// # Safety
247        ///
248        /// `coder` possibly has further requirements.
249        #[unsafe(method(initWithCoder:))]
250        #[unsafe(method_family = init)]
251        pub unsafe fn initWithCoder(
252            this: Allocated<Self>,
253            coder: &NSCoder,
254        ) -> Option<Retained<Self>>;
255    );
256}
257
258/// Methods declared on superclass `NSResponder`.
259impl IOBluetoothPasskeyDisplay {
260    extern_methods!(
261        #[unsafe(method(init))]
262        #[unsafe(method_family = init)]
263        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
264    );
265}
266
267/// Methods declared on superclass `NSObject`.
268impl IOBluetoothPasskeyDisplay {
269    extern_methods!(
270        #[unsafe(method(new))]
271        #[unsafe(method_family = new)]
272        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
273    );
274}
275
276extern_class!(
277    /// [Apple's documentation](https://developer.apple.com/documentation/iobluetoothui/iobluetoothaccessibilityignoredtextfieldcell?language=objc)
278    #[unsafe(super(NSTextFieldCell, NSActionCell, NSCell, NSObject))]
279    #[derive(Debug, PartialEq, Eq, Hash)]
280    pub struct IOBluetoothAccessibilityIgnoredTextFieldCell;
281);
282
283extern_conformance!(
284    unsafe impl NSAccessibility for IOBluetoothAccessibilityIgnoredTextFieldCell {}
285);
286
287extern_conformance!(
288    unsafe impl NSAccessibilityElementProtocol for IOBluetoothAccessibilityIgnoredTextFieldCell {}
289);
290
291extern_conformance!(
292    unsafe impl NSCoding for IOBluetoothAccessibilityIgnoredTextFieldCell {}
293);
294
295extern_conformance!(
296    unsafe impl NSCopying for IOBluetoothAccessibilityIgnoredTextFieldCell {}
297);
298
299unsafe impl CopyingHelper for IOBluetoothAccessibilityIgnoredTextFieldCell {
300    type Result = Self;
301}
302
303extern_conformance!(
304    unsafe impl NSObjectProtocol for IOBluetoothAccessibilityIgnoredTextFieldCell {}
305);
306
307extern_conformance!(
308    unsafe impl NSUserInterfaceItemIdentification for IOBluetoothAccessibilityIgnoredTextFieldCell {}
309);
310
311impl IOBluetoothAccessibilityIgnoredTextFieldCell {
312    extern_methods!();
313}
314
315/// Methods declared on superclass `NSTextFieldCell`.
316impl IOBluetoothAccessibilityIgnoredTextFieldCell {
317    extern_methods!(
318        #[unsafe(method(initTextCell:))]
319        #[unsafe(method_family = init)]
320        pub unsafe fn initTextCell(this: Allocated<Self>, string: &NSString) -> Retained<Self>;
321
322        /// # Safety
323        ///
324        /// `coder` possibly has further requirements.
325        #[unsafe(method(initWithCoder:))]
326        #[unsafe(method_family = init)]
327        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
328
329        #[unsafe(method(initImageCell:))]
330        #[unsafe(method_family = init)]
331        pub unsafe fn initImageCell(
332            this: Allocated<Self>,
333            image: Option<&NSImage>,
334        ) -> Retained<Self>;
335    );
336}
337
338/// Methods declared on superclass `NSCell`.
339impl IOBluetoothAccessibilityIgnoredTextFieldCell {
340    extern_methods!(
341        #[unsafe(method(init))]
342        #[unsafe(method_family = init)]
343        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
344    );
345}
346
347/// Methods declared on superclass `NSObject`.
348impl IOBluetoothAccessibilityIgnoredTextFieldCell {
349    extern_methods!(
350        #[unsafe(method(new))]
351        #[unsafe(method_family = new)]
352        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
353    );
354}
355
356extern_class!(
357    /// [Apple's documentation](https://developer.apple.com/documentation/iobluetoothui/iobluetoothaccessibilityignoredimagecell?language=objc)
358    #[unsafe(super(NSImageCell, NSCell, NSObject))]
359    #[derive(Debug, PartialEq, Eq, Hash)]
360    pub struct IOBluetoothAccessibilityIgnoredImageCell;
361);
362
363extern_conformance!(
364    unsafe impl NSAccessibility for IOBluetoothAccessibilityIgnoredImageCell {}
365);
366
367extern_conformance!(
368    unsafe impl NSAccessibilityElementProtocol for IOBluetoothAccessibilityIgnoredImageCell {}
369);
370
371extern_conformance!(
372    unsafe impl NSCoding for IOBluetoothAccessibilityIgnoredImageCell {}
373);
374
375extern_conformance!(
376    unsafe impl NSCopying for IOBluetoothAccessibilityIgnoredImageCell {}
377);
378
379unsafe impl CopyingHelper for IOBluetoothAccessibilityIgnoredImageCell {
380    type Result = Self;
381}
382
383extern_conformance!(
384    unsafe impl NSObjectProtocol for IOBluetoothAccessibilityIgnoredImageCell {}
385);
386
387extern_conformance!(
388    unsafe impl NSUserInterfaceItemIdentification for IOBluetoothAccessibilityIgnoredImageCell {}
389);
390
391impl IOBluetoothAccessibilityIgnoredImageCell {
392    extern_methods!();
393}
394
395/// Methods declared on superclass `NSCell`.
396impl IOBluetoothAccessibilityIgnoredImageCell {
397    extern_methods!(
398        #[unsafe(method(init))]
399        #[unsafe(method_family = init)]
400        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
401
402        #[unsafe(method(initTextCell:))]
403        #[unsafe(method_family = init)]
404        pub unsafe fn initTextCell(this: Allocated<Self>, string: &NSString) -> Retained<Self>;
405
406        #[unsafe(method(initImageCell:))]
407        #[unsafe(method_family = init)]
408        pub unsafe fn initImageCell(
409            this: Allocated<Self>,
410            image: Option<&NSImage>,
411        ) -> Retained<Self>;
412
413        /// # Safety
414        ///
415        /// `coder` possibly has further requirements.
416        #[unsafe(method(initWithCoder:))]
417        #[unsafe(method_family = init)]
418        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
419    );
420}
421
422/// Methods declared on superclass `NSObject`.
423impl IOBluetoothAccessibilityIgnoredImageCell {
424    extern_methods!(
425        #[unsafe(method(new))]
426        #[unsafe(method_family = new)]
427        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
428    );
429}