pub struct Container {
pub container_type: ContainerType,
pub is_floating: bool,
pub layout_scheme: LayoutScheme,
pub num_children: u32,
/* private fields */
}Fields§
§container_type: ContainerTypeThe type of the container.
is_floating: boolWhether the container is floating within its workspace.
layout_scheme: LayoutSchemeHow the container is laying out its content.
num_children: u32The number of child containers.
Implementations§
Source§impl Container
impl Container
pub fn id(&self) -> u64
Sourcepub fn child_at(&self, index: u32) -> Option<Container>
pub fn child_at(&self, index: u32) -> Option<Container>
Get a child container from the parent container by index.
Returns None if the index is out of bounds or if the container
is not of type Parent.
Sourcepub fn get_children(&self) -> Vec<Container>
pub fn get_children(&self) -> Vec<Container>
Get all children from a parent container.
Returns an empty vector if the container is not of type Parent.
Sourcepub fn window(&self) -> Option<WindowInfo>
pub fn window(&self) -> Option<WindowInfo>
Get the window info from a window container.
Returns None if the container is not of type Window.
Trait Implementations§
Source§impl From<miracle_container_t> for Container
impl From<miracle_container_t> for Container
Source§fn from(value: miracle_container_t) -> Self
fn from(value: miracle_container_t) -> Self
Converts to this type from the input type.
impl Copy for Container
Auto Trait Implementations§
impl Freeze for Container
impl RefUnwindSafe for Container
impl Send for Container
impl Sync for Container
impl Unpin for Container
impl UnsafeUnpin for Container
impl UnwindSafe for Container
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