gdkx11/x11_visual.rs
1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use crate::{X11Visual, ffi};
4
5use glib::translate::ToGlibPtr;
6use x11::xlib;
7
8impl X11Visual {
9 /// Returns the X visual belonging to a [`gdk::Visual`][crate::gdk::Visual].
10 ///
11 /// # Returns
12 ///
13 /// an Xlib Visual*.
14 #[doc(alias = "gdk_x11_visual_get_xvisual")]
15 #[allow(clippy::missing_safety_doc)]
16 pub unsafe fn xvisual(&self) -> *mut xlib::Visual {
17 unsafe { ffi::gdk_x11_visual_get_xvisual(self.to_glib_none().0) }
18 }
19}