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::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;

use crate::*;

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

#[cfg(all(feature = "MKOverlayPathRenderer", feature = "MKOverlayRenderer"))]
extern_conformance!(
    unsafe impl NSObjectProtocol for MKPolylineRenderer {}
);

#[cfg(all(feature = "MKOverlayPathRenderer", feature = "MKOverlayRenderer"))]
impl MKPolylineRenderer {
    extern_methods!(
        #[cfg(all(feature = "MKMultiPoint", feature = "MKPolyline", feature = "MKShape"))]
        #[unsafe(method(initWithPolyline:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithPolyline(
            this: Allocated<Self>,
            polyline: &MKPolyline,
        ) -> Retained<Self>;

        #[cfg(all(feature = "MKMultiPoint", feature = "MKPolyline", feature = "MKShape"))]
        #[unsafe(method(polyline))]
        #[unsafe(method_family = none)]
        pub unsafe fn polyline(&self) -> Retained<MKPolyline>;

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(strokeStart))]
        #[unsafe(method_family = none)]
        pub unsafe fn strokeStart(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`strokeStart`][Self::strokeStart].
        #[unsafe(method(setStrokeStart:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setStrokeStart(&self, stroke_start: CGFloat);

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(strokeEnd))]
        #[unsafe(method_family = none)]
        pub unsafe fn strokeEnd(&self) -> CGFloat;

        #[cfg(feature = "objc2-core-foundation")]
        /// Setter for [`strokeEnd`][Self::strokeEnd].
        #[unsafe(method(setStrokeEnd:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setStrokeEnd(&self, stroke_end: CGFloat);
    );
}

/// Methods declared on superclass `MKOverlayRenderer`.
#[cfg(all(feature = "MKOverlayPathRenderer", feature = "MKOverlayRenderer"))]
impl MKPolylineRenderer {
    extern_methods!(
        #[cfg(all(feature = "MKAnnotation", feature = "MKOverlay"))]
        #[unsafe(method(initWithOverlay:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithOverlay(
            this: Allocated<Self>,
            overlay: &ProtocolObject<dyn MKOverlay>,
        ) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(all(feature = "MKOverlayPathRenderer", feature = "MKOverlayRenderer"))]
impl MKPolylineRenderer {
    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>;
    );
}