objc2_car_play/generated/
CPLane.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct CPLaneStatus(pub NSInteger);
15impl CPLaneStatus {
16 #[doc(alias = "CPLaneStatusNotGood")]
17 pub const NotGood: Self = Self(0);
18 #[doc(alias = "CPLaneStatusGood")]
19 pub const Good: Self = Self(1);
20 #[doc(alias = "CPLaneStatusPreferred")]
21 pub const Preferred: Self = Self(2);
22}
23
24unsafe impl Encode for CPLaneStatus {
25 const ENCODING: Encoding = NSInteger::ENCODING;
26}
27
28unsafe impl RefEncode for CPLaneStatus {
29 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
30}
31
32extern_class!(
33 #[unsafe(super(NSObject))]
37 #[derive(Debug, PartialEq, Eq, Hash)]
38 pub struct CPLane;
39);
40
41extern_conformance!(
42 unsafe impl NSCoding for CPLane {}
43);
44
45extern_conformance!(
46 unsafe impl NSCopying for CPLane {}
47);
48
49unsafe impl CopyingHelper for CPLane {
50 type Result = Self;
51}
52
53extern_conformance!(
54 unsafe impl NSObjectProtocol for CPLane {}
55);
56
57extern_conformance!(
58 unsafe impl NSSecureCoding for CPLane {}
59);
60
61impl CPLane {
62 extern_methods!(
63 #[deprecated = "-[CPLane initWithAngles:] or -[CPLane initWithHighlightedAngle:angles:isPreferred:]"]
64 #[unsafe(method(init))]
65 #[unsafe(method_family = init)]
66 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
67
68 #[unsafe(method(initWithAngles:))]
69 #[unsafe(method_family = init)]
70 pub unsafe fn initWithAngles(
71 this: Allocated<Self>,
72 angles: &NSArray<NSMeasurement<NSUnitAngle>>,
73 ) -> Retained<Self>;
74
75 #[unsafe(method(initWithAngles:highlightedAngle:isPreferred:))]
76 #[unsafe(method_family = init)]
77 pub unsafe fn initWithAngles_highlightedAngle_isPreferred(
78 this: Allocated<Self>,
79 angles: &NSArray<NSMeasurement<NSUnitAngle>>,
80 highlighted_angle: &NSMeasurement<NSUnitAngle>,
81 preferred: bool,
82 ) -> Retained<Self>;
83
84 #[unsafe(method(status))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn status(&self) -> CPLaneStatus;
89
90 #[unsafe(method(setStatus:))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn setStatus(&self, status: CPLaneStatus);
94
95 #[deprecated = "Use highlightedAngle to get value, use -[CPLane initAngles:highlightedAngle:isPreferred:] to create a CPLane with highlightedAngle set"]
97 #[unsafe(method(primaryAngle))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn primaryAngle(&self) -> Retained<NSMeasurement<NSUnitAngle>>;
100
101 #[deprecated = "Use highlightedAngle to get value, use -[CPLane initAngles:highlightedAngle:isPreferred:] to create a CPLane with highlightedAngle set"]
103 #[unsafe(method(setPrimaryAngle:))]
104 #[unsafe(method_family = none)]
105 pub unsafe fn setPrimaryAngle(&self, primary_angle: &NSMeasurement<NSUnitAngle>);
106
107 #[unsafe(method(highlightedAngle))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn highlightedAngle(&self) -> Option<Retained<NSMeasurement<NSUnitAngle>>>;
114
115 #[deprecated = "Use angles to get value, Use -[CPLane initWithAngles:] or -[CPLane initAngles:highlightedAngle:isPreferred:] to create a CPLane with angles"]
117 #[unsafe(method(secondaryAngles))]
118 #[unsafe(method_family = none)]
119 pub unsafe fn secondaryAngles(&self) -> Retained<NSArray<NSMeasurement<NSUnitAngle>>>;
120
121 #[deprecated = "Use angles to get value, Use -[CPLane initWithAngles:] or -[CPLane initAngles:highlightedAngle:isPreferred:] to create a CPLane with angles"]
123 #[unsafe(method(setSecondaryAngles:))]
124 #[unsafe(method_family = none)]
125 pub unsafe fn setSecondaryAngles(
126 &self,
127 secondary_angles: &NSArray<NSMeasurement<NSUnitAngle>>,
128 );
129
130 #[unsafe(method(angles))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn angles(&self) -> Retained<NSArray<NSMeasurement<NSUnitAngle>>>;
136 );
137}
138
139impl CPLane {
141 extern_methods!(
142 #[unsafe(method(new))]
143 #[unsafe(method_family = new)]
144 pub unsafe fn new() -> Retained<Self>;
145 );
146}