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:))]
122 #[unsafe(method_family = none)]
123 pub unsafe fn setLineDashPattern(&self, line_dash_pattern: Option<&NSArray<NSNumber>>);
124
125 #[unsafe(method(shouldRasterize))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn shouldRasterize(&self) -> bool;
128
129 #[unsafe(method(setShouldRasterize:))]
131 #[unsafe(method_family = none)]
132 pub unsafe fn setShouldRasterize(&self, should_rasterize: bool);
133
134 #[unsafe(method(createPath))]
135 #[unsafe(method_family = none)]
136 pub unsafe fn createPath(&self);
137
138 #[cfg(feature = "objc2-core-graphics")]
139 #[unsafe(method(path))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn path(&self) -> Option<Retained<CGPath>>;
142
143 #[cfg(feature = "objc2-core-graphics")]
144 #[unsafe(method(setPath:))]
150 #[unsafe(method_family = none)]
151 pub unsafe fn setPath(&self, path: Option<&CGPath>);
152
153 #[unsafe(method(invalidatePath))]
154 #[unsafe(method_family = none)]
155 pub unsafe fn invalidatePath(&self);
156
157 #[cfg(all(
158 feature = "MKGeometry",
159 feature = "objc2-core-foundation",
160 feature = "objc2-core-graphics"
161 ))]
162 #[unsafe(method(applyStrokePropertiesToContext:atZoomScale:))]
163 #[unsafe(method_family = none)]
164 pub unsafe fn applyStrokePropertiesToContext_atZoomScale(
165 &self,
166 context: &CGContext,
167 zoom_scale: MKZoomScale,
168 );
169
170 #[cfg(all(
171 feature = "MKGeometry",
172 feature = "objc2-core-foundation",
173 feature = "objc2-core-graphics"
174 ))]
175 #[unsafe(method(applyFillPropertiesToContext:atZoomScale:))]
176 #[unsafe(method_family = none)]
177 pub unsafe fn applyFillPropertiesToContext_atZoomScale(
178 &self,
179 context: &CGContext,
180 zoom_scale: MKZoomScale,
181 );
182
183 #[cfg(feature = "objc2-core-graphics")]
184 #[unsafe(method(strokePath:inContext:))]
185 #[unsafe(method_family = none)]
186 pub unsafe fn strokePath_inContext(&self, path: &CGPath, context: &CGContext);
187
188 #[cfg(feature = "objc2-core-graphics")]
189 #[unsafe(method(fillPath:inContext:))]
190 #[unsafe(method_family = none)]
191 pub unsafe fn fillPath_inContext(&self, path: &CGPath, context: &CGContext);
192 );
193}
194
195#[cfg(feature = "MKOverlayRenderer")]
197impl MKOverlayPathRenderer {
198 extern_methods!(
199 #[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
200 #[unsafe(method(initWithOverlay:))]
201 #[unsafe(method_family = init)]
202 pub unsafe fn initWithOverlay(
203 this: Allocated<Self>,
204 overlay: &ProtocolObject<dyn MKOverlay>,
205 ) -> Retained<Self>;
206 );
207}
208
209#[cfg(feature = "MKOverlayRenderer")]
211impl MKOverlayPathRenderer {
212 extern_methods!(
213 #[unsafe(method(init))]
214 #[unsafe(method_family = init)]
215 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
216
217 #[unsafe(method(new))]
218 #[unsafe(method_family = new)]
219 pub unsafe fn new() -> Retained<Self>;
220 );
221}