web_sys/features/
gen_ChannelSplitterOptions.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 = ChannelSplitterOptions)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `ChannelSplitterOptions` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"]
12    pub type ChannelSplitterOptions;
13    #[doc = "Get the `channelCount` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"]
16    #[wasm_bindgen(method, getter = "channelCount")]
17    pub fn get_channel_count(this: &ChannelSplitterOptions) -> 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: `ChannelSplitterOptions`*"]
21    #[wasm_bindgen(method, setter = "channelCount")]
22    pub fn set_channel_count(this: &ChannelSplitterOptions, 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`, `ChannelSplitterOptions`*"]
27    #[wasm_bindgen(method, getter = "channelCountMode")]
28    pub fn get_channel_count_mode(this: &ChannelSplitterOptions) -> 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`, `ChannelSplitterOptions`*"]
33    #[wasm_bindgen(method, setter = "channelCountMode")]
34    pub fn set_channel_count_mode(this: &ChannelSplitterOptions, 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`, `ChannelSplitterOptions`*"]
39    #[wasm_bindgen(method, getter = "channelInterpretation")]
40    pub fn get_channel_interpretation(
41        this: &ChannelSplitterOptions,
42    ) -> Option<ChannelInterpretation>;
43    #[cfg(feature = "ChannelInterpretation")]
44    #[doc = "Change the `channelInterpretation` field of this object."]
45    #[doc = ""]
46    #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ChannelSplitterOptions`*"]
47    #[wasm_bindgen(method, setter = "channelInterpretation")]
48    pub fn set_channel_interpretation(this: &ChannelSplitterOptions, val: ChannelInterpretation);
49    #[doc = "Get the `numberOfOutputs` field of this object."]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"]
52    #[wasm_bindgen(method, getter = "numberOfOutputs")]
53    pub fn get_number_of_outputs(this: &ChannelSplitterOptions) -> Option<u32>;
54    #[doc = "Change the `numberOfOutputs` field of this object."]
55    #[doc = ""]
56    #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"]
57    #[wasm_bindgen(method, setter = "numberOfOutputs")]
58    pub fn set_number_of_outputs(this: &ChannelSplitterOptions, val: u32);
59}
60impl ChannelSplitterOptions {
61    #[doc = "Construct a new `ChannelSplitterOptions`."]
62    #[doc = ""]
63    #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"]
64    pub fn new() -> Self {
65        #[allow(unused_mut)]
66        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
67        ret
68    }
69    #[deprecated = "Use `set_channel_count()` instead."]
70    pub fn channel_count(&mut self, val: u32) -> &mut Self {
71        self.set_channel_count(val);
72        self
73    }
74    #[cfg(feature = "ChannelCountMode")]
75    #[deprecated = "Use `set_channel_count_mode()` instead."]
76    pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self {
77        self.set_channel_count_mode(val);
78        self
79    }
80    #[cfg(feature = "ChannelInterpretation")]
81    #[deprecated = "Use `set_channel_interpretation()` instead."]
82    pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self {
83        self.set_channel_interpretation(val);
84        self
85    }
86    #[deprecated = "Use `set_number_of_outputs()` instead."]
87    pub fn number_of_outputs(&mut self, val: u32) -> &mut Self {
88        self.set_number_of_outputs(val);
89        self
90    }
91}
92impl Default for ChannelSplitterOptions {
93    fn default() -> Self {
94        Self::new()
95    }
96}