web_sys/features/
gen_ChannelMergerOptions.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ChannelMergerOptions)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `ChannelMergerOptions` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"]
12    pub type ChannelMergerOptions;
13    #[doc = "Get the `channelCount` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"]
16    #[wasm_bindgen(method, getter = "channelCount")]
17    pub fn get_channel_count(this: &ChannelMergerOptions) -> Option<u32>;
18    #[doc = "Change the `channelCount` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"]
21    #[wasm_bindgen(method, setter = "channelCount")]
22    pub fn set_channel_count(this: &ChannelMergerOptions, val: u32);
23    #[cfg(feature = "ChannelCountMode")]
24    #[doc = "Get the `channelCountMode` field of this object."]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ChannelMergerOptions`*"]
27    #[wasm_bindgen(method, getter = "channelCountMode")]
28    pub fn get_channel_count_mode(this: &ChannelMergerOptions) -> Option<ChannelCountMode>;
29    #[cfg(feature = "ChannelCountMode")]
30    #[doc = "Change the `channelCountMode` field of this object."]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ChannelMergerOptions`*"]
33    #[wasm_bindgen(method, setter = "channelCountMode")]
34    pub fn set_channel_count_mode(this: &ChannelMergerOptions, val: ChannelCountMode);
35    #[cfg(feature = "ChannelInterpretation")]
36    #[doc = "Get the `channelInterpretation` field of this object."]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ChannelMergerOptions`*"]
39    #[wasm_bindgen(method, getter = "channelInterpretation")]
40    pub fn get_channel_interpretation(this: &ChannelMergerOptions)
41        -> Option<ChannelInterpretation>;
42    #[cfg(feature = "ChannelInterpretation")]
43    #[doc = "Change the `channelInterpretation` field of this object."]
44    #[doc = ""]
45    #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ChannelMergerOptions`*"]
46    #[wasm_bindgen(method, setter = "channelInterpretation")]
47    pub fn set_channel_interpretation(this: &ChannelMergerOptions, val: ChannelInterpretation);
48    #[doc = "Get the `numberOfInputs` field of this object."]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"]
51    #[wasm_bindgen(method, getter = "numberOfInputs")]
52    pub fn get_number_of_inputs(this: &ChannelMergerOptions) -> Option<u32>;
53    #[doc = "Change the `numberOfInputs` field of this object."]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"]
56    #[wasm_bindgen(method, setter = "numberOfInputs")]
57    pub fn set_number_of_inputs(this: &ChannelMergerOptions, val: u32);
58}
59impl ChannelMergerOptions {
60    #[doc = "Construct a new `ChannelMergerOptions`."]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"]
63    pub fn new() -> Self {
64        #[allow(unused_mut)]
65        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
66        ret
67    }
68    #[deprecated = "Use `set_channel_count()` instead."]
69    pub fn channel_count(&mut self, val: u32) -> &mut Self {
70        self.set_channel_count(val);
71        self
72    }
73    #[cfg(feature = "ChannelCountMode")]
74    #[deprecated = "Use `set_channel_count_mode()` instead."]
75    pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self {
76        self.set_channel_count_mode(val);
77        self
78    }
79    #[cfg(feature = "ChannelInterpretation")]
80    #[deprecated = "Use `set_channel_interpretation()` instead."]
81    pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self {
82        self.set_channel_interpretation(val);
83        self
84    }
85    #[deprecated = "Use `set_number_of_inputs()` instead."]
86    pub fn number_of_inputs(&mut self, val: u32) -> &mut Self {
87        self.set_number_of_inputs(val);
88        self
89    }
90}
91impl Default for ChannelMergerOptions {
92    fn default() -> Self {
93        Self::new()
94    }
95}