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))]
24unsafe impl MKAnnotation for MKPolygon {}
25
26#[cfg(all(
27 feature = "MKAnnotation",
28 feature = "MKMultiPoint",
29 feature = "MKOverlay",
30 feature = "MKShape"
31))]
32unsafe impl MKOverlay for MKPolygon {}
33
34#[cfg(all(feature = "MKMultiPoint", feature = "MKShape"))]
35unsafe impl NSObjectProtocol for MKPolygon {}
36
37#[cfg(all(feature = "MKMultiPoint", feature = "MKShape"))]
38impl MKPolygon {
39 extern_methods!(
40 #[cfg(feature = "MKGeometry")]
41 #[unsafe(method(polygonWithPoints:count:))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn polygonWithPoints_count(
44 points: NonNull<MKMapPoint>,
45 count: NSUInteger,
46 ) -> Retained<Self>;
47
48 #[cfg(feature = "MKGeometry")]
49 #[unsafe(method(polygonWithPoints:count:interiorPolygons:))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn polygonWithPoints_count_interiorPolygons(
52 points: NonNull<MKMapPoint>,
53 count: NSUInteger,
54 interior_polygons: Option<&NSArray<MKPolygon>>,
55 ) -> Retained<Self>;
56
57 #[cfg(feature = "objc2-core-location")]
58 #[unsafe(method(polygonWithCoordinates:count:))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn polygonWithCoordinates_count(
61 coords: NonNull<CLLocationCoordinate2D>,
62 count: NSUInteger,
63 ) -> Retained<Self>;
64
65 #[cfg(feature = "objc2-core-location")]
66 #[unsafe(method(polygonWithCoordinates:count:interiorPolygons:))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn polygonWithCoordinates_count_interiorPolygons(
69 coords: NonNull<CLLocationCoordinate2D>,
70 count: NSUInteger,
71 interior_polygons: Option<&NSArray<MKPolygon>>,
72 ) -> Retained<Self>;
73
74 #[unsafe(method(interiorPolygons))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn interiorPolygons(&self) -> Option<Retained<NSArray<MKPolygon>>>;
77 );
78}
79
80#[cfg(all(feature = "MKMultiPoint", feature = "MKShape"))]
82impl MKPolygon {
83 extern_methods!(
84 #[unsafe(method(init))]
85 #[unsafe(method_family = init)]
86 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
87
88 #[unsafe(method(new))]
89 #[unsafe(method_family = new)]
90 pub unsafe fn new() -> Retained<Self>;
91 );
92}