Skip to main content

Event

#[non_exhaustive]
pub enum Event {
Show 40 variants Geometry { x: i32, y: i32, physical_width: i32, physical_height: i32, subpixel: i32, make: String, model: String, transform: i32, }, CurrentMode { mode: KdeOutputDeviceModeV2, }, Mode { mode: KdeOutputDeviceModeV2, }, Done, Scale { factor: f64, }, Edid { raw: String, }, Enabled { enabled: i32, }, Uuid { uuid: String, }, SerialNumber { serialNumber: String, }, EisaId { eisaId: String, }, Capabilities { flags: WEnum<Capability>, }, Overscan { overscan: u32, }, VrrPolicy { vrr_policy: WEnum<VrrPolicy>, }, RgbRange { rgb_range: WEnum<RgbRange>, }, Name { name: String, }, HighDynamicRange { hdr_enabled: u32, }, SdrBrightness { sdr_brightness: u32, }, WideColorGamut { wcg_enabled: u32, }, AutoRotatePolicy { policy: WEnum<AutoRotatePolicy>, }, IccProfilePath { profile_path: String, }, BrightnessMetadata { max_peak_brightness: u32, max_frame_average_brightness: u32, min_brightness: u32, }, BrightnessOverrides { max_peak_brightness: i32, max_average_brightness: i32, min_brightness: i32, }, SdrGamutWideness { gamut_wideness: u32, }, ColorProfileSource { source: WEnum<ColorProfileSource>, }, Brightness { brightness: u32, }, ColorPowerTradeoff { preference: WEnum<ColorPowerTradeoff>, }, Dimming { multiplier: u32, }, ReplicationSource { source: String, }, DdcCiAllowed { allowed: u32, }, MaxBitsPerColor { max_bpc: u32, }, MaxBitsPerColorRange { min_value: u32, max_value: u32, }, AutomaticMaxBitsPerColorLimit { max_bpc_limit: u32, }, EdrPolicy { policy: WEnum<EdrPolicy>, }, Sharpness { sharpness: u32, }, Priority { priority: u32, }, AutoBrightness { enabled: u32, }, Removed, HdrIccProfilePath { profile_path: String, }, HdrColorProfileSource { source: WEnum<ColorProfileSource>, }, AbmLevel { level: u32, },
}

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

Geometry

geometric properties of the output

The geometry event describes geometric properties of the output. The event is sent when binding to the output object and whenever any of the properties change.

Fields

§x: i32

x position within the global compositor space

§y: i32

y position within the global compositor space

§physical_width: i32

width in millimeters of the output

§physical_height: i32

height in millimeters of the output

§subpixel: i32

subpixel orientation of the output

§make: String

textual description of the manufacturer

§model: String

textual description of the model

§transform: i32

transform that maps framebuffer to output

§

CurrentMode

current mode

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

§

Mode

advertise available output modes and current one

The mode event describes an available mode for the output.

When the client binds to the output_device object, the server sends this event once for every available mode the output_device can be operated by.

There will always be at least one event sent out on initial binding, which represents the current mode.

Later if an output changes, its mode event is sent again for the eventual added modes and lastly the current mode. In other words, the current mode is always represented by the latest event sent with the current flag set.

The size of a mode is given in physical hardware units of the output device. This is not necessarily the same as the output size in the global compositor space. For instance, the output may be scaled, as described in kde_output_device_v2.scale, or transformed, as described in kde_output_device_v2.transform.

§

Done

sent all information about output

This event is sent after all other properties have been sent on binding to the output object as well as after any other output property change have been applied later on. This allows to see changes to the output properties as atomic, even if multiple events successively announce them.

§

Scale

output scaling properties

This event contains scaling geometry information that is not in the geometry event. It may be sent after binding the output object or if the output scale changes later. If it is not sent, the client should assume a scale of 1.

A scale larger than 1 means that the compositor will automatically scale surface buffers by this amount when rendering. This is used for high resolution displays where applications rendering at the native resolution would be too small to be legible.

It is intended that scaling aware clients track the current output of a surface, and if it is on a scaled output it should use wl_surface.set_buffer_scale with the scale of the output. That way the compositor can avoid scaling the surface, and the client can supply a higher detail image.

