Skip to main content

web_sys/features/
gen_ConvolverNode.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "AudioNode",
9        extends = "EventTarget",
10        extends = "::js_sys::Object",
11        js_name = "ConvolverNode",
12        typescript_type = "ConvolverNode"
13    )]
14    #[derive(Debug, Clone, PartialEq, Eq)]
15    #[doc = "The `ConvolverNode` class."]
16    #[doc = ""]
17    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ConvolverNode)"]
18    #[doc = ""]
19    #[doc = "*This API requires the following crate features to be activated: `ConvolverNode`*"]
20    pub type ConvolverNode;
21    #[cfg(feature = "AudioBuffer")]
22    #[wasm_bindgen(method, getter, js_class = "ConvolverNode", js_name = "buffer")]
23    #[doc = "Getter for the `buffer` field of this object."]
24    #[doc = ""]
25    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ConvolverNode/buffer)"]
26    #[doc = ""]
27    #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `ConvolverNode`*"]
28    pub fn buffer(this: &ConvolverNode) -> Option<AudioBuffer>;
29    #[cfg(feature = "AudioBuffer")]
30    #[wasm_bindgen(method, setter, js_class = "ConvolverNode", js_name = "buffer")]
31    #[doc = "Setter for the `buffer` field of this object."]
32    #[doc = ""]
33    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ConvolverNode/buffer)"]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `ConvolverNode`*"]
36    pub fn set_buffer(this: &ConvolverNode, value: Option<&AudioBuffer>);
37    #[wasm_bindgen(method, getter, js_class = "ConvolverNode", js_name = "normalize")]
38    #[doc = "Getter for the `normalize` field of this object."]
39    #[doc = ""]
40    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ConvolverNode/normalize)"]
41    #[doc = ""]
42    #[doc = "*This API requires the following crate features to be activated: `ConvolverNode`*"]
43    pub fn normalize(this: &ConvolverNode) -> bool;
44    #[wasm_bindgen(method, setter, js_class = "ConvolverNode", js_name = "normalize")]
45    #[doc = "Setter for the `normalize` field of this object."]
46    #[doc = ""]
47    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ConvolverNode/normalize)"]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `ConvolverNode`*"]
50    pub fn set_normalize(this: &ConvolverNode, value: bool);
51    #[cfg(feature = "BaseAudioContext")]
52    #[wasm_bindgen(catch, constructor, js_class = "ConvolverNode")]
53    #[doc = "The `new ConvolverNode(..)` constructor, creating a new instance of `ConvolverNode`."]
54    #[doc = ""]
55    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ConvolverNode/ConvolverNode)"]
56    #[doc = ""]
57    #[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `ConvolverNode`*"]
58    pub fn new(context: &BaseAudioContext) -> Result<ConvolverNode, JsValue>;
59    #[cfg(all(feature = "BaseAudioContext", feature = "ConvolverOptions",))]
60    #[wasm_bindgen(catch, constructor, js_class = "ConvolverNode")]
61    #[doc = "The `new ConvolverNode(..)` constructor, creating a new instance of `ConvolverNode`."]
62    #[doc = ""]
63    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ConvolverNode/ConvolverNode)"]
64    #[doc = ""]
65    #[doc = "*This API requires the following crate features to be activated: `BaseAudioContext`, `ConvolverNode`, `ConvolverOptions`*"]
66    pub fn new_with_options(
67        context: &BaseAudioContext,
68        options: &ConvolverOptions,
69    ) -> Result<ConvolverNode, JsValue>;
70}