use crate::{
class::WebContents,
interface::{AutoResizeOptions, BrowserViewOptions, Rectangle},
};
use js_sys::Object;
use wasm_bindgen::prelude::*;
#[wasm_bindgen(module = "electron")]
extern {
#[wasm_bindgen(extends = Object)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub type BrowserView;
#[wasm_bindgen(constructor)]
pub fn new(options: Option<BrowserViewOptions>) -> BrowserView;
#[wasm_bindgen(static_method_of = BrowserView)]
pub fn from_id(id: u32) -> BrowserView;
#[wasm_bindgen(static_method_of = BrowserView)]
pub fn from_web_contents(web_contents: &WebContents) -> Option<BrowserView>;
#[wasm_bindgen(static_method_of = BrowserView)]
pub fn get_all_views() -> Box<[JsValue]>;
#[wasm_bindgen(method)]
pub fn destroy(this: &BrowserView);
#[wasm_bindgen(method, js_name = "getBounds")]
pub fn get_bounds(this: &BrowserView) -> Rectangle;
#[wasm_bindgen(method, js_name = "isDestroyed")]
pub fn is_destroyed(this: &BrowserView) -> bool;
#[wasm_bindgen(method, js_name = "set_auto_resize")]
pub fn set_auto_resize(this: &BrowserView, options: AutoResizeOptions);
#[wasm_bindgen(method, js_name = "set_background_color")]
pub fn set_background_color(this: &BrowserView, color: &str);
#[wasm_bindgen(method, js_name = "set_bounds")]
pub fn set_bounds(this: &BrowserView, bounds: Rectangle);
#[wasm_bindgen(method, getter)]
pub fn id(this: &BrowserView) -> u32;
#[wasm_bindgen(method, setter)]
pub fn set_id(this: &BrowserView, value: u32);
#[wasm_bindgen(method, getter)]
pub fn web_contents(this: &BrowserView) -> WebContents;
#[wasm_bindgen(method, getter)]
pub fn set_web_contents(this: &BrowserView, value: WebContents);
}