objc2_phase/generated/
PHASEMedium.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8/// Medium preset
9///
10/// See also [Apple's documentation](https://developer.apple.com/documentation/phase/phasemediumpreset?language=objc)
11// NS_ENUM
12#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct PHASEMediumPreset(pub NSInteger);
15impl PHASEMediumPreset {
16    #[doc(alias = "PHASEMediumPresetAir")]
17    pub const Air: Self = Self(0x6d644172);
18}
19
20unsafe impl Encode for PHASEMediumPreset {
21    const ENCODING: Encoding = NSInteger::ENCODING;
22}
23
24unsafe impl RefEncode for PHASEMediumPreset {
25    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
26}
27
28extern_class!(
29    /// *************************************************************************************************
30    ///
31    ///
32    ///
33    /// A PHASEMedium describes the acoustic properties of a medium.
34    ///
35    /// See also [Apple's documentation](https://developer.apple.com/documentation/phase/phasemedium?language=objc)
36    #[unsafe(super(NSObject))]
37    #[derive(Debug, PartialEq, Eq, Hash)]
38    pub struct PHASEMedium;
39);
40
41extern_conformance!(
42    unsafe impl NSObjectProtocol for PHASEMedium {}
43);
44
45impl PHASEMedium {
46    extern_methods!(
47        #[unsafe(method(init))]
48        #[unsafe(method_family = init)]
49        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
50
51        #[unsafe(method(new))]
52        #[unsafe(method_family = new)]
53        pub unsafe fn new() -> Retained<Self>;
54
55        #[cfg(feature = "PHASEEngine")]
56        /// Initialize a new medium from a preset.
57        #[unsafe(method(initWithEngine:preset:))]
58        #[unsafe(method_family = init)]
59        pub unsafe fn initWithEngine_preset(
60            this: Allocated<Self>,
61            engine: &PHASEEngine,
62            preset: PHASEMediumPreset,
63        ) -> Retained<Self>;
64    );
65}