#[non_exhaustive]
pub struct OutputInfo { pub id: u32, pub model: String, pub make: String, pub name: String, pub description: String, pub location: (i32, i32), pub physical_size: (i32, i32), pub subpixel: Subpixel, pub transform: Transform, pub scale_factor: i32, pub modes: Vec<Mode>, pub obsolete: bool, }
Expand description

Compiled information about an output

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§id: u32

The ID of this output as a global

§model: String

The model name of this output as advertised by the server

§make: String

The make name of this output as advertised by the server

§name: String

The name of this output as advertised by the server

Each name is unique among all wl_output globals, but if a wl_output global is destroyed the same name may be reused later. The names will also remain consistent across sessions with the same hardware and software configuration.

Examples of names include ‘HDMI-A-1’, ‘WL-1’, ‘X11-1’, etc. However, do not assume that the name is a reflection of an underlying DRM connector, X11 connection, etc.

Note that this is not filled in by version 3 of the wl_output protocol, but it has been proposed for inclusion in version 4. Until then, it is only filled in if your environment has an XdgOutputHandler global handler for ZxdgOutputManagerV1.

§description: String

The description of this output as advertised by the server

The description is a UTF-8 string with no convention defined for its contents. The description is not guaranteed to be unique among all wl_output globals. Examples might include ‘Foocorp 11“ Display’ or ‘Virtual X11 output via :1’.

Note that this is not filled in by version 3 of the wl_output protocol, but it has been proposed for inclusion in version 4. Until then, it is only filled in if your environment has an XdgOutputHandler global handler for ZxdgOutputManagerV1.

§location: (i32, i32)

Location of the top-left corner of this output in compositor space

Note that the compositor may decide to always report (0,0) if it decides clients are not allowed to know this information.

§physical_size: (i32, i32)

Physical dimensions of this output, in unspecified units

§subpixel: Subpixel

The subpixel layout for this output

§transform: Transform

The current transformation applied to this output

You can pre-render your buffers taking this information into account and advertising it via wl_buffer.set_tranform for better performances.

§scale_factor: i32

The scaling factor of this output

Any buffer whose scaling factor does not match the one of the output it is displayed on will be rescaled accordingly.

For example, a buffer of scaling factor 1 will be doubled in size if the output scaling factor is 2.

§modes: Vec<Mode>

Possible modes for an output

§obsolete: bool

Has this output been unadvertized by the registry

If this is the case, it has become inert, you might want to call its release() method if you don’t plan to use it any longer.

Trait Implementations§

source§

impl Clone for OutputInfo

source§

fn clone(&self) -> OutputInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for OutputInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.