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")]
40extern_conformance!(
41    unsafe impl NSCoding for MKMapItemDetailViewController {}
42);
43
44#[cfg(feature = "objc2-app-kit")]
45#[cfg(target_os = "macos")]
46extern_conformance!(
47    unsafe impl NSEditor for MKMapItemDetailViewController {}
48);
49
50#[cfg(feature = "objc2-app-kit")]
51#[cfg(target_os = "macos")]
52extern_conformance!(
53    unsafe impl NSObjectProtocol for MKMapItemDetailViewController {}
54);
55
56#[cfg(feature = "objc2-app-kit")]
57#[cfg(target_os = "macos")]
58extern_conformance!(
59    unsafe impl NSSeguePerforming for MKMapItemDetailViewController {}
60);
61
62#[cfg(feature = "objc2-app-kit")]
63#[cfg(target_os = "macos")]
64extern_conformance!(
65    unsafe impl NSUserInterfaceItemIdentification for MKMapItemDetailViewController {}
66);
67
68#[cfg(feature = "objc2-app-kit")]
69#[cfg(target_os = "macos")]
70impl MKMapItemDetailViewController {
71    extern_methods!(
72        #[cfg(feature = "MKMapItem")]
73        #[unsafe(method(mapItem))]
74        #[unsafe(method_family = none)]
75        pub unsafe fn mapItem(&self) -> Option<Retained<MKMapItem>>;
76
77        #[cfg(feature = "MKMapItem")]
78        /// Setter for [`mapItem`][Self::mapItem].
79        #[unsafe(method(setMapItem:))]
80        #[unsafe(method_family = none)]
81        pub unsafe fn setMapItem(&self, map_item: Option<&MKMapItem>);
82
83        #[unsafe(method(delegate))]
84        #[unsafe(method_family = none)]
85        pub unsafe fn delegate(
86            &self,
87        ) -> Option<Retained<ProtocolObject<dyn MKMapItemDetailViewControllerDelegate>>>;
88
89        /// This is a [weak property][objc2::topics::weak_property].
90        /// Setter for [`delegate`][Self::delegate].
91        #[unsafe(method(setDelegate:))]
92        #[unsafe(method_family = none)]
93        pub unsafe fn setDelegate(
94            &self,
95            delegate: Option<&ProtocolObject<dyn MKMapItemDetailViewControllerDelegate>>,
96        );
97
98        #[cfg(feature = "MKMapItem")]
99        #[unsafe(method(initWithMapItem:displaysMap:))]
100        #[unsafe(method_family = init)]
101        pub unsafe fn initWithMapItem_displaysMap(
102            this: Allocated<Self>,
103            map_item: Option<&MKMapItem>,
104            displays_map: bool,
105        ) -> Retained<Self>;
106
107        #[cfg(feature = "MKMapItem")]
108        #[unsafe(method(initWithMapItem:))]
109        #[unsafe(method_family = init)]
110        pub unsafe fn initWithMapItem(
111            this: Allocated<Self>,
112            map_item: Option<&MKMapItem>,
113        ) -> Retained<Self>;
114    );
115}
116
117/// Methods declared on superclass `NSViewController`.
118#[cfg(feature = "objc2-app-kit")]
119#[cfg(target_os = "macos")]
120impl MKMapItemDetailViewController {
121    extern_methods!(
122        #[unsafe(method(initWithNibName:bundle:))]
123        #[unsafe(method_family = init)]
124        pub unsafe fn initWithNibName_bundle(
125            this: Allocated<Self>,
126            nib_name_or_nil: Option<&NSNibName>,
127            nib_bundle_or_nil: Option<&NSBundle>,
128        ) -> Retained<Self>;
129
130        #[unsafe(method(initWithCoder:))]
131        #[unsafe(method_family = init)]
132        pub unsafe fn initWithCoder(
133            this: Allocated<Self>,
134            coder: &NSCoder,
135        ) -> Option<Retained<Self>>;
136    );
137}
138
139/// Methods declared on superclass `NSResponder`.
140#[cfg(feature = "objc2-app-kit")]
141#[cfg(target_os = "macos")]
142impl MKMapItemDetailViewController {
143    extern_methods!(
144        #[unsafe(method(init))]
145        #[unsafe(method_family = init)]
146        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
147    );
148}
149
150/// Methods declared on superclass `NSObject`.
151#[cfg(feature = "objc2-app-kit")]
152#[cfg(target_os = "macos")]
153impl MKMapItemDetailViewController {
154    extern_methods!(
155        #[unsafe(method(new))]
156        #[unsafe(method_family = new)]
157        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
158    );
159}