use super::RenderOutput;
use View;
use ffi;
use std::fmt;
use std::mem;
use std::ops::Deref;
#[repr(C)]
pub struct RenderView;
impl Deref for RenderView {
type Target = View;
fn deref(&self) -> &View {
unsafe { mem::transmute(self) }
}
}
impl fmt::Debug for RenderView {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}", **self)
}
}
impl RenderView {
pub fn output(&mut self) -> &mut RenderOutput {
unsafe { &mut *(ffi::wlc_view_get_output(mem::transmute(self)) as *mut RenderOutput) }
}
}