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:))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn polygonWithPoints_count(
50 points: NonNull<MKMapPoint>,
51 count: NSUInteger,
52 ) -> Retained<Self>;
53
54 #[cfg(feature = "MKGeometry")]
55 #[unsafe(method(polygonWithPoints:count:interiorPolygons:))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn polygonWithPoints_count_interiorPolygons(
58 points: NonNull<MKMapPoint>,
59 count: NSUInteger,
60 interior_polygons: Option<&NSArray<MKPolygon>>,
61 ) -> Retained<Self>;
62
63 #[cfg(feature = "objc2-core-location")]
64 #[unsafe(method(polygonWithCoordinates:count:))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn polygonWithCoordinates_count(
67 coords: NonNull<CLLocationCoordinate2D>,
68 count: NSUInteger,
69 ) -> Retained<Self>;
70
71 #[cfg(feature = "objc2-core-location")]
72 #[unsafe(method(polygonWithCoordinates:count:interiorPolygons:))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn polygonWithCoordinates_count_interiorPolygons(
75 coords: NonNull<CLLocationCoordinate2D>,
76 count: NSUInteger,
77 interior_polygons: Option<&NSArray<MKPolygon>>,
78 ) -> Retained<Self>;
79
80 #[unsafe(method(interiorPolygons))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn interiorPolygons(&self) -> Option<Retained<NSArray<MKPolygon>>>;
83 );
84}
85
86#[cfg(all(feature = "MKMultiPoint", feature = "MKShape"))]
88impl MKPolygon {
89 extern_methods!(
90 #[unsafe(method(init))]
91 #[unsafe(method_family = init)]
92 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
93
94 #[unsafe(method(new))]
95 #[unsafe(method_family = new)]
96 pub unsafe fn new() -> Retained<Self>;
97 );
98}