leanshot/imlib2/visual.rs
2018-09-11 13:21:59 -05:00

15 lines
365 B
Rust

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 }
}
}