#[non_exhaustive]pub enum Event {
Transform {
transform: WEnum<Transform>,
},
Damage {
x: i32,
y: i32,
width: i32,
height: i32,
},
PresentationTime {
tv_sec_hi: u32,
tv_sec_lo: u32,
tv_nsec: u32,
},
Ready,
Failed {
reason: WEnum<FailureReason>,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Transform
buffer transform
This event is sent before the ready event and holds the transform of the source buffer.
Damage
buffer damaged region
This event is sent before the ready event. It may be generated multiple times to describe a region.
The first captured frame in a session will always carry full damage. Subsequent frames’ damaged regions describe which parts of the buffer have changed since the last ready event.
These coordinates originate in the upper left corner of the buffer.
Fields
PresentationTime
presentation time of the frame
This event indicates the time at which the frame is presented to the output in system monotonic time. This event is sent before the ready event.
The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples, each component being an unsigned 32-bit value. Whole seconds are in tv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo, and the additional fractional part in tv_nsec as nanoseconds. Hence, for valid timestamps tv_nsec must be in [0, 999999999].
Fields
Ready
frame is available for reading
Called as soon as the frame is copied, indicating it is available for reading.
The buffer may be re-used by the client after this event.
After receiving this event, the client must destroy the object.
Failed
capture failed
This event indicates that the attempted frame copy has failed.
After receiving this event, the client must destroy the object.
Fields
reason: WEnum<FailureReason>
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Event
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.