Struct runa_orbiter::shell::output::Output
source · pub struct Output { /* private fields */ }
Expand description
Output
An output is a screen, where the rendered result in displayed.
Implementations§
source§impl Output
impl Output
sourcepub fn overlaps(&self, other: &Rectangle<i32, ScreenNormalized>) -> bool
pub fn overlaps(&self, other: &Rectangle<i32, ScreenNormalized>) -> bool
Checks whether an output overlaps a given rectangle.
Note
This check uses a special coordinate system,
coords::ScreenNormalized
,
see the documentation there for the justification. If this is not what
is the most suitable for your compositor, you are free implement
other overlap checks. This is not used internally by this crate.
sourcepub async fn notify_change(self: &Rc<Self>, change: OutputChange)
pub async fn notify_change(self: &Rc<Self>, change: OutputChange)
Notify that the output has changed
sourcepub fn new(
physical_size: Extent<u32, Physical>,
make: &str,
model: &str,
name: &str,
global_id: u32
) -> Self
pub fn new( physical_size: Extent<u32, Physical>, make: &str, model: &str, name: &str, global_id: u32 ) -> Self
Create a new output
sourcepub fn logical_geometry(&self) -> Rectangle<i32, ScreenNormalized>
pub fn logical_geometry(&self) -> Rectangle<i32, ScreenNormalized>
Scale invariant logical geometry of the output. This is used to determine where a window is placed, so that it is not dependent on the scale of the window. To avoid a dependency circle: window scale -> window placement -> window scale.
Currently this is calculated as the size of the output divided by its scale.
sourcepub fn logical_position(&self) -> Point<i32, ScreenNormalized>
pub fn logical_position(&self) -> Point<i32, ScreenNormalized>
Scale invariant logical position of the output.
See logical_geometry
.
sourcepub fn set_position(&self, position: Point<i32, Screen>)
pub fn set_position(&self, position: Point<i32, Screen>)
Set the screen space position of the output
sourcepub fn set_logical_position(
&self,
logical_position: Point<i32, ScreenNormalized>
)
pub fn set_logical_position( &self, logical_position: Point<i32, ScreenNormalized> )
Set the scale invariant logical position of the output.
See logical_geometry
.
sourcepub fn set_transform(&self, transform: Transform)
pub fn set_transform(&self, transform: Transform)
Set the output transformation
sourcepub fn physical_size(&self) -> Extent<u32, Physical>
pub fn physical_size(&self) -> Extent<u32, Physical>
Physical size in millimeters