pub struct Display { /* private fields */ }Expand description
Handler for an X11 connection.
Implementations§
Source§impl Display
impl Display
Sourcepub fn from_xcb(conn: Connection, screen_num: i32) -> Result<Self>
pub fn from_xcb(conn: Connection, screen_num: i32) -> Result<Self>
Constructs the object from existing XCB connection.
Sourcepub fn into_xcb(self) -> (Connection, i32)
pub fn into_xcb(self) -> (Connection, i32)
Consumes the object and returns the underlying XCB connection. Returns
a (conn, screen_num) pair just as xcb::Connection::connect.
Sourcepub fn conn(&self) -> &Connection
pub fn conn(&self) -> &Connection
Returns reference to the XCB connection.
Sourcepub fn default_screen_num(&self) -> i32
pub fn default_screen_num(&self) -> i32
Returns the default screen number.
Sourcepub fn default_screen(&self) -> Result<&Screen, BadScreenNumber>
pub fn default_screen(&self) -> Result<&Screen, BadScreenNumber>
Returns the default screen.
Sourcepub fn monitors(&self) -> Result<Vec<Monitor>>
pub fn monitors(&self) -> Result<Vec<Monitor>>
Returns list of active monitors.
Uses RandR extensions to query the dimensions of the monitors. Requires RandR extension version 1.5 or newer to work.
Sourcepub fn root_pixmap(&self) -> Result<RootPixmap<'_>>
pub fn root_pixmap(&self) -> Result<RootPixmap<'_>>
Returns a representation of the root window’s background pixmap.
The object can be used to draw on the pixmap before finally setting it as the root window’s pixmap. It’s dimensions and depth matches the default screen’s.
Auto Trait Implementations§
impl Freeze for Display
impl RefUnwindSafe for Display
impl Send for Display
impl Sync for Display
impl Unpin for Display
impl UnsafeUnpin for Display
impl UnwindSafe for Display
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more