objc2_phase/generated/
PHASEMetaParameter.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// *************************************************************************************************
12    ///
13    ///
14    ///
15    /// A base object for metaparameter definitions
16    ///
17    /// See also [Apple's documentation](https://developer.apple.com/documentation/phase/phasemetaparameterdefinition?language=objc)
18    #[unsafe(super(PHASEDefinition, NSObject))]
19    #[derive(Debug, PartialEq, Eq, Hash)]
20    #[cfg(feature = "PHASEDefinition")]
21    pub struct PHASEMetaParameterDefinition;
22);
23
24#[cfg(feature = "PHASEDefinition")]
25extern_conformance!(
26    unsafe impl NSObjectProtocol for PHASEMetaParameterDefinition {}
27);
28
29#[cfg(feature = "PHASEDefinition")]
30impl PHASEMetaParameterDefinition {
31    extern_methods!(
32        #[unsafe(method(init))]
33        #[unsafe(method_family = init)]
34        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
35
36        #[unsafe(method(new))]
37        #[unsafe(method_family = new)]
38        pub unsafe fn new() -> Retained<Self>;
39
40        /// The value of the metaparameter.
41        #[unsafe(method(value))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn value(&self) -> Retained<AnyObject>;
44    );
45}
46
47extern_class!(
48    /// *************************************************************************************************
49    ///
50    ///
51    ///
52    /// A metaparameter that has a numeric value
53    ///
54    /// See also [Apple's documentation](https://developer.apple.com/documentation/phase/phasenumbermetaparameterdefinition?language=objc)
55    #[unsafe(super(PHASEMetaParameterDefinition, PHASEDefinition, NSObject))]
56    #[derive(Debug, PartialEq, Eq, Hash)]
57    #[cfg(feature = "PHASEDefinition")]
58    pub struct PHASENumberMetaParameterDefinition;
59);
60
61#[cfg(feature = "PHASEDefinition")]
62extern_conformance!(
63    unsafe impl NSObjectProtocol for PHASENumberMetaParameterDefinition {}
64);
65
66#[cfg(feature = "PHASEDefinition")]
67impl PHASENumberMetaParameterDefinition {
68    extern_methods!(
69        #[unsafe(method(init))]
70        #[unsafe(method_family = init)]
71        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
72
73        #[unsafe(method(new))]
74        #[unsafe(method_family = new)]
75        pub unsafe fn new() -> Retained<Self>;
76
77        /// Create a new numeric metaparameter definition
78        ///
79        /// Parameter `value`: The initial value of the metaparameter
80        ///
81        /// Parameter `identifier`: An optional custom identifier to give to this object
82        ///
83        /// Returns: The new PHASENumberMetaParameterDefinition object
84        #[unsafe(method(initWithValue:identifier:))]
85        #[unsafe(method_family = init)]
86        pub unsafe fn initWithValue_identifier(
87            this: Allocated<Self>,
88            value: c_double,
89            identifier: &NSString,
90        ) -> Retained<Self>;
91
92        /// Create a new numeric metaparameter definition
93        ///
94        /// Parameter `value`: The initial value of the metaparameter
95        ///
96        /// Returns: The new PHASENumberMetaParameterDefinition object
97        #[unsafe(method(initWithValue:))]
98        #[unsafe(method_family = init)]
99        pub unsafe fn initWithValue(this: Allocated<Self>, value: c_double) -> Retained<Self>;
100
101        /// Create a new numeric metaparameter definition and a predefined min and maximum range
102        ///
103        /// Parameter `value`: The initial value of the metaparameter
104        ///
105        /// Parameter `minimum`: The minimum value for this metaparameter.  Values set to this metaparamter less than the minimum will be clamped.
106        ///
107        /// Parameter `maximum`: The maximum value for this metaparameter.  Values set to this metaparamter less than the minimum will be clamped.
108        ///
109        /// Parameter `identifier`: An optional custom identifier to give to this object
110        ///
111        /// Returns: The new PHASENumberMetaParameterDefinition object
112        #[unsafe(method(initWithValue:minimum:maximum:identifier:))]
113        #[unsafe(method_family = init)]
114        pub unsafe fn initWithValue_minimum_maximum_identifier(
115            this: Allocated<Self>,
116            value: c_double,
117            minimum: c_double,
118            maximum: c_double,
119            identifier: &NSString,
120        ) -> Retained<Self>;
121
122        /// Create a new numeric metaparameter definition and a predefined min and maximum range
123        ///
124        /// Parameter `value`: The initial value of the metaparameter
125        ///
126        /// Parameter `minimum`: The minimum value for this metaparameter.  Values set to this metaparamter less than the minimum will be clamped.
127        ///
128        /// Parameter `maximum`: The maximum value for this metaparameter.  Values set to this metaparamter less than the minimum will be clamped.
129        ///
130        /// Returns: The new PHASENumberMetaParameterDefinition object
131        #[unsafe(method(initWithValue:minimum:maximum:))]
132        #[unsafe(method_family = init)]
133        pub unsafe fn initWithValue_minimum_maximum(
134            this: Allocated<Self>,
135            value: c_double,
136            minimum: c_double,
137            maximum: c_double,
138        ) -> Retained<Self>;
139
140        /// The readonly minimum that this metaparameter definition was initialized with
141        #[unsafe(method(minimum))]
142        #[unsafe(method_family = none)]
143        pub unsafe fn minimum(&self) -> c_double;
144
145        /// The readonly maximum that this metaparameter definition was initialized with
146        #[unsafe(method(maximum))]
147        #[unsafe(method_family = none)]
148        pub unsafe fn maximum(&self) -> c_double;
149    );
150}
151
152extern_class!(
153    /// *************************************************************************************************
154    ///
155    ///
156    ///
157    /// A Metaparameter that has a string value
158    ///
159    /// See also [Apple's documentation](https://developer.apple.com/documentation/phase/phasestringmetaparameterdefinition?language=objc)
160    #[unsafe(super(PHASEMetaParameterDefinition, PHASEDefinition, NSObject))]
161    #[derive(Debug, PartialEq, Eq, Hash)]
162    #[cfg(feature = "PHASEDefinition")]
163    pub struct PHASEStringMetaParameterDefinition;
164);
165
166#[cfg(feature = "PHASEDefinition")]
167extern_conformance!(
168    unsafe impl NSObjectProtocol for PHASEStringMetaParameterDefinition {}
169);
170
171#[cfg(feature = "PHASEDefinition")]
172impl PHASEStringMetaParameterDefinition {
173    extern_methods!(
174        #[unsafe(method(init))]
175        #[unsafe(method_family = init)]
176        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
177
178        #[unsafe(method(new))]
179        #[unsafe(method_family = new)]
180        pub unsafe fn new() -> Retained<Self>;
181
182        /// Create a new string metaparameter definition
183        ///
184        /// Parameter `value`: The initial value of the metaparameter
185        ///
186        /// Parameter `identifier`: An optional custom identifier to give to this object
187        ///
188        /// Returns: The new PHASEStringMetaParameterDefinition object
189        #[unsafe(method(initWithValue:identifier:))]
190        #[unsafe(method_family = init)]
191        pub unsafe fn initWithValue_identifier(
192            this: Allocated<Self>,
193            value: &NSString,
194            identifier: &NSString,
195        ) -> Retained<Self>;
196
197        /// Create a new string metaparameter definition
198        ///
199        /// Parameter `value`: The initial value of the metaparameter
200        ///
201        /// Returns: The new PHASEStringMetaParameterDefinition object
202        #[unsafe(method(initWithValue:))]
203        #[unsafe(method_family = init)]
204        pub unsafe fn initWithValue(this: Allocated<Self>, value: &NSString) -> Retained<Self>;
205    );
206}
207
208extern_class!(
209    /// *************************************************************************************************
210    ///
211    ///
212    ///
213    /// An object to define a Mapped Metaparameter when building an sound event.
214    ///
215    /// See also [Apple's documentation](https://developer.apple.com/documentation/phase/phasemappedmetaparameterdefinition?language=objc)
216    #[unsafe(super(
217        PHASENumberMetaParameterDefinition,
218        PHASEMetaParameterDefinition,
219        PHASEDefinition,
220        NSObject
221    ))]
222    #[derive(Debug, PartialEq, Eq, Hash)]
223    #[cfg(feature = "PHASEDefinition")]
224    pub struct PHASEMappedMetaParameterDefinition;
225);
226
227#[cfg(feature = "PHASEDefinition")]
228extern_conformance!(
229    unsafe impl NSObjectProtocol for PHASEMappedMetaParameterDefinition {}
230);
231
232#[cfg(feature = "PHASEDefinition")]
233impl PHASEMappedMetaParameterDefinition {
234    extern_methods!(
235        #[unsafe(method(init))]
236        #[unsafe(method_family = init)]
237        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
238
239        #[unsafe(method(new))]
240        #[unsafe(method_family = new)]
241        pub unsafe fn new() -> Retained<Self>;
242
243        #[unsafe(method(initWithValue:identifier:))]
244        #[unsafe(method_family = init)]
245        pub unsafe fn initWithValue_identifier(
246            this: Allocated<Self>,
247            value: c_double,
248            identifier: &NSString,
249        ) -> Retained<Self>;
250
251        #[unsafe(method(initWithValue:))]
252        #[unsafe(method_family = init)]
253        pub unsafe fn initWithValue(this: Allocated<Self>, value: c_double) -> Retained<Self>;
254
255        #[unsafe(method(initWithValue:minimum:maximum:identifier:))]
256        #[unsafe(method_family = init)]
257        pub unsafe fn initWithValue_minimum_maximum_identifier(
258            this: Allocated<Self>,
259            value: c_double,
260            minimum: c_double,
261            maximum: c_double,
262            identifier: &NSString,
263        ) -> Retained<Self>;
264
265        #[unsafe(method(initWithValue:minimum:maximum:))]
266        #[unsafe(method_family = init)]
267        pub unsafe fn initWithValue_minimum_maximum(
268            this: Allocated<Self>,
269            value: c_double,
270            minimum: c_double,
271            maximum: c_double,
272        ) -> Retained<Self>;
273
274        #[cfg(feature = "PHASEEnvelope")]
275        /// Create a new mapped range metaparameter definition
276        ///
277        /// Parameter `inputMetaParameterDefinition`: The metaparameter that will provide an input for this mapped metaparameter
278        ///
279        /// Parameter `envelope`: The envelope to use.
280        ///
281        /// Parameter `identifier`: An optional custom identifier to give to this object
282        ///
283        /// Returns: The new PHASEMappedMetaParameterDefinition object
284        #[unsafe(method(initWithInputMetaParameterDefinition:envelope:identifier:))]
285        #[unsafe(method_family = init)]
286        pub unsafe fn initWithInputMetaParameterDefinition_envelope_identifier(
287            this: Allocated<Self>,
288            input_meta_parameter_definition: &PHASENumberMetaParameterDefinition,
289            envelope: &PHASEEnvelope,
290            identifier: &NSString,
291        ) -> Retained<Self>;
292
293        #[cfg(feature = "PHASEEnvelope")]
294        /// Create a new mapped range metaparameter definition
295        ///
296        /// Parameter `inputMetaParameterDefinition`: The metaparameter that will provide an input for this mapped metaparameter
297        ///
298        /// Parameter `envelope`: The envelope to use.
299        ///
300        /// Returns: The new PHASEMappedMetaParameterDefinition object
301        #[unsafe(method(initWithInputMetaParameterDefinition:envelope:))]
302        #[unsafe(method_family = init)]
303        pub unsafe fn initWithInputMetaParameterDefinition_envelope(
304            this: Allocated<Self>,
305            input_meta_parameter_definition: &PHASENumberMetaParameterDefinition,
306            envelope: &PHASEEnvelope,
307        ) -> Retained<Self>;
308
309        #[cfg(feature = "PHASEEnvelope")]
310        /// An Envelope to define segments of curves
311        #[unsafe(method(envelope))]
312        #[unsafe(method_family = none)]
313        pub unsafe fn envelope(&self) -> Retained<PHASEEnvelope>;
314
315        /// The readonly PHASENumberMetaParameterDefinition that this metaparameter definition was initialized with
316        #[unsafe(method(inputMetaParameterDefinition))]
317        #[unsafe(method_family = none)]
318        pub unsafe fn inputMetaParameterDefinition(
319            &self,
320        ) -> Retained<PHASENumberMetaParameterDefinition>;
321
322        #[unsafe(method(minimum))]
323        #[unsafe(method_family = none)]
324        pub unsafe fn minimum(&self) -> c_double;
325
326        #[unsafe(method(maximum))]
327        #[unsafe(method_family = none)]
328        pub unsafe fn maximum(&self) -> c_double;
329    );
330}
331
332extern_class!(
333    /// *************************************************************************************************
334    ///
335    ///
336    ///
337    /// A generic object that represents an active metaparameter in the system
338    ///
339    /// See also [Apple's documentation](https://developer.apple.com/documentation/phase/phasemetaparameter?language=objc)
340    #[unsafe(super(NSObject))]
341    #[derive(Debug, PartialEq, Eq, Hash)]
342    pub struct PHASEMetaParameter;
343);
344
345extern_conformance!(
346    unsafe impl NSObjectProtocol for PHASEMetaParameter {}
347);
348
349impl PHASEMetaParameter {
350    extern_methods!(
351        #[unsafe(method(init))]
352        #[unsafe(method_family = init)]
353        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
354
355        #[unsafe(method(new))]
356        #[unsafe(method_family = new)]
357        pub unsafe fn new() -> Retained<Self>;
358
359        /// The identifier that uniquely represents this metaparameter.
360        #[unsafe(method(identifier))]
361        #[unsafe(method_family = none)]
362        pub unsafe fn identifier(&self) -> Retained<NSString>;
363
364        /// The value of this metaparameter
365        #[unsafe(method(value))]
366        #[unsafe(method_family = none)]
367        pub unsafe fn value(&self) -> Retained<AnyObject>;
368
369        /// Setter for [`value`][Self::value].
370        ///
371        /// # Safety
372        ///
373        /// `value` should be of the correct type.
374        #[unsafe(method(setValue:))]
375        #[unsafe(method_family = none)]
376        pub unsafe fn setValue(&self, value: &AnyObject);
377    );
378}
379
380extern_class!(
381    /// *************************************************************************************************
382    ///
383    ///
384    ///
385    /// An object that represents an active numeric metaparameter in the system
386    ///
387    /// See also [Apple's documentation](https://developer.apple.com/documentation/phase/phasenumbermetaparameter?language=objc)
388    #[unsafe(super(PHASEMetaParameter, NSObject))]
389    #[derive(Debug, PartialEq, Eq, Hash)]
390    pub struct PHASENumberMetaParameter;
391);
392
393extern_conformance!(
394    unsafe impl NSObjectProtocol for PHASENumberMetaParameter {}
395);
396
397impl PHASENumberMetaParameter {
398    extern_methods!(
399        #[unsafe(method(init))]
400        #[unsafe(method_family = init)]
401        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
402
403        #[unsafe(method(new))]
404        #[unsafe(method_family = new)]
405        pub unsafe fn new() -> Retained<Self>;
406
407        /// The minimum value this metaparameter can be set to
408        #[unsafe(method(minimum))]
409        #[unsafe(method_family = none)]
410        pub unsafe fn minimum(&self) -> c_double;
411
412        /// The maximum value this metaparameter can be set to
413        #[unsafe(method(maximum))]
414        #[unsafe(method_family = none)]
415        pub unsafe fn maximum(&self) -> c_double;
416
417        /// Fades to a new value over an interval of time
418        ///
419        /// Parameter `value`: The new destination value to fade to
420        ///
421        /// Parameter `duration`: The length of time it takes to arrive at the destination value
422        #[unsafe(method(fadeToValue:duration:))]
423        #[unsafe(method_family = none)]
424        pub unsafe fn fadeToValue_duration(&self, value: c_double, duration: NSTimeInterval);
425    );
426}
427
428extern_class!(
429    /// *************************************************************************************************
430    ///
431    ///
432    ///
433    /// An object that represents an active string metaparameter in the system
434    ///
435    /// See also [Apple's documentation](https://developer.apple.com/documentation/phase/phasestringmetaparameter?language=objc)
436    #[unsafe(super(PHASEMetaParameter, NSObject))]
437    #[derive(Debug, PartialEq, Eq, Hash)]
438    pub struct PHASEStringMetaParameter;
439);
440
441extern_conformance!(
442    unsafe impl NSObjectProtocol for PHASEStringMetaParameter {}
443);
444
445impl PHASEStringMetaParameter {
446    extern_methods!(
447        #[unsafe(method(init))]
448        #[unsafe(method_family = init)]
449        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
450
451        #[unsafe(method(new))]
452        #[unsafe(method_family = new)]
453        pub unsafe fn new() -> Retained<Self>;
454    );
455}