objc2_map_kit/generated/
MKPolyline.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-core-location")]
6use objc2_core_location::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkpolyline?language=objc)
12    #[unsafe(super(MKMultiPoint, MKShape, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(all(feature = "MKMultiPoint", feature = "MKShape"))]
15    pub struct MKPolyline;
16);
17
18#[cfg(all(
19    feature = "MKAnnotation",
20    feature = "MKMultiPoint",
21    feature = "MKShape"
22))]
23extern_conformance!(
24    unsafe impl MKAnnotation for MKPolyline {}
25);
26
27#[cfg(all(
28    feature = "MKAnnotation",
29    feature = "MKMultiPoint",
30    feature = "MKOverlay",
31    feature = "MKShape"
32))]
33extern_conformance!(
34    unsafe impl MKOverlay for MKPolyline {}
35);
36
37#[cfg(all(feature = "MKMultiPoint", feature = "MKShape"))]
38extern_conformance!(
39    unsafe impl NSObjectProtocol for MKPolyline {}
40);
41
42#[cfg(all(feature = "MKMultiPoint", feature = "MKShape"))]
43impl MKPolyline {
44    extern_methods!(
45        #[cfg(feature = "MKGeometry")]
46        /// # Safety
47        ///
48        /// `points` must be a valid pointer.
49        #[unsafe(method(polylineWithPoints:count:))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn polylineWithPoints_count(
52            points: NonNull<MKMapPoint>,
53            count: NSUInteger,
54        ) -> Retained<Self>;
55
56        #[cfg(feature = "objc2-core-location")]
57        /// # Safety
58        ///
59        /// `coords` must be a valid pointer.
60        #[unsafe(method(polylineWithCoordinates:count:))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn polylineWithCoordinates_count(
63            coords: NonNull<CLLocationCoordinate2D>,
64            count: NSUInteger,
65        ) -> Retained<Self>;
66    );
67}
68
69/// Methods declared on superclass `NSObject`.
70#[cfg(all(feature = "MKMultiPoint", feature = "MKShape"))]
71impl MKPolyline {
72    extern_methods!(
73        #[unsafe(method(init))]
74        #[unsafe(method_family = init)]
75        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
76
77        #[unsafe(method(new))]
78        #[unsafe(method_family = new)]
79        pub unsafe fn new() -> Retained<Self>;
80    );
81}