#[non_exhaustive]pub enum Event {
Show 14 variants
Name {
name: String,
},
Description {
description: String,
},
PhysicalSize {
width: i32,
height: i32,
},
Mode {
mode: ZwlrOutputModeV1,
},
Enabled {
enabled: i32,
},
CurrentMode {
mode: ZwlrOutputModeV1,
},
Position {
x: i32,
y: i32,
},
Transform {
transform: WEnum<Transform>,
},
Scale {
scale: f64,
},
Finished,
Make {
make: String,
},
Model {
model: String,
},
SerialNumber {
serial_number: String,
},
AdaptiveSync {
state: WEnum<AdaptiveSyncState>,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Name
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
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
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
Fields
mode: ZwlrOutputModeV1
introduce a mode
This event introduces a mode for this head. It is sent once per supported mode.
Enabled
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
mode: ZwlrOutputModeV1
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
current transformation
This event describes the transformation currently applied to the head. It is only sent if the output is enabled.
Scale
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 disappeared
This event indicates that the head is no longer available. The head object becomes inert. Clients should send a destroy request and release any resources associated with it.
Make
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
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
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
AdaptiveSync
Fields
state: WEnum<AdaptiveSyncState>
current adaptive sync state
This event describes whether adaptive sync is currently enabled for the head or not. Adaptive sync is also known as Variable Refresh Rate or VRR.
Only available since version 4 of the interface
Implementations§
Trait Implementations§
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> 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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.