Fields

§factor: f64

scaling factor of output

§

Edid

advertise EDID data for the output

The edid event encapsulates the EDID data for the outputdevice.

The event is sent when binding to the output object. The EDID data may be empty, in which case this event is sent anyway. If the EDID information is empty, you can fall back to the name et al. properties of the outputdevice.

Fields

§raw: String

base64-encoded EDID string

§

Enabled

output is enabled or disabled

The enabled event notifies whether this output is currently enabled and used for displaying content by the server. The event is sent when binding to the output object and whenever later on an output changes its state by becoming enabled or disabled.

Fields

§enabled: i32

output enabled state

§

Uuid

A unique id for this outputdevice

The uuid can be used to identify the output. It’s controlled by the server entirely. The server should make sure the uuid is persistent across restarts. An empty uuid is considered invalid.

Fields

§uuid: String

output devices ID

§

SerialNumber

Serial Number

Serial ID of the monitor, sent on startup before the first done event.

Fields

§serialNumber: String

textual representation of serial number

§

EisaId

EISA ID

EISA ID of the monitor, sent on startup before the first done event.

Fields

§eisaId: String

textual representation of EISA identifier

§

Capabilities

capability flags

What capabilities this device has, sent on startup before the first done event.

Fields

§flags: WEnum<Capability>
§

Overscan

overscan

Overscan value of the monitor in percent, sent on startup before the first done event.

Fields

§overscan: u32

amount of overscan of the monitor

§

VrrPolicy

Variable Refresh Rate Policy

What policy the compositor will employ regarding its use of variable refresh rate.

Fields

§vrr_policy: WEnum<VrrPolicy>
§

RgbRange

RGB range

What rgb range the compositor is using for this output

Fields

§rgb_range: WEnum<RgbRange>
§

Name

Output’s name

Name of the output, it’s useful to cross-reference to an zxdg_output_v1 and ultimately QScreen

Only available since version 2 of the interface

Fields

§name: String
§

HighDynamicRange

if HDR is enabled

Whether or not high dynamic range is enabled for this output

Only available since version 3 of the interface

Fields

§hdr_enabled: u32

1 if enabled, 0 if disabled

§

SdrBrightness

the brightness of sdr if hdr is enabled

If high dynamic range is used, this value defines the brightness in nits for content that’s in standard dynamic range format. Note that while the value is in nits, that doesn’t necessarily translate to the same brightness on the screen.

Only available since version 3 of the interface

Fields

§sdr_brightness: u32
§

WideColorGamut

if WCG is enabled

Whether or not the use of a wide color gamut is enabled for this output

Only available since version 3 of the interface

Fields

§wcg_enabled: u32

1 if enabled, 0 if disabled

§

AutoRotatePolicy

describes when auto rotate is used

Only available since version 4 of the interface

Fields

§policy: WEnum<AutoRotatePolicy>
§

IccProfilePath

describes the path to the ICC profile used in SDR mode

Only available since version 5 of the interface

Fields

§profile_path: String
§

BrightnessMetadata

metadata about the screen’s brightness limits

Only available since version 6 of the interface

Fields

§max_peak_brightness: u32

in nits

§max_frame_average_brightness: u32

in nits

§min_brightness: u32

in 0.0001 nits

§

BrightnessOverrides

overrides for the screen’s brightness limits

Only available since version 6 of the interface

Fields

§max_peak_brightness: i32

-1 for no override, positive values are the brightness in nits

§max_average_brightness: i32

-1 for no override, positive values are the brightness in nits

§min_brightness: i32

-1 for no override, positive values are the brightness in 0.0001 nits

§

SdrGamutWideness

describes which gamut is assumed for sRGB applications

This can be used to provide the colors users assume sRGB applications should have based on the default experience on many modern sRGB screens.

Only available since version 6 of the interface

Fields

§gamut_wideness: u32

0 means rec.709 primaries, 10000 means native primaries

§

ColorProfileSource

describes which source the compositor uses for the color profile on an output in SDR mode

Only available since version 7 of the interface

Fields

§source: WEnum<ColorProfileSource>
§

Brightness

