#[non_exhaustive]
pub enum Event { SyncOutput { output: WlOutput, }, Presented { tv_sec_hi: u32, tv_sec_lo: u32, tv_nsec: u32, refresh: u32, seq_hi: u32, seq_lo: u32, flags: Kind, }, Discarded, }

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

SyncOutput

Fields

§output: WlOutput

presentation synchronized to this output

As presentation can be synchronized to only one output at a time, this event tells which output it was. This event is only sent prior to the presented event.

As clients may bind to the same global wl_output multiple times, this event is sent for each bound instance that matches the synchronized output. If a client has not bound to the right wl_output global at all, this event is not sent.

§

Presented

Fields

§tv_sec_hi: u32
§tv_sec_lo: u32
§tv_nsec: u32
§refresh: u32
§seq_hi: u32
§seq_lo: u32
§flags: Kind

the content update was displayed

The associated content update was displayed to the user at the indicated time (tv_sec_hi/lo, tv_nsec). For the interpretation of the timestamp, see presentation.clock_id event.

The timestamp corresponds to the time when the content update turned into light the first time on the surface’s main output. Compositors may approximate this from the framebuffer flip completion events from the system, and the latency of the physical display path if known.

This event is preceded by all related sync_output events telling which output’s refresh cycle the feedback corresponds to, i.e. the main output for the surface. Compositors are recommended to choose the output containing the largest part of the wl_surface, or keeping the output they previously chose. Having a stable presentation output association helps clients predict future output refreshes (vblank).

The ‘refresh’ argument gives the compositor’s prediction of how many nanoseconds after tv_sec, tv_nsec the very next output refresh may occur. This is to further aid clients in predicting future refreshes, i.e., estimating the timestamps targeting the next few vblanks. If such prediction cannot usefully be done, the argument is zero.

If the output does not have a constant refresh rate, explicit video mode switches excluded, then the refresh argument must be zero.

The 64-bit value combined from seq_hi and seq_lo is the value of the output’s vertical retrace counter when the content update was first scanned out to the display. This value must be compatible with the definition of MSC in GLX_OML_sync_control specification. Note, that if the display path has a non-zero latency, the time instant specified by this counter may differ from the timestamp’s.

If the output does not have a concept of vertical retrace or a refresh cycle, or the output device is self-refreshing without a way to query the refresh count, then the arguments seq_hi and seq_lo must be zero.

§

Discarded

the content update was not displayed

The content update was never displayed to the user.

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.