use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CPLaneStatus(pub NSInteger);
impl CPLaneStatus {
#[doc(alias = "CPLaneStatusNotGood")]
pub const NotGood: Self = Self(0);
#[doc(alias = "CPLaneStatusGood")]
pub const Good: Self = Self(1);
#[doc(alias = "CPLaneStatusPreferred")]
pub const Preferred: Self = Self(2);
}
unsafe impl Encode for CPLaneStatus {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for CPLaneStatus {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct CPLane;
);
extern_conformance!(
unsafe impl NSCoding for CPLane {}
);
extern_conformance!(
unsafe impl NSCopying for CPLane {}
);
unsafe impl CopyingHelper for CPLane {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for CPLane {}
);
extern_conformance!(
unsafe impl NSSecureCoding for CPLane {}
);
impl CPLane {
extern_methods!(
#[deprecated = "-[CPLane initWithAngles:] or -[CPLane initWithHighlightedAngle:angles:isPreferred:]"]
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(initWithAngles:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithAngles(
this: Allocated<Self>,
angles: &NSArray<NSMeasurement<NSUnitAngle>>,
) -> Retained<Self>;
#[unsafe(method(initWithAngles:highlightedAngle:isPreferred:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithAngles_highlightedAngle_isPreferred(
this: Allocated<Self>,
angles: &NSArray<NSMeasurement<NSUnitAngle>>,
highlighted_angle: &NSMeasurement<NSUnitAngle>,
preferred: bool,
) -> Retained<Self>;
#[unsafe(method(status))]
#[unsafe(method_family = none)]
pub unsafe fn status(&self) -> CPLaneStatus;
#[unsafe(method(setStatus:))]
#[unsafe(method_family = none)]
pub unsafe fn setStatus(&self, status: CPLaneStatus);
#[deprecated = "Use highlightedAngle to get value, use -[CPLane initAngles:highlightedAngle:isPreferred:] to create a CPLane with highlightedAngle set"]
#[unsafe(method(primaryAngle))]
#[unsafe(method_family = none)]
pub unsafe fn primaryAngle(&self) -> Retained<NSMeasurement<NSUnitAngle>>;
#[deprecated = "Use highlightedAngle to get value, use -[CPLane initAngles:highlightedAngle:isPreferred:] to create a CPLane with highlightedAngle set"]
#[unsafe(method(setPrimaryAngle:))]
#[unsafe(method_family = none)]
pub unsafe fn setPrimaryAngle(&self, primary_angle: &NSMeasurement<NSUnitAngle>);
#[unsafe(method(highlightedAngle))]
#[unsafe(method_family = none)]
pub unsafe fn highlightedAngle(&self) -> Option<Retained<NSMeasurement<NSUnitAngle>>>;
#[deprecated = "Use angles to get value, Use -[CPLane initWithAngles:] or -[CPLane initAngles:highlightedAngle:isPreferred:] to create a CPLane with angles"]
#[unsafe(method(secondaryAngles))]
#[unsafe(method_family = none)]
pub unsafe fn secondaryAngles(&self) -> Retained<NSArray<NSMeasurement<NSUnitAngle>>>;
#[deprecated = "Use angles to get value, Use -[CPLane initWithAngles:] or -[CPLane initAngles:highlightedAngle:isPreferred:] to create a CPLane with angles"]
#[unsafe(method(setSecondaryAngles:))]
#[unsafe(method_family = none)]
pub unsafe fn setSecondaryAngles(
&self,
secondary_angles: &NSArray<NSMeasurement<NSUnitAngle>>,
);
#[unsafe(method(angles))]
#[unsafe(method_family = none)]
pub unsafe fn angles(&self) -> Retained<NSArray<NSMeasurement<NSUnitAngle>>>;
);
}
impl CPLane {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}