pub struct ScreenResources {
pub timestamp: XTime,
pub config_timestamp: XTime,
pub ncrtc: i32,
pub outputs: Vec<XId>,
pub nmode: i32,
pub modes: Vec<Mode>,
/* private fields */
}
Fields§
§timestamp: XTime
§config_timestamp: XTime
§ncrtc: i32
§outputs: Vec<XId>
§nmode: i32
§modes: Vec<Mode>
Implementations§
Source§impl ScreenResources
impl ScreenResources
Sourcepub fn new(handle: &mut XHandle) -> Result<ScreenResources, XrandrError>
pub fn new(handle: &mut XHandle) -> Result<ScreenResources, XrandrError>
Create a handle to the XRRScreenResources
object from libxrandr.
This handle is used to query many parts of the current x11 config.
§Errors
XrandrError::GetResources
- Getting the handle failed.
§Examples
let xhandle = XHandle.open()?;
let res = ScreenResources::new(&mut xhandle)?;
let crtc_87 = res.crtc(&mut xhandle, 87);
Sourcepub fn enabled_crtcs(
&self,
handle: &mut XHandle,
) -> Result<Vec<Crtc>, XrandrError>
pub fn enabled_crtcs( &self, handle: &mut XHandle, ) -> Result<Vec<Crtc>, XrandrError>
Gets information of only the enabled crtcs
See also: self.crtcs()
§Errors
XrandrError::GetCrtcInfo(xid)
– Getting info failed for crtc with XIDxid
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScreenResources
impl RefUnwindSafe for ScreenResources
impl Send for ScreenResources
impl Sync for ScreenResources
impl Unpin for ScreenResources
impl UnwindSafe for ScreenResources
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more