mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-05-11 13:29:43 +00:00
* Pre-generating web-sys * Fixing build errors * Minor refactor for the unit tests * Changing to generate #[wasm_bindgen} annotations * Fixing code generation * Adding in main bin to wasm-bindgen-webidl * Fixing more problems * Adding in support for unstable APIs * Fixing bug with code generation * More code generation fixes * Improving the webidl program * Removing unnecessary cfg from the generated code * Splitting doc comments onto separate lines * Improving the generation for unstable features * Adding in support for string values in enums * Now runs rustfmt on the mod.rs file * Fixing codegen for constructors * Fixing webidl-tests * Fixing build errors * Another fix for build errors * Renaming typescript_name to typescript_type * Adding in docs for typescript_type * Adding in CI script to verify that web-sys is up to date * Fixing CI script * Fixing CI script * Don't suppress git diff output * Remove duplicate definitions of `Location` Looks to be a preexisting bug in wasm-bindgen? * Regenerate webidl * Try to get the git diff command right * Handle named constructors in WebIDL * Remove stray rustfmt.toml * Add back NamedConstructorBar definition in tests * Run stable rustfmt over everything * Don't run Cargo in a build script Instead refactor things so webidl-tests can use the Rust-code-generation as a library in a build script. Also fixes `cargo fmt` in the repository. * Fixup generated code * Running web-sys checks on stable * Improving the code generation a little * Running rustfmt Co-authored-by: Alex Crichton <alex@alexcrichton.com>
66 lines
3.9 KiB
Rust
66 lines
3.9 KiB
Rust
#![allow(unused_imports)]
|
|
use super::*;
|
|
use wasm_bindgen::prelude::*;
|
|
#[wasm_bindgen]
|
|
extern "C" {
|
|
# [ wasm_bindgen ( extends = EventTarget , extends = :: js_sys :: Object , js_name = ImageCapture , typescript_type = "ImageCapture" ) ]
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
|
#[doc = "The `ImageCapture` class."]
|
|
#[doc = ""]
|
|
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture)"]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `ImageCapture`*"]
|
|
pub type ImageCapture;
|
|
#[cfg(feature = "VideoStreamTrack")]
|
|
# [ wasm_bindgen ( structural , method , getter , js_class = "ImageCapture" , js_name = videoStreamTrack ) ]
|
|
#[doc = "Getter for the `videoStreamTrack` field of this object."]
|
|
#[doc = ""]
|
|
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/videoStreamTrack)"]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `ImageCapture`, `VideoStreamTrack`*"]
|
|
pub fn video_stream_track(this: &ImageCapture) -> VideoStreamTrack;
|
|
# [ wasm_bindgen ( structural , method , getter , js_class = "ImageCapture" , js_name = onphoto ) ]
|
|
#[doc = "Getter for the `onphoto` field of this object."]
|
|
#[doc = ""]
|
|
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/onphoto)"]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `ImageCapture`*"]
|
|
pub fn onphoto(this: &ImageCapture) -> Option<::js_sys::Function>;
|
|
# [ wasm_bindgen ( structural , method , setter , js_class = "ImageCapture" , js_name = onphoto ) ]
|
|
#[doc = "Setter for the `onphoto` field of this object."]
|
|
#[doc = ""]
|
|
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/onphoto)"]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `ImageCapture`*"]
|
|
pub fn set_onphoto(this: &ImageCapture, value: Option<&::js_sys::Function>);
|
|
# [ wasm_bindgen ( structural , method , getter , js_class = "ImageCapture" , js_name = onerror ) ]
|
|
#[doc = "Getter for the `onerror` field of this object."]
|
|
#[doc = ""]
|
|
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/onerror)"]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `ImageCapture`*"]
|
|
pub fn onerror(this: &ImageCapture) -> Option<::js_sys::Function>;
|
|
# [ wasm_bindgen ( structural , method , setter , js_class = "ImageCapture" , js_name = onerror ) ]
|
|
#[doc = "Setter for the `onerror` field of this object."]
|
|
#[doc = ""]
|
|
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/onerror)"]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `ImageCapture`*"]
|
|
pub fn set_onerror(this: &ImageCapture, value: Option<&::js_sys::Function>);
|
|
#[cfg(feature = "VideoStreamTrack")]
|
|
#[wasm_bindgen(catch, constructor, js_class = "ImageCapture")]
|
|
#[doc = "The `new ImageCapture(..)` constructor, creating a new instance of `ImageCapture`."]
|
|
#[doc = ""]
|
|
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/ImageCapture)"]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `ImageCapture`, `VideoStreamTrack`*"]
|
|
pub fn new(track: &VideoStreamTrack) -> Result<ImageCapture, JsValue>;
|
|
# [ wasm_bindgen ( catch , method , structural , js_class = "ImageCapture" , js_name = takePhoto ) ]
|
|
#[doc = "The `takePhoto()` method."]
|
|
#[doc = ""]
|
|
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ImageCapture/takePhoto)"]
|
|
#[doc = ""]
|
|
#[doc = "*This API requires the following crate features to be activated: `ImageCapture`*"]
|
|
pub fn take_photo(this: &ImageCapture) -> Result<(), JsValue>;
|
|
}
|