maxcountryman_web_sys/features/
gen_ConstantSourceNode.rs

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