-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff4428f
commit c447249
Showing
8 changed files
with
209 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
crates/web-sys/src/features/gen_AudioContextLatencyCategory.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#![allow(unused_imports)] | ||
use wasm_bindgen::prelude::*; | ||
#[wasm_bindgen] | ||
#[doc = "The `AudioContextLatencyCategory` enum."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `AudioContextLatencyCategory`*"] | ||
#[derive(Debug, Clone, Copy, PartialEq, Eq)] | ||
pub enum AudioContextLatencyCategory { | ||
Balanced = "balanced", | ||
Interactive = "interactive", | ||
Playback = "playback", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#![allow(unused_imports)] | ||
use super::*; | ||
use wasm_bindgen::prelude::*; | ||
#[cfg(web_sys_unstable_apis)] | ||
#[wasm_bindgen] | ||
extern "C" { | ||
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = AudioSinkInfo , typescript_type = "AudioSinkInfo")] | ||
#[derive(Debug, Clone, PartialEq, Eq)] | ||
#[doc = "The `AudioSinkInfo` class."] | ||
#[doc = ""] | ||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioSinkInfo)"] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `AudioSinkInfo`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
pub type AudioSinkInfo; | ||
#[cfg(web_sys_unstable_apis)] | ||
#[cfg(feature = "AudioSinkType")] | ||
# [wasm_bindgen (structural , method , getter , js_class = "AudioSinkInfo" , js_name = type)] | ||
#[doc = "Getter for the `type` field of this object."] | ||
#[doc = ""] | ||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioSinkInfo/type)"] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `AudioSinkInfo`, `AudioSinkType`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
pub fn type_(this: &AudioSinkInfo) -> AudioSinkType; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#![allow(unused_imports)] | ||
use super::*; | ||
use wasm_bindgen::prelude::*; | ||
#[cfg(web_sys_unstable_apis)] | ||
#[wasm_bindgen] | ||
extern "C" { | ||
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = AudioSinkOptions)] | ||
#[derive(Debug, Clone, PartialEq, Eq)] | ||
#[doc = "The `AudioSinkOptions` dictionary."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `AudioSinkOptions`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
pub type AudioSinkOptions; | ||
} | ||
#[cfg(web_sys_unstable_apis)] | ||
impl AudioSinkOptions { | ||
#[cfg(feature = "AudioSinkType")] | ||
#[doc = "Construct a new `AudioSinkOptions`."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `AudioSinkOptions`, `AudioSinkType`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
pub fn new(type_: AudioSinkType) -> Self { | ||
#[allow(unused_mut)] | ||
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); | ||
ret.type_(type_); | ||
ret | ||
} | ||
#[cfg(web_sys_unstable_apis)] | ||
#[cfg(feature = "AudioSinkType")] | ||
#[doc = "Change the `type` field of this object."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `AudioSinkOptions`, `AudioSinkType`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
pub fn type_(&mut self, val: AudioSinkType) -> &mut Self { | ||
use wasm_bindgen::JsValue; | ||
let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("type"), &JsValue::from(val)); | ||
debug_assert!( | ||
r.is_ok(), | ||
"setting properties should never fail on our dictionary objects" | ||
); | ||
let _ = r; | ||
self | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#![allow(unused_imports)] | ||
use wasm_bindgen::prelude::*; | ||
#[cfg(web_sys_unstable_apis)] | ||
#[wasm_bindgen] | ||
#[doc = "The `AudioSinkType` enum."] | ||
#[doc = ""] | ||
#[doc = "*This API requires the following crate features to be activated: `AudioSinkType`*"] | ||
#[doc = ""] | ||
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] | ||
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] | ||
#[derive(Debug, Clone, Copy, PartialEq, Eq)] | ||
pub enum AudioSinkType { | ||
None = "none", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters