objc2-map-kit 0.3.2

Bindings to the MapKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-location")]
use objc2_core_location::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/mapkit/mkgeodesicpolyline?language=objc)
    #[unsafe(super(MKPolyline, MKMultiPoint, MKShape, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(all(feature = "MKMultiPoint", feature = "MKPolyline", feature = "MKShape"))]
    pub struct MKGeodesicPolyline;
);

#[cfg(all(
    feature = "MKAnnotation",
    feature = "MKMultiPoint",
    feature = "MKPolyline",
    feature = "MKShape"
))]
extern_conformance!(
    unsafe impl MKAnnotation for MKGeodesicPolyline {}
);

#[cfg(all(
    feature = "MKAnnotation",
    feature = "MKMultiPoint",
    feature = "MKOverlay",
    feature = "MKPolyline",
    feature = "MKShape"
))]
extern_conformance!(
    unsafe impl MKOverlay for MKGeodesicPolyline {}
);

#[cfg(all(feature = "MKMultiPoint", feature = "MKPolyline", feature = "MKShape"))]
extern_conformance!(
    unsafe impl NSObjectProtocol for MKGeodesicPolyline {}
);

#[cfg(all(feature = "MKMultiPoint", feature = "MKPolyline", feature = "MKShape"))]
impl MKGeodesicPolyline {
    extern_methods!(
        #[cfg(feature = "MKGeometry")]
        /// # Safety
        ///
        /// `points` must be a valid pointer.
        #[unsafe(method(polylineWithPoints:count:))]
        #[unsafe(method_family = none)]
        pub unsafe fn polylineWithPoints_count(
            points: NonNull<MKMapPoint>,
            count: NSUInteger,
        ) -> Retained<Self>;

        #[cfg(feature = "objc2-core-location")]
        /// # Safety
        ///
        /// `coords` must be a valid pointer.
        #[unsafe(method(polylineWithCoordinates:count:))]
        #[unsafe(method_family = none)]
        pub unsafe fn polylineWithCoordinates_count(
            coords: NonNull<CLLocationCoordinate2D>,
            count: NSUInteger,
        ) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(all(feature = "MKMultiPoint", feature = "MKPolyline", feature = "MKShape"))]
impl MKGeodesicPolyline {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}