objc2_map_kit/generated/
MKPolygonRenderer.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8
9use crate::*;
10
11extern_class!(
12 #[unsafe(super(MKOverlayPathRenderer, MKOverlayRenderer, NSObject))]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 #[cfg(all(feature = "MKOverlayPathRenderer", feature = "MKOverlayRenderer"))]
16 pub struct MKPolygonRenderer;
17);
18
19#[cfg(all(feature = "MKOverlayPathRenderer", feature = "MKOverlayRenderer"))]
20unsafe impl NSObjectProtocol for MKPolygonRenderer {}
21
22#[cfg(all(feature = "MKOverlayPathRenderer", feature = "MKOverlayRenderer"))]
23impl MKPolygonRenderer {
24 extern_methods!(
25 #[cfg(all(feature = "MKMultiPoint", feature = "MKPolygon", feature = "MKShape"))]
26 #[unsafe(method(initWithPolygon:))]
27 #[unsafe(method_family = init)]
28 pub unsafe fn initWithPolygon(this: Allocated<Self>, polygon: &MKPolygon)
29 -> Retained<Self>;
30
31 #[cfg(all(feature = "MKMultiPoint", feature = "MKPolygon", feature = "MKShape"))]
32 #[unsafe(method(polygon))]
33 #[unsafe(method_family = none)]
34 pub unsafe fn polygon(&self) -> Retained<MKPolygon>;
35
36 #[cfg(feature = "objc2-core-foundation")]
37 #[unsafe(method(strokeStart))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn strokeStart(&self) -> CGFloat;
40
41 #[cfg(feature = "objc2-core-foundation")]
42 #[unsafe(method(setStrokeStart:))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn setStrokeStart(&self, stroke_start: CGFloat);
46
47 #[cfg(feature = "objc2-core-foundation")]
48 #[unsafe(method(strokeEnd))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn strokeEnd(&self) -> CGFloat;
51
52 #[cfg(feature = "objc2-core-foundation")]
53 #[unsafe(method(setStrokeEnd:))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn setStrokeEnd(&self, stroke_end: CGFloat);
57 );
58}
59
60#[cfg(all(feature = "MKOverlayPathRenderer", feature = "MKOverlayRenderer"))]
62impl MKPolygonRenderer {
63 extern_methods!(
64 #[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
65 #[unsafe(method(initWithOverlay:))]
66 #[unsafe(method_family = init)]
67 pub unsafe fn initWithOverlay(
68 this: Allocated<Self>,
69 overlay: &ProtocolObject<dyn MKOverlay>,
70 ) -> Retained<Self>;
71 );
72}
73
74#[cfg(all(feature = "MKOverlayPathRenderer", feature = "MKOverlayRenderer"))]
76impl MKPolygonRenderer {
77 extern_methods!(
78 #[unsafe(method(init))]
79 #[unsafe(method_family = init)]
80 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
81
82 #[unsafe(method(new))]
83 #[unsafe(method_family = new)]
84 pub unsafe fn new() -> Retained<Self>;
85 );
86}