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