icrate 0.1.2

Bindings to Apple's frameworks
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::AppKit::*;
use crate::Contacts::*;
use crate::CoreLocation::*;
use crate::Foundation::*;
use crate::MapKit::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "MapKit_MKPolygon")]
    pub struct MKPolygon;

    #[cfg(feature = "MapKit_MKPolygon")]
    unsafe impl ClassType for MKPolygon {
        #[inherits(MKShape, NSObject)]
        type Super = MKMultiPoint;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "MapKit_MKPolygon")]
unsafe impl MKAnnotation for MKPolygon {}

#[cfg(feature = "MapKit_MKPolygon")]
unsafe impl MKOverlay for MKPolygon {}

#[cfg(feature = "MapKit_MKPolygon")]
unsafe impl NSObjectProtocol for MKPolygon {}

extern_methods!(
    #[cfg(feature = "MapKit_MKPolygon")]
    unsafe impl MKPolygon {
        #[method_id(@__retain_semantics Other polygonWithPoints:count:)]
        pub unsafe fn polygonWithPoints_count(
            points: NonNull<MKMapPoint>,
            count: NSUInteger,
        ) -> Id<Self>;

        #[cfg(feature = "Foundation_NSArray")]
        #[method_id(@__retain_semantics Other polygonWithPoints:count:interiorPolygons:)]
        pub unsafe fn polygonWithPoints_count_interiorPolygons(
            points: NonNull<MKMapPoint>,
            count: NSUInteger,
            interior_polygons: Option<&NSArray<MKPolygon>>,
        ) -> Id<Self>;

        #[method_id(@__retain_semantics Other polygonWithCoordinates:count:)]
        pub unsafe fn polygonWithCoordinates_count(
            coords: NonNull<CLLocationCoordinate2D>,
            count: NSUInteger,
        ) -> Id<Self>;

        #[cfg(feature = "Foundation_NSArray")]
        #[method_id(@__retain_semantics Other polygonWithCoordinates:count:interiorPolygons:)]
        pub unsafe fn polygonWithCoordinates_count_interiorPolygons(
            coords: NonNull<CLLocationCoordinate2D>,
            count: NSUInteger,
            interior_polygons: Option<&NSArray<MKPolygon>>,
        ) -> Id<Self>;

        #[cfg(feature = "Foundation_NSArray")]
        #[method_id(@__retain_semantics Other interiorPolygons)]
        pub unsafe fn interiorPolygons(&self) -> Option<Id<NSArray<MKPolygon>>>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "MapKit_MKPolygon")]
    unsafe impl MKPolygon {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);