use dom_struct::dom_struct;
use crate::dom::bindings::codegen::Bindings::WebGLActiveInfoBinding::WebGLActiveInfoMethods;
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
use crate::dom::bindings::root::DomRoot;
use crate::dom::bindings::str::DOMString;
use crate::dom::window::Window;
#[dom_struct]
pub struct WebGLActiveInfo {
reflector_: Reflector,
size: i32,
ty: u32,
name: DOMString,
}
impl WebGLActiveInfo {
fn new_inherited(size: i32, ty: u32, name: DOMString) -> WebGLActiveInfo {
WebGLActiveInfo {
reflector_: Reflector::new(),
size,
ty,
name,
}
}
pub fn new(window: &Window, size: i32, ty: u32, name: DOMString) -> DomRoot<WebGLActiveInfo> {
reflect_dom_object(
Box::new(WebGLActiveInfo::new_inherited(size, ty, name)),
window,
)
}
}
impl WebGLActiveInfoMethods for WebGLActiveInfo {
fn Size(&self) -> i32 {
self.size
}
fn Type(&self) -> u32 {
self.ty
}
fn Name(&self) -> DOMString {
self.name.clone()
}
}