brightness multiplier

This is the brightness modifier of the output. It doesn’t specify any absolute values, but is merely a multiplier on top of other brightness values, like sdr_brightness and brightness_metadata. 0 is the minimum brightness (not completely dark) and 10000 is the maximum brightness. This is currently only supported / meaningful while HDR is active.

Only available since version 8 of the interface

Fields

§brightness: u32

brightness in 0-10000

§

ColorPowerTradeoff

the preferred color/power tradeoff

Only available since version 10 of the interface

Fields

§preference: WEnum<ColorPowerTradeoff>
§

Dimming

dimming multiplier

This is the dimming multiplier of the output. This is similar to the brightness setting, except it’s meant to be a temporary setting only, not persistent and may be implemented differently depending on the display. 0 is the minimum dimming factor (not completely dark) and 10000 means the output is not dimmed.

Only available since version 11 of the interface

Fields

§multiplier: u32

multiplier in 0-10000

§

ReplicationSource

source output for mirroring

Only available since version 13 of the interface

Fields

§source: String

uuid of the source output

§

DdcCiAllowed

if DDC/CI should be used to control brightness etc.

If the ddc_ci capability is present, this determines if settings such as brightness, contrast or others should be set using DDC/CI.

Only available since version 14 of the interface

Fields

§allowed: u32

1 if allowed, 0 if disabled

§

MaxBitsPerColor

override max bpc

This limits the amount of bits per color that are sent to the display.

Only available since version 15 of the interface

Fields

§max_bpc: u32

0 for the default / automatic

§

MaxBitsPerColorRange

range of max bits per color value

Only available since version 15 of the interface

Fields

§min_value: u32

the minimum supported by the driver

§max_value: u32

the maximum supported by the driver

§

AutomaticMaxBitsPerColorLimit

if and to what value automatic max bpc is limited

Only available since version 15 of the interface

Fields

§max_bpc_limit: u32

which value automatic bpc gets limited to. 0 if not limited

§

EdrPolicy

when the compositor may apply EDR

When EDR is enabled, the compositor may increase the backlight beyond the user-specified setting, in order to present HDR content on displays without native HDR support. This will usually result in better visuals, but also increases battery usage.

Only available since version 16 of the interface

Fields

§policy: WEnum<EdrPolicy>
§

Sharpness

sharpness strength

This is the sharpness modifier of the output. 0 is sharpness disabled and 10000 is the maximum sharpness

Only available since version 17 of the interface

Fields

§sharpness: u32

sharpness in 0-10000

§

Priority

output priority

Describes the position of the output in the output order list, with lower values being earlier in the list. There’s no specific value the list has to start at, this value is only used in sorting outputs.

Note that the output order protocol is not sufficient for this, as an output may not be in the output order if it’s disabled or mirroring another screen.

Only available since version 18 of the interface

Fields

§priority: u32

priority

§

AutoBrightness

whether or not automatic brightness is enabled

Only available since version 20 of the interface

Fields

§enabled: u32

1 for enabled, 0 for disabled

§

Removed

the output has been removed

This event is sent when the output device is disconnected and no new updates will be sent. The client should call the kde_output_device_v2.release request after receiving this event.

Only available since version 21 of the interface

§

HdrIccProfilePath

describes the path to the ICC profile used in HDR mode

Only available since version 22 of the interface

Fields

§profile_path: String
§

HdrColorProfileSource

describes which source the compositor uses for the color profile on an output in HDR mode

Only available since version 22 of the interface

Fields

§source: WEnum<ColorProfileSource>
§

AbmLevel

allowed level of adaptive backlight modulation

Adaptive backlight modulation is a feature that reduces the backlight and increases contrast of colors on the screen to improve power usage.

Only available since version 23 of the interface

Fields

§level: u32

0 is off, 4 is the maximum level

Implementations§

Source§

impl Event

Source

pub fn opcode(&self) -> u16

Get the opcode number of this message

Trait Implementations§

Source§

impl Debug for Event

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Event

§

impl !UnwindSafe for Event

§

impl Freeze for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnsafeUnpin 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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

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

Source§

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

impl<T> Ungil for T
where T: Send,

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more