objc2_phase/generated/
PHASEEnvelope.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
19 #[derive(Debug, PartialEq, Eq, Hash)]
20 pub struct PHASENumericPair;
21);
22
23extern_conformance!(
24 unsafe impl NSObjectProtocol for PHASENumericPair {}
25);
26
27impl PHASENumericPair {
28 extern_methods!(
29 #[unsafe(method(initWithFirstValue:secondValue:))]
37 #[unsafe(method_family = init)]
38 pub unsafe fn initWithFirstValue_secondValue(
39 this: Allocated<Self>,
40 first: c_double,
41 second: c_double,
42 ) -> Retained<Self>;
43
44 #[unsafe(method(first))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn first(&self) -> c_double;
50
51 #[unsafe(method(setFirst:))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn setFirst(&self, first: c_double);
55
56 #[unsafe(method(second))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn second(&self) -> c_double;
62
63 #[unsafe(method(setSecond:))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn setSecond(&self, second: c_double);
67 );
68}
69
70impl PHASENumericPair {
72 extern_methods!(
73 #[unsafe(method(init))]
74 #[unsafe(method_family = init)]
75 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
76
77 #[unsafe(method(new))]
78 #[unsafe(method_family = new)]
79 pub unsafe fn new() -> Retained<Self>;
80 );
81}
82
83extern_class!(
84 #[unsafe(super(NSObject))]
95 #[derive(Debug, PartialEq, Eq, Hash)]
96 pub struct PHASEEnvelopeSegment;
97);
98
99extern_conformance!(
100 unsafe impl NSObjectProtocol for PHASEEnvelopeSegment {}
101);
102
103impl PHASEEnvelopeSegment {
104 extern_methods!(
105 #[cfg(feature = "PHASETypes")]
106 #[unsafe(method(curveType))]
110 #[unsafe(method_family = none)]
111 pub unsafe fn curveType(&self) -> PHASECurveType;
112
113 #[cfg(feature = "PHASETypes")]
114 #[unsafe(method(setCurveType:))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn setCurveType(&self, curve_type: PHASECurveType);
118 );
119}
120
121impl PHASEEnvelopeSegment {
123 extern_methods!(
124 #[unsafe(method(init))]
125 #[unsafe(method_family = init)]
126 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
127
128 #[unsafe(method(new))]
129 #[unsafe(method_family = new)]
130 pub unsafe fn new() -> Retained<Self>;
131 );
132}
133
134extern_class!(
135 #[unsafe(super(NSObject))]
143 #[derive(Debug, PartialEq, Eq, Hash)]
144 pub struct PHASEEnvelope;
145);
146
147extern_conformance!(
148 unsafe impl NSObjectProtocol for PHASEEnvelope {}
149);
150
151impl PHASEEnvelope {
152 extern_methods!(
153 #[unsafe(method(init))]
154 #[unsafe(method_family = init)]
155 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
156
157 #[unsafe(method(new))]
158 #[unsafe(method_family = new)]
159 pub unsafe fn new() -> Retained<Self>;
160
161 #[unsafe(method(evaluateForValue:))]
169 #[unsafe(method_family = none)]
170 pub unsafe fn evaluateForValue(&self, x: c_double) -> c_double;
171
172 #[unsafe(method(segments))]
174 #[unsafe(method_family = none)]
175 pub unsafe fn segments(&self) -> Retained<NSArray<PHASEEnvelopeSegment>>;
176
177 #[unsafe(method(domain))]
182 #[unsafe(method_family = none)]
183 pub unsafe fn domain(&self) -> Retained<PHASENumericPair>;
184
185 #[unsafe(method(range))]
190 #[unsafe(method_family = none)]
191 pub unsafe fn range(&self) -> Retained<PHASENumericPair>;
192 );
193}