objc2_car_play/generated/
CPPointOfInterestTemplate.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7#[cfg(feature = "objc2-map-kit")]
8use objc2_map_kit::*;
9
10use crate::*;
11
12extern_protocol!(
13 pub unsafe trait CPPointOfInterestTemplateDelegate:
15 NSObjectProtocol + MainThreadOnly
16 {
17 #[cfg(all(feature = "CPTemplate", feature = "objc2-map-kit"))]
18 #[unsafe(method(pointOfInterestTemplate:didChangeMapRegion:))]
23 #[unsafe(method_family = none)]
24 unsafe fn pointOfInterestTemplate_didChangeMapRegion(
25 &self,
26 point_of_interest_template: &CPPointOfInterestTemplate,
27 region: MKCoordinateRegion,
28 );
29
30 #[cfg(all(feature = "CPPointOfInterest", feature = "CPTemplate"))]
31 #[optional]
34 #[unsafe(method(pointOfInterestTemplate:didSelectPointOfInterest:))]
35 #[unsafe(method_family = none)]
36 unsafe fn pointOfInterestTemplate_didSelectPointOfInterest(
37 &self,
38 point_of_interest_template: &CPPointOfInterestTemplate,
39 point_of_interest: &CPPointOfInterest,
40 );
41 }
42);
43
44extern_class!(
45 #[unsafe(super(CPTemplate, NSObject))]
47 #[thread_kind = MainThreadOnly]
48 #[derive(Debug, PartialEq, Eq, Hash)]
49 #[cfg(feature = "CPTemplate")]
50 pub struct CPPointOfInterestTemplate;
51);
52
53#[cfg(all(feature = "CPBarButtonProviding", feature = "CPTemplate"))]
54extern_conformance!(
55 unsafe impl CPBarButtonProviding for CPPointOfInterestTemplate {}
56);
57
58#[cfg(feature = "CPTemplate")]
59extern_conformance!(
60 unsafe impl NSCoding for CPPointOfInterestTemplate {}
61);
62
63#[cfg(feature = "CPTemplate")]
64extern_conformance!(
65 unsafe impl NSObjectProtocol for CPPointOfInterestTemplate {}
66);
67
68#[cfg(feature = "CPTemplate")]
69extern_conformance!(
70 unsafe impl NSSecureCoding for CPPointOfInterestTemplate {}
71);
72
73#[cfg(feature = "CPTemplate")]
74impl CPPointOfInterestTemplate {
75 extern_methods!(
76 #[cfg(feature = "CPPointOfInterest")]
77 #[unsafe(method(initWithTitle:pointsOfInterest:selectedIndex:))]
89 #[unsafe(method_family = init)]
90 pub unsafe fn initWithTitle_pointsOfInterest_selectedIndex(
91 this: Allocated<Self>,
92 title: &NSString,
93 points_of_interest: &NSArray<CPPointOfInterest>,
94 selected_index: NSUInteger,
95 ) -> Retained<Self>;
96
97 #[unsafe(method(init))]
98 #[unsafe(method_family = init)]
99 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
100
101 #[unsafe(method(new))]
102 #[unsafe(method_family = new)]
103 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
104
105 #[unsafe(method(title))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn title(&self) -> Retained<NSString>;
109
110 #[unsafe(method(setTitle:))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn setTitle(&self, title: &NSString);
116
117 #[cfg(feature = "CPPointOfInterest")]
118 #[unsafe(method(setPointsOfInterest:selectedIndex:))]
128 #[unsafe(method_family = none)]
129 pub unsafe fn setPointsOfInterest_selectedIndex(
130 &self,
131 points_of_interest: &NSArray<CPPointOfInterest>,
132 selected_index: NSUInteger,
133 );
134
135 #[cfg(feature = "CPPointOfInterest")]
136 #[unsafe(method(pointsOfInterest))]
137 #[unsafe(method_family = none)]
138 pub unsafe fn pointsOfInterest(&self) -> Retained<NSArray<CPPointOfInterest>>;
139
140 #[unsafe(method(selectedIndex))]
142 #[unsafe(method_family = none)]
143 pub unsafe fn selectedIndex(&self) -> NSUInteger;
144
145 #[unsafe(method(setSelectedIndex:))]
147 #[unsafe(method_family = none)]
148 pub unsafe fn setSelectedIndex(&self, selected_index: NSUInteger);
149
150 #[unsafe(method(pointOfInterestDelegate))]
152 #[unsafe(method_family = none)]
153 pub unsafe fn pointOfInterestDelegate(
154 &self,
155 ) -> Option<Retained<ProtocolObject<dyn CPPointOfInterestTemplateDelegate>>>;
156
157 #[unsafe(method(setPointOfInterestDelegate:))]
161 #[unsafe(method_family = none)]
162 pub unsafe fn setPointOfInterestDelegate(
163 &self,
164 point_of_interest_delegate: Option<
165 &ProtocolObject<dyn CPPointOfInterestTemplateDelegate>,
166 >,
167 );
168 );
169}