[][src]Struct glutin::platform::unix::x11::XConnection

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

A connection to an X server.

Fields

xlib: Xlibxrandr: Xrandr_2_2_0

Exposes XRandR functions from version < 1.5

xrandr_1_5: Option<Xrandr>

Exposes XRandR functions from version = 1.5

xcursor: Xcursorxinput2: XInput2xlib_xcb: Xlib_xcbxrender: Xrenderdisplay: *mut _XDisplayx11_fd: i32latest_error: Mutex<RawMutex, Option<XError>>cursor_cache: Mutex<RawMutex, HashMap<Option<CursorIcon>, u64, RandomState>>

Implementations

impl XConnection[src]

pub fn get_monitor_for_window(
    &self,
    window_rect: Option<AaRect>
) -> MonitorHandle
[src]

pub fn available_monitors(&self) -> Vec<MonitorHandle>[src]

pub fn primary_monitor(&self) -> MonitorHandle[src]

pub fn select_xrandr_input(&self, root: u64) -> Result<i32, XError>[src]

impl XConnection[src]

pub fn get_atom<T>(&self, name: T) -> u64 where
    T: AsRef<CStr> + Debug
[src]

pub unsafe fn get_atom_unchecked(&self, name: &[u8]) -> u64[src]

pub unsafe fn get_atoms(&self, names: &[*mut i8]) -> Result<Vec<u64>, XError>[src]

impl XConnection[src]

pub fn send_event<T>(
    &self,
    target_window: u64,
    event_mask: Option<i64>,
    event: T
) -> Flusher<'_> where
    T: Into<XEvent>, 
[src]

pub fn send_client_msg(
    &self,
    window: u64,
    target_window: u64,
    message_type: u64,
    event_mask: Option<i64>,
    data: [i64; 5]
) -> Flusher<'_>
[src]

impl XConnection[src]

pub fn set_cursor_icon(&self, window: u64, cursor: Option<CursorIcon>)[src]

impl XConnection[src]

pub fn translate_coords(
    &self,
    window: u64,
    root: u64
) -> Result<TranslatedCoords, XError>
[src]

pub fn get_geometry(&self, window: u64) -> Result<Geometry, XError>[src]

pub fn is_top_level(&self, window: u64, root: u64) -> Option<bool>[src]

pub fn get_frame_extents_heuristic(
    &self,
    window: u64,
    root: u64
) -> FrameExtentsHeuristic
[src]

impl XConnection[src]

pub fn get_wm_hints(
    &self,
    window: u64
) -> Result<XSmartPointer<'_, XWMHints>, XError>
[src]

pub fn set_wm_hints(
    &self,
    window: u64,
    wm_hints: XSmartPointer<'_, XWMHints>
) -> Flusher<'_>
[src]

pub fn get_normal_hints(&self, window: u64) -> Result<NormalHints<'_>, XError>[src]

pub fn set_normal_hints(
    &self,
    window: u64,
    normal_hints: NormalHints<'_>
) -> Flusher<'_>
[src]

pub fn get_motif_hints(&self, window: u64) -> MotifHints[src]

pub fn set_motif_hints(&self, window: u64, hints: &MotifHints) -> Flusher<'_>[src]

impl XConnection[src]

pub fn select_xinput_events(
    &self,
    window: u64,
    device_id: i32,
    mask: i32
) -> Flusher<'_>
[src]

pub fn select_xkb_events(
    &self,
    device_id: u32,
    mask: u64
) -> Option<Flusher<'_>>
[src]

pub fn query_pointer(
    &self,
    window: u64,
    device_id: i32
) -> Result<PointerState<'_>, XError>
[src]

pub fn lookup_utf8(&self, ic: *mut _XIC, key_event: &mut XKeyEvent) -> String[src]

impl XConnection[src]

pub fn keycode_to_keysym(&self, keycode: u8) -> u64[src]

pub fn lookup_keysym(&self, xkev: &mut XKeyEvent) -> u64[src]

pub fn query_keymap(&self) -> Keymap[src]

impl XConnection[src]

pub fn alloc_class_hint(&self) -> XSmartPointer<'_, XClassHint>[src]

pub fn alloc_size_hints(&self) -> XSmartPointer<'_, XSizeHints>[src]

pub fn alloc_wm_hints(&self) -> XSmartPointer<'_, XWMHints>[src]

impl XConnection[src]

pub unsafe fn get_xft_dpi(&self) -> Option<f64>[src]

pub unsafe fn get_output_info(
    &self,
    resources: *mut XRRScreenResources,
    crtc: *mut XRRCrtcInfo
) -> Option<(String, f64, Vec<VideoMode>)>
[src]

pub fn set_crtc_config(&self, crtc_id: u64, mode_id: u64) -> Result<(), ()>[src]

pub fn get_crtc_mode(&self, crtc_id: u64) -> u64[src]

impl XConnection[src]

pub fn get_property<T>(
    &self,
    window: u64,
    property: u64,
    property_type: u64
) -> Result<Vec<T>, GetPropertyError> where
    T: Formattable
[src]

pub fn change_property<T>(
    &'a self,
    window: u64,
    property: u64,
    property_type: u64,
    mode: PropMode,
    new_value: &[T]
) -> Flusher<'a> where
    T: Formattable
[src]

impl XConnection[src]

pub fn update_cached_wm_info(&self, root: u64)[src]

impl XConnection[src]

pub fn flush_requests(&self) -> Result<(), XError>[src]

pub fn sync_with_server(&self) -> Result<(), XError>[src]

impl XConnection[src]

pub fn new(
    error_handler: Option<unsafe extern "C" fn(*mut _XDisplay, *mut XErrorEvent) -> i32>
) -> Result<XConnection, XNotSupported>
[src]

pub fn check_errors(&self) -> Result<(), XError>[src]

Checks whether an error has been triggered by the previous function calls.

pub fn ignore_error(&self)[src]

Ignores any previous error.

Trait Implementations

impl Debug for XConnection[src]

impl Drop for XConnection[src]

impl Send for XConnection[src]

impl Sync for XConnection[src]

Auto Trait Implementations

impl !RefUnwindSafe for XConnection

impl Unpin for XConnection

impl UnwindSafe for XConnection

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.