#[non_exhaustive]
pub enum Event {
Show 13 variants Name { name: String, }, Description { description: String, }, PhysicalSize { width: i32, height: i32, }, Mode { mode: Main<ZwlrOutputModeV1>, }, Enabled { enabled: i32, }, CurrentMode { mode: ZwlrOutputModeV1, }, Position { x: i32, y: i32, }, Transform { transform: Transform, }, Scale { scale: f64, }, Finished, Make { make: String, }, Model { model: String, }, SerialNumber { serial_number: String, },
}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Name

Fields

§name: String

head name

This event describes the head name.

The naming convention is compositor defined, but limited to alphanumeric characters and dashes (-). Each name is unique among all wlr_output_head objects, but if a wlr_output_head object 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.

If the compositor implements the xdg-output protocol and this head is enabled, the xdg_output.name event must report the same name.

The name event is sent after a wlr_output_head object is created. This event is only sent once per object, and the name does not change over the lifetime of the wlr_output_head object.

§

Description

Fields

§description: String

head description

This event describes a human-readable description of the head.

The description is a UTF-8 string with no convention defined for its contents. Examples might include ‘Foocorp 11“ Display’ or ‘Virtual X11 output via :1’. However, do not assume that the name is a reflection of the make, model, serial of the underlying DRM connector or the display name of the underlying X11 connection, etc.

If the compositor implements xdg-output and this head is enabled, the xdg_output.description must report the same description.

The description event is sent after a wlr_output_head object is created. This event is only sent once per object, and the description does not change over the lifetime of the wlr_output_head object.

§

PhysicalSize

Fields

§width: i32
§height: i32

head physical size

This event describes the physical size of the head. This event is only sent if the head has a physical size (e.g. is not a projector or a virtual device).

§

Mode

introduce a mode

This event introduces a mode for this head. It is sent once per supported mode.

§

Enabled

Fields

§enabled: i32

head is enabled or disabled

This event describes whether the head is enabled. A disabled head is not mapped to a region of the global compositor space.

When a head is disabled, some properties (current_mode, position, transform and scale) are irrelevant.

§

CurrentMode

Fields

current mode

This event describes the mode currently in use for this head. It is only sent if the output is enabled.

§

Position

Fields

current position

This events describes the position of the head in the global compositor space. It is only sent if the output is enabled.

§

Transform

Fields

§transform: Transform

current transformation

This event describes the transformation currently applied to the head. It is only sent if the output is enabled.

§

Scale

Fields

§scale: f64

current scale

This events describes the scale of the head in the global compositor space. It is only sent if the output is enabled.

§

Finished

the head has been destroyed

The compositor will destroy the object immediately after sending this event, so it will become invalid and the client should release any resources associated with it.

§

Make

Fields

§make: String

head manufacturer

This event describes the manufacturer of the head.

This must report the same make as the wl_output interface does in its geometry event.

Together with the model and serial_number events the purpose is to allow clients to recognize heads from previous sessions and for example load head-specific configurations back.

It is not guaranteed this event will be ever sent. A reason for that can be that the compositor does not have information about the make of the head or the definition of a make is not sensible in the current setup, for example in a virtual session. Clients can still try to identify the head by available information from other events but should be aware that there is an increased risk of false positives.

It is not recommended to display the make string in UI to users. For that the string provided by the description event should be preferred.

Only available since version 2 of the interface

§

Model

Fields

§model: String

head model

This event describes the model of the head.

This must report the same model as the wl_output interface does in its geometry event.

Together with the make and serial_number events the purpose is to allow clients to recognize heads from previous sessions and for example load head-specific configurations back.

It is not guaranteed this event will be ever sent. A reason for that can be that the compositor does not have information about the model of the head or the definition of a model is not sensible in the current setup, for example in a virtual session. Clients can still try to identify the head by available information from other events but should be aware that there is an increased risk of false positives.

It is not recommended to display the model string in UI to users. For that the string provided by the description event should be preferred.

Only available since version 2 of the interface

§

SerialNumber

Fields

§serial_number: String

head serial number

This event describes the serial number of the head.

Together with the make and model events the purpose is to allow clients to recognize heads from previous sessions and for example load head- specific configurations back.

It is not guaranteed this event will be ever sent. A reason for that can be that the compositor does not have information about the serial number of the head or the definition of a serial number is not sensible in the current setup. Clients can still try to identify the head by available information from other events but should be aware that there is an increased risk of false positives.

It is not recommended to display the serial_number string in UI to users. For that the string provided by the description event should be preferred.

Only available since version 2 of the interface

Trait Implementations§

source§

impl Debug for Event

source§

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

Formats the value using the given formatter. Read more
source§

impl MessageGroup for Event

source§

const MESSAGES: &'static [MessageDesc] = _

Wire representation of this MessageGroup
§

type Map = ProxyMap

The wrapper type for ObjectMap allowing the mapping of Object and NewId arguments to the object map during parsing.
source§

fn is_destructor(&self) -> bool

Whether this message is a destructor Read more
source§

fn opcode(&self) -> u16

The opcode of this message
source§

fn since(&self) -> u32

The minimal object version for which this message exists
source§

fn child<Meta: ObjectMetadata>( opcode: u16, version: u32, meta: &Meta ) -> Option<Object<Meta>>

Retrieve the child Object associated with this message if any
source§

fn from_raw(msg: Message, map: &mut Self::Map) -> Result<Self, ()>

Construct a message from its raw representation
source§

fn into_raw(self, sender_id: u32) -> Message

Turn this message into its raw representation
source§

unsafe fn from_raw_c( obj: *mut c_void, opcode: u32, args: *const wl_argument ) -> Result<Event, ()>

Construct a message of this group from its C representation Read more
source§

fn as_raw_c_in<F, T>(self, f: F) -> T
where F: FnOnce(u32, &mut [wl_argument]) -> T,

Build a C representation of this message Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Event

§

impl !Send for Event

§

impl !Sync for Event

§

impl Unpin for Event

§

impl !UnwindSafe for Event

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