[−][src]Struct wlroots::output::layout::Layout
Methods
impl Layout
[src]
impl Layout
pub fn create(handler: Box<dyn Handler>) -> Handle
[src]
pub fn create(handler: Box<dyn Handler>) -> Handle
Construct a new OuputLayout.
pub fn outputs(&mut self) -> Vec<(Handle, Origin)>
[src]
pub fn outputs(&mut self) -> Vec<(Handle, Origin)>
Get the outputs associated with this output::layout::Layout.
Also returns their absolute position within the layout.
pub fn outputs_layouts<'output>(&'output mut self) -> Vec<Output<'output>>
[src]
pub fn outputs_layouts<'output>(&'output mut self) -> Vec<Output<'output>>
Get the Outputs in the output::layout::Layout coupled with their output information.
For a version that isn't bound by lifetimes, see outputs
.
pub fn add(&mut self, output: &mut Output, origin: Origin)
[src]
pub fn add(&mut self, output: &mut Output, origin: Origin)
Adds an output to the layout at the given coordinates.
pub fn add_auto(&mut self, output: &mut Output)
[src]
pub fn add_auto(&mut self, output: &mut Output)
Adds an output to the layout, automatically positioning it with the others that are already there.
pub fn move_output(&mut self, output: &mut Output, origin: Origin)
[src]
pub fn move_output(&mut self, output: &mut Output, origin: Origin)
Moves the output to the given coordinates.
If the output is not part of this layout this does nothing.
pub fn closest_point<'this, O>(
&mut self,
reference: O,
x: f64,
y: f64
) -> (f64, f64) where
O: Into<Option<&'this mut Output>>,
[src]
pub fn closest_point<'this, O>(
&mut self,
reference: O,
x: f64,
y: f64
) -> (f64, f64) where
O: Into<Option<&'this mut Output>>,
Get the closest point on this layout from the given point from the reference output.
If reference is None, gets the closest point from the entire layout.
Returns the closest point in the format (x, y)
pub fn contains_point(&mut self, output: &mut Output, origin: Origin) -> bool
[src]
pub fn contains_point(&mut self, output: &mut Output, origin: Origin) -> bool
Determines if the output::layout::Layout
contains the output::Output
at the given
point.
pub fn get_box<'this, O>(&mut self, reference: O) -> Area where
O: Into<Option<&'this mut Output>>,
[src]
pub fn get_box<'this, O>(&mut self, reference: O) -> Area where
O: Into<Option<&'this mut Output>>,
Get the box of the layout for the given reference output.
If reference
is None, the box will be for the extents of the entire layout.
pub fn get_center_output(&mut self) -> Option<Handle>
[src]
pub fn get_center_output(&mut self) -> Option<Handle>
Get the output closest to the center of the layout extents, if one exists.
pub fn intersects(&mut self, output: &mut Output, area: Area) -> bool
[src]
pub fn intersects(&mut self, output: &mut Output, area: Area) -> bool
Determines if the output::Output
in the output::layout::Layout
intersects with
the provided Area
.
pub fn output_coords(&mut self, output: &mut Output, x: &mut f64, y: &mut f64)
[src]
pub fn output_coords(&mut self, output: &mut Output, x: &mut f64, y: &mut f64)
Given x and y as pointers to global coordinates, adjusts them to local output coordinates relative to the given reference output.
pub fn remove(&mut self, output: &mut Output)
[src]
pub fn remove(&mut self, output: &mut Output)
Remove an output from this layout.
If the output was not in the layout, does nothing.
pub fn get_output_info<'output>(
&mut self,
output: &'output mut Output
) -> Option<Output<'output>>
[src]
pub fn get_output_info<'output>(
&mut self,
output: &'output mut Output
) -> Option<Output<'output>>
Get an output's information about its place in the output::layout::Layout
, if
it's present.
pub fn output_at(&mut self, lx: c_double, ly: c_double) -> Option<Handle>
[src]
pub fn output_at(&mut self, lx: c_double, ly: c_double) -> Option<Handle>
Get the output at the given output layout coordinate location, if there is one there.
pub fn weak_reference(&self) -> Handle
[src]
pub fn weak_reference(&self) -> Handle
Creates a weak reference to an output::layout::Layout
.
Panics
If this output::layout::Layout
is a previously upgraded output::layout::Handle
,
then this function will panic.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more