objc2_map_kit/generated/
MKOverlayPathRenderer.rs1use 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::*;
9#[cfg(feature = "objc2-core-foundation")]
10use objc2_core_foundation::*;
11#[cfg(feature = "objc2-core-graphics")]
12use objc2_core_graphics::*;
13use objc2_foundation::*;
14
15use crate::*;
16
17extern_class!(
18 #[unsafe(super(MKOverlayRenderer, NSObject))]
20 #[derive(Debug, PartialEq, Eq, Hash)]
21 #[cfg(feature = "MKOverlayRenderer")]
22 pub struct MKOverlayPathRenderer;
23);
24
25#[cfg(feature = "MKOverlayRenderer")]
26extern_conformance!(
27 unsafe impl NSObjectProtocol for MKOverlayPathRenderer {}
28);
29
30#[cfg(feature = "MKOverlayRenderer")]
31impl MKOverlayPathRenderer {
32 extern_methods!(
33 #[cfg(feature = "objc2-app-kit")]
34 #[cfg(target_os = "macos")]
35 #[unsafe(method(fillColor))]
36 #[unsafe(method_family = none)]
37 pub unsafe fn fillColor(&self) -> Option<Retained<NSColor>>;
38
39 #[cfg(feature = "objc2-app-kit")]
40 #[cfg(target_os = "macos")]
41 #[unsafe(method(setFillColor:))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn setFillColor(&self, fill_color: Option<&NSColor>);
45
46 #[cfg(feature = "objc2-app-kit")]
47 #[cfg(target_os = "macos")]
48 #[unsafe(method(strokeColor))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn strokeColor(&self) -> Option<Retained<NSColor>>;
51
52 #[cfg(feature = "objc2-app-kit")]
53 #[cfg(target_os = "macos")]
54 #[unsafe(method(setStrokeColor:))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn setStrokeColor(&self, stroke_color: Option<&NSColor>);
58
59 #[cfg(feature = "objc2-core-foundation")]
60 #[unsafe(method(lineWidth))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn lineWidth(&self) -> CGFloat;
63
64 #[cfg(feature = "objc2-core-foundation")]
65 #[unsafe(method(setLineWidth:))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn setLineWidth(&self, line_width: CGFloat);
69
70 #[cfg(feature = "objc2-core-graphics")]
71 #[unsafe(method(lineJoin))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn lineJoin(&self) -> CGLineJoin;
74
75 #[cfg(feature = "objc2-core-graphics")]
76 #[unsafe(method(setLineJoin:))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn setLineJoin(&self, line_join: CGLineJoin);
80
81 #[cfg(feature = "objc2-core-graphics")]
82 #[unsafe(method(lineCap))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn lineCap(&self) -> CGLineCap;
85
86 #[cfg(feature = "objc2-core-graphics")]
87 #[unsafe(method(setLineCap:))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn setLineCap(&self, line_cap: CGLineCap);
91
92 #[cfg(feature = "objc2-core-foundation")]
93 #[unsafe(method(miterLimit))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn miterLimit(&self) -> CGFloat;
96
97 #[cfg(feature = "objc2-core-foundation")]
98 #[unsafe(method(setMiterLimit:))]
100 #[unsafe(method_family = none)]
101 pub unsafe fn setMiterLimit(&self, miter_limit: CGFloat);
102
103 #[cfg(feature = "objc2-core-foundation")]
104 #[unsafe(method(lineDashPhase))]
105 #[unsafe(method_family = none)]
106 pub unsafe fn lineDashPhase(&self) -> CGFloat;
107
108 #[cfg(feature = "objc2-core-foundation")]
109 #[unsafe(method(setLineDashPhase:))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn setLineDashPhase(&self, line_dash_phase: CGFloat);
113
114 #[unsafe(method(lineDashPattern))]
115 #[unsafe(method_family = none)]
116 pub unsafe fn lineDashPattern(&self) -> Option<Retained<NSArray<NSNumber>>>;
117
118 #[unsafe(method(setLineDashPattern:))]
120 #[unsafe(method_family = none)]
121 pub unsafe fn setLineDashPattern(&self, line_dash_pattern: Option<&NSArray<NSNumber>>);
122
123 #[unsafe(method(shouldRasterize))]
124 #[unsafe(method_family = none)]
125 pub unsafe fn shouldRasterize(&self) -> bool;
126
127 #[unsafe(method(setShouldRasterize:))]
129 #[unsafe(method_family = none)]
130 pub unsafe fn setShouldRasterize(&self, should_rasterize: bool);
131
132 #[unsafe(method(createPath))]
133 #[unsafe(method_family = none)]
134 pub unsafe fn createPath(&self);
135
136 #[cfg(feature = "objc2-core-graphics")]
137 #[unsafe(method(path))]
138 #[unsafe(method_family = none)]
139 pub unsafe fn path(&self) -> Option<Retained<CGPath>>;
140
141 #[cfg(feature = "objc2-core-graphics")]
142 #[unsafe(method(setPath:))]
144 #[unsafe(method_family = none)]
145 pub unsafe fn setPath(&self, path: Option<&CGPath>);
146
147 #[unsafe(method(invalidatePath))]
148 #[unsafe(method_family = none)]
149 pub unsafe fn invalidatePath(&self);
150
151 #[cfg(all(
152 feature = "MKGeometry",
153 feature = "objc2-core-foundation",
154 feature = "objc2-core-graphics"
155 ))]
156 #[unsafe(method(applyStrokePropertiesToContext:atZoomScale:))]
157 #[unsafe(method_family = none)]
158 pub unsafe fn applyStrokePropertiesToContext_atZoomScale(
159 &self,
160 context: &CGContext,
161 zoom_scale: MKZoomScale,
162 );
163
164 #[cfg(all(
165 feature = "MKGeometry",
166 feature = "objc2-core-foundation",
167 feature = "objc2-core-graphics"
168 ))]
169 #[unsafe(method(applyFillPropertiesToContext:atZoomScale:))]
170 #[unsafe(method_family = none)]
171 pub unsafe fn applyFillPropertiesToContext_atZoomScale(
172 &self,
173 context: &CGContext,
174 zoom_scale: MKZoomScale,
175 );
176
177 #[cfg(feature = "objc2-core-graphics")]
178 #[unsafe(method(strokePath:inContext:))]
179 #[unsafe(method_family = none)]
180 pub unsafe fn strokePath_inContext(&self, path: &CGPath, context: &CGContext);
181
182 #[cfg(feature = "objc2-core-graphics")]
183 #[unsafe(method(fillPath:inContext:))]
184 #[unsafe(method_family = none)]
185 pub unsafe fn fillPath_inContext(&self, path: &CGPath, context: &CGContext);
186 );
187}
188
189#[cfg(feature = "MKOverlayRenderer")]
191impl MKOverlayPathRenderer {
192 extern_methods!(
193 #[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
194 #[unsafe(method(initWithOverlay:))]
195 #[unsafe(method_family = init)]
196 pub unsafe fn initWithOverlay(
197 this: Allocated<Self>,
198 overlay: &ProtocolObject<dyn MKOverlay>,
199 ) -> Retained<Self>;
200 );
201}
202
203#[cfg(feature = "MKOverlayRenderer")]
205impl MKOverlayPathRenderer {
206 extern_methods!(
207 #[unsafe(method(init))]
208 #[unsafe(method_family = init)]
209 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
210
211 #[unsafe(method(new))]
212 #[unsafe(method_family = new)]
213 pub unsafe fn new() -> Retained<Self>;
214 );
215}