leanshot/imlib2/visual.rs

16 lines
365 B
Rust
Raw Normal View History

2018-09-11 18:21:59 +00:00
use imlib2_sys as im;
use x11;
/// Visual
pub struct Visual {
pub(crate) inner: *mut im::Visual,
}
impl Visual {
/// get the default visual for a display
pub fn default(display: *mut x11::xlib::_XDisplay, screen: i32) -> Self {
let inner = unsafe { im::XDefaultVisual(display as *mut im::_XDisplay, screen) };
Visual { inner }
}
}