objc2_app_kit/generated/
NSNibConnector.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/nsnibconnector?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct NSNibConnector;
15);
16
17extern_conformance!(
18    unsafe impl NSCoding for NSNibConnector {}
19);
20
21extern_conformance!(
22    unsafe impl NSObjectProtocol for NSNibConnector {}
23);
24
25impl NSNibConnector {
26    extern_methods!(
27        #[unsafe(method(source))]
28        #[unsafe(method_family = none)]
29        pub fn source(&self) -> Option<Retained<AnyObject>>;
30
31        /// Setter for [`source`][Self::source].
32        ///
33        /// This is a [weak property][objc2::topics::weak_property].
34        ///
35        /// # Safety
36        ///
37        /// `source` should be of the correct type.
38        #[unsafe(method(setSource:))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn setSource(&self, source: Option<&AnyObject>);
41
42        #[unsafe(method(destination))]
43        #[unsafe(method_family = none)]
44        pub fn destination(&self) -> Option<Retained<AnyObject>>;
45
46        /// Setter for [`destination`][Self::destination].
47        ///
48        /// This is a [weak property][objc2::topics::weak_property].
49        ///
50        /// # Safety
51        ///
52        /// `destination` should be of the correct type.
53        #[unsafe(method(setDestination:))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn setDestination(&self, destination: Option<&AnyObject>);
56
57        #[unsafe(method(label))]
58        #[unsafe(method_family = none)]
59        pub fn label(&self) -> Retained<NSString>;
60
61        /// Setter for [`label`][Self::label].
62        ///
63        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
64        #[unsafe(method(setLabel:))]
65        #[unsafe(method_family = none)]
66        pub fn setLabel(&self, label: &NSString);
67
68        /// # Safety
69        ///
70        /// - `old_object` should be of the correct type.
71        /// - `new_object` should be of the correct type.
72        #[unsafe(method(replaceObject:withObject:))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn replaceObject_withObject(
75            &self,
76            old_object: &AnyObject,
77            new_object: &AnyObject,
78        );
79
80        #[unsafe(method(establishConnection))]
81        #[unsafe(method_family = none)]
82        pub fn establishConnection(&self);
83    );
84}
85
86/// Methods declared on superclass `NSObject`.
87impl NSNibConnector {
88    extern_methods!(
89        #[unsafe(method(init))]
90        #[unsafe(method_family = init)]
91        pub fn init(this: Allocated<Self>) -> Retained<Self>;
92
93        #[unsafe(method(new))]
94        #[unsafe(method_family = new)]
95        pub fn new() -> Retained<Self>;
96    );
97}
98
99impl DefaultRetained for NSNibConnector {
100    #[inline]
101    fn default_retained() -> Retained<Self> {
102        Self::new()
103    }
104}