pub struct NativeOutputDescriptor {
pub fingerprint: String,
pub output_name: Option<String>,
pub logical_rect: NativeOverlayRect,
pub physical_width_px: u32,
pub physical_height_px: u32,
pub scale: NativeOutputScale,
pub transform: NativeOutputTransform,
pub catalog_generation: u64,
}Expand description
One output in a generation-stamped native compositor catalogue.
The logical rectangle drives exact matching. Physical dimensions are pixels; scale is a reduced rational; the fingerprint is stable only for the supplied metadata and is not a hardware authentication token.
§Examples
use ailloli_ui_winit::{NativeOutputDescriptor, NativeOutputScale, NativeOutputTransform};
use ailloli_ui_winit::native_overlay::NativeOverlayRect;
let output = NativeOutputDescriptor {
fingerprint: "demo".into(), output_name: Some("DP-1".into()),
logical_rect: NativeOverlayRect::new(0.0, 0.0, 1920.0, 1080.0),
physical_width_px: 3840, physical_height_px: 2160,
scale: NativeOutputScale::integer(2),
transform: NativeOutputTransform::Normal, catalog_generation: 7,
};
assert_eq!(output.physical_width_px, 3840);Fields§
§fingerprint: StringDeterministic hash of the native output metadata in this catalogue.
output_name: Option<String>Stable connector/name when the compositor exposes one.
logical_rect: NativeOverlayRectExact compositor logical desktop rectangle.
physical_width_px: u32Native output width in physical pixels.
physical_height_px: u32Native output height in physical pixels.
scale: NativeOutputScaleReduced physical-to-logical scale ratio.
transform: NativeOutputTransformRotation/reflection applied by the compositor.
catalog_generation: u64Monotonic service generation for detecting stale descriptors.
Trait Implementations§
Source§impl Clone for NativeOutputDescriptor
impl Clone for NativeOutputDescriptor
Source§fn clone(&self) -> NativeOutputDescriptor
fn clone(&self) -> NativeOutputDescriptor
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NativeOutputDescriptor
impl Debug for NativeOutputDescriptor
Source§impl PartialEq for NativeOutputDescriptor
impl PartialEq for NativeOutputDescriptor
impl StructuralPartialEq for NativeOutputDescriptor
Auto Trait Implementations§
impl Freeze for NativeOutputDescriptor
impl RefUnwindSafe for NativeOutputDescriptor
impl Send for NativeOutputDescriptor
impl Sync for NativeOutputDescriptor
impl Unpin for NativeOutputDescriptor
impl UnwindSafe for NativeOutputDescriptor
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn 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>
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)
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)
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
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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