Struct glutin::platform::unix::x11::XConnection [−][src]
pub struct XConnection {
pub xlib: Xlib,
pub xrandr: Xrandr_2_2_0,
pub xrandr_1_5: Option<Xrandr>,
pub xcursor: Xcursor,
pub xinput2: XInput2,
pub xlib_xcb: Xlib_xcb,
pub xrender: Xrender,
pub display: *mut _XDisplay,
pub x11_fd: i32,
pub latest_error: Mutex<RawMutex, Option<XError>>,
pub cursor_cache: Mutex<RawMutex, HashMap<Option<CursorIcon>, u64, RandomState>>,
}
Expand description
A connection to an X server.
Fields
xlib: Xlib
xrandr: Xrandr_2_2_0
Exposes XRandR functions from version < 1.5
xrandr_1_5: Option<Xrandr>
Exposes XRandR functions from version = 1.5
xcursor: Xcursor
xinput2: XInput2
xlib_xcb: Xlib_xcb
xrender: Xrender
display: *mut _XDisplay
x11_fd: i32
latest_error: Mutex<RawMutex, Option<XError>>
cursor_cache: Mutex<RawMutex, HashMap<Option<CursorIcon>, u64, RandomState>>
Implementations
pub unsafe fn get_output_info(
&self,
resources: *mut XRRScreenResources,
crtc: *mut XRRCrtcInfo
) -> Option<(String, f64, Vec<VideoMode, Global>)>
pub fn get_property<T>(
&self,
window: u64,
property: u64,
property_type: u64
) -> Result<Vec<T, Global>, GetPropertyError> where
T: Formattable,
pub fn change_property<T>(
&'a self,
window: u64,
property: u64,
property_type: u64,
mode: PropMode,
new_value: &[T]
) -> Flusher<'a> where
T: Formattable,
pub fn new(
error_handler: Option<unsafe extern "C" fn(*mut _XDisplay, *mut XErrorEvent) -> i32>
) -> Result<XConnection, XNotSupported>
Checks whether an error has been triggered by the previous function calls.
Ignores any previous error.