objc2_map_kit/generated/
MKPolygon.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-location")]
6use objc2_core_location::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11extern_class!(
12 #[unsafe(super(MKMultiPoint, MKShape, NSObject))]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 #[cfg(all(feature = "MKMultiPoint", feature = "MKShape"))]
16 pub struct MKPolygon;
17);
18
19#[cfg(all(
20 feature = "MKAnnotation",
21 feature = "MKMultiPoint",
22 feature = "MKShape"
23))]
24extern_conformance!(
25 unsafe impl MKAnnotation for MKPolygon {}
26);
27
28#[cfg(all(
29 feature = "MKAnnotation",
30 feature = "MKMultiPoint",
31 feature = "MKOverlay",
32 feature = "MKShape"
33))]
34extern_conformance!(
35 unsafe impl MKOverlay for MKPolygon {}
36);
37
38#[cfg(all(feature = "MKMultiPoint", feature = "MKShape"))]
39extern_conformance!(
40 unsafe impl NSObjectProtocol for MKPolygon {}
41);
42
43#[cfg(all(feature = "MKMultiPoint", feature = "MKShape"))]
44impl MKPolygon {
45 extern_methods!(
46 #[cfg(feature = "MKGeometry")]
47 #[unsafe(method(polygonWithPoints:count:))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn polygonWithPoints_count(
53 points: NonNull<MKMapPoint>,
54 count: NSUInteger,
55 ) -> Retained<Self>;
56
57 #[cfg(feature = "MKGeometry")]
58 #[unsafe(method(polygonWithPoints:count:interiorPolygons:))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn polygonWithPoints_count_interiorPolygons(
64 points: NonNull<MKMapPoint>,
65 count: NSUInteger,
66 interior_polygons: Option<&NSArray<MKPolygon>>,
67 ) -> Retained<Self>;
68
69 #[cfg(feature = "objc2-core-location")]
70 #[unsafe(method(polygonWithCoordinates:count:))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn polygonWithCoordinates_count(
76 coords: NonNull<CLLocationCoordinate2D>,
77 count: NSUInteger,
78 ) -> Retained<Self>;
79
80 #[cfg(feature = "objc2-core-location")]
81 #[unsafe(method(polygonWithCoordinates:count:interiorPolygons:))]
85 #[unsafe(method_family = none)]
86 pub unsafe fn polygonWithCoordinates_count_interiorPolygons(
87 coords: NonNull<CLLocationCoordinate2D>,
88 count: NSUInteger,
89 interior_polygons: Option<&NSArray<MKPolygon>>,
90 ) -> Retained<Self>;
91
92 #[unsafe(method(interiorPolygons))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn interiorPolygons(&self) -> Option<Retained<NSArray<MKPolygon>>>;
95 );
96}
97
98#[cfg(all(feature = "MKMultiPoint", feature = "MKShape"))]
100impl MKPolygon {
101 extern_methods!(
102 #[unsafe(method(init))]
103 #[unsafe(method_family = init)]
104 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
105
106 #[unsafe(method(new))]
107 #[unsafe(method_family = new)]
108 pub unsafe fn new() -> Retained<Self>;
109 );
110}