web_sys/features/
gen_ConstantSourceNode.rs

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