objc2-car-play 0.3.2

Bindings to the CarPlay 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::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// `CPLaneGuidance`represents guidance to give the user which lane or lanes are preferred.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/carplay/cplaneguidance?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct CPLaneGuidance;
);

extern_conformance!(
    unsafe impl NSCoding for CPLaneGuidance {}
);

extern_conformance!(
    unsafe impl NSCopying for CPLaneGuidance {}
);

unsafe impl CopyingHelper for CPLaneGuidance {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for CPLaneGuidance {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for CPLaneGuidance {}
);

impl CPLaneGuidance {
    extern_methods!(
        #[cfg(feature = "CPLane")]
        /// lanes is an array of
        /// `CPLane`objects, each describes a single lane.
        #[unsafe(method(lanes))]
        #[unsafe(method_family = none)]
        pub unsafe fn lanes(&self) -> Retained<NSArray<CPLane>>;

        #[cfg(feature = "CPLane")]
        /// Setter for [`lanes`][Self::lanes].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setLanes:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setLanes(&self, lanes: &NSArray<CPLane>);

        /// instructionVariants is an array of
        /// `NSString`representing the instruction for this lane guidance, arranged from most to least preferred. You must provide at least one variant.
        /// The variant strings should be provided as localized, displayable content.
        #[unsafe(method(instructionVariants))]
        #[unsafe(method_family = none)]
        pub unsafe fn instructionVariants(&self) -> Retained<NSArray<NSString>>;

        /// Setter for [`instructionVariants`][Self::instructionVariants].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setInstructionVariants:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setInstructionVariants(&self, instruction_variants: &NSArray<NSString>);
    );
}

/// Methods declared on superclass `NSObject`.
impl CPLaneGuidance {
    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>;
    );
}