objc2_map_kit/generated/
MKMapItemDetailViewController.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::*;
6#[cfg(feature = "objc2-app-kit")]
7#[cfg(target_os = "macos")]
8use objc2_app_kit::*;
9use objc2_foundation::*;
10
11use crate::*;
12
13extern_protocol!(
14    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkmapitemdetailviewcontrollerdelegate?language=objc)
15    pub unsafe trait MKMapItemDetailViewControllerDelegate:
16        NSObjectProtocol + MainThreadOnly
17    {
18        #[cfg(feature = "objc2-app-kit")]
19        #[cfg(target_os = "macos")]
20        #[unsafe(method(mapItemDetailViewControllerDidFinish:))]
21        #[unsafe(method_family = none)]
22        unsafe fn mapItemDetailViewControllerDidFinish(
23            &self,
24            detail_view_controller: &MKMapItemDetailViewController,
25        );
26    }
27);
28
29extern_class!(
30    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkmapitemdetailviewcontroller?language=objc)
31    #[unsafe(super(NSViewController, NSResponder, NSObject))]
32    #[derive(Debug, PartialEq, Eq, Hash)]
33    #[cfg(feature = "objc2-app-kit")]
34    #[cfg(target_os = "macos")]
35    pub struct MKMapItemDetailViewController;
36);
37
38#[cfg(feature = "objc2-app-kit")]
39#[cfg(target_os = "macos")]
40unsafe impl NSCoding for MKMapItemDetailViewController {}
41
42#[cfg(feature = "objc2-app-kit")]
43#[cfg(target_os = "macos")]
44unsafe impl NSEditor for MKMapItemDetailViewController {}
45
46#[cfg(feature = "objc2-app-kit")]
47#[cfg(target_os = "macos")]
48unsafe impl NSObjectProtocol for MKMapItemDetailViewController {}
49
50#[cfg(feature = "objc2-app-kit")]
51#[cfg(target_os = "macos")]
52unsafe impl NSSeguePerforming for MKMapItemDetailViewController {}
53
54#[cfg(feature = "objc2-app-kit")]
55#[cfg(target_os = "macos")]
56unsafe impl NSUserInterfaceItemIdentification for MKMapItemDetailViewController {}
57
58#[cfg(feature = "objc2-app-kit")]
59#[cfg(target_os = "macos")]
60impl MKMapItemDetailViewController {
61    extern_methods!(
62        #[cfg(feature = "MKMapItem")]
63        #[unsafe(method(mapItem))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn mapItem(&self) -> Option<Retained<MKMapItem>>;
66
67        #[cfg(feature = "MKMapItem")]
68        /// Setter for [`mapItem`][Self::mapItem].
69        #[unsafe(method(setMapItem:))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn setMapItem(&self, map_item: Option<&MKMapItem>);
72
73        #[unsafe(method(delegate))]
74        #[unsafe(method_family = none)]
75        pub unsafe fn delegate(
76            &self,
77        ) -> Option<Retained<ProtocolObject<dyn MKMapItemDetailViewControllerDelegate>>>;
78
79        /// This is a [weak property][objc2::topics::weak_property].
80        /// Setter for [`delegate`][Self::delegate].
81        #[unsafe(method(setDelegate:))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn setDelegate(
84            &self,
85            delegate: Option<&ProtocolObject<dyn MKMapItemDetailViewControllerDelegate>>,
86        );
87
88        #[cfg(feature = "MKMapItem")]
89        #[unsafe(method(initWithMapItem:displaysMap:))]
90        #[unsafe(method_family = init)]
91        pub unsafe fn initWithMapItem_displaysMap(
92            this: Allocated<Self>,
93            map_item: Option<&MKMapItem>,
94            displays_map: bool,
95        ) -> Retained<Self>;
96
97        #[cfg(feature = "MKMapItem")]
98        #[unsafe(method(initWithMapItem:))]
99        #[unsafe(method_family = init)]
100        pub unsafe fn initWithMapItem(
101            this: Allocated<Self>,
102            map_item: Option<&MKMapItem>,
103        ) -> Retained<Self>;
104    );
105}
106
107/// Methods declared on superclass `NSViewController`.
108#[cfg(feature = "objc2-app-kit")]
109#[cfg(target_os = "macos")]
110impl MKMapItemDetailViewController {
111    extern_methods!(
112        #[unsafe(method(initWithNibName:bundle:))]
113        #[unsafe(method_family = init)]
114        pub unsafe fn initWithNibName_bundle(
115            this: Allocated<Self>,
116            nib_name_or_nil: Option<&NSNibName>,
117            nib_bundle_or_nil: Option<&NSBundle>,
118        ) -> Retained<Self>;
119
120        #[unsafe(method(initWithCoder:))]
121        #[unsafe(method_family = init)]
122        pub unsafe fn initWithCoder(
123            this: Allocated<Self>,
124            coder: &NSCoder,
125        ) -> Option<Retained<Self>>;
126    );
127}
128
129/// Methods declared on superclass `NSResponder`.
130#[cfg(feature = "objc2-app-kit")]
131#[cfg(target_os = "macos")]
132impl MKMapItemDetailViewController {
133    extern_methods!(
134        #[unsafe(method(init))]
135        #[unsafe(method_family = init)]
136        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
137    );
138}
139
140/// Methods declared on superclass `NSObject`.
141#[cfg(feature = "objc2-app-kit")]
142#[cfg(target_os = "macos")]
143impl MKMapItemDetailViewController {
144    extern_methods!(
145        #[unsafe(method(new))]
146        #[unsafe(method_family = new)]
147        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
148    );
149}