pub struct CompositorState { /* private fields */ }Available on crate feature
wayland_frontend only.Expand description
State of a compositor
Implementations§
Source§impl CompositorState
impl CompositorState
Sourcepub fn new<D>(display: &DisplayHandle) -> Selfwhere
D: GlobalDispatch<WlCompositor, GlobalData> + GlobalDispatch<WlSubcompositor, GlobalData> + 'static,
pub fn new<D>(display: &DisplayHandle) -> Selfwhere
D: GlobalDispatch<WlCompositor, GlobalData> + GlobalDispatch<WlSubcompositor, GlobalData> + 'static,
Create new wl_compositor version 5 and wl_subcompositor globals.
It returns the two global handles, in case you wish to remove these globals from the event loop in the future.
Sourcepub fn new_v6<D>(display: &DisplayHandle) -> Selfwhere
D: GlobalDispatch<WlCompositor, GlobalData> + GlobalDispatch<WlSubcompositor, GlobalData> + 'static,
pub fn new_v6<D>(display: &DisplayHandle) -> Selfwhere
D: GlobalDispatch<WlCompositor, GlobalData> + GlobalDispatch<WlSubcompositor, GlobalData> + 'static,
The same as new, but binds at least version 6 of wl_compositor.
This means that for clients to scale and apply transformation with
non-default values send_surface_state must be used.
Sourcepub fn compositor_global(&self) -> GlobalId
pub fn compositor_global(&self) -> GlobalId
Get id of compositor global
Sourcepub fn subcompositor_global(&self) -> GlobalId
pub fn subcompositor_global(&self) -> GlobalId
Get id of subcompositor global
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CompositorState
impl !RefUnwindSafe for CompositorState
impl Send for CompositorState
impl Sync for CompositorState
impl Unpin for CompositorState
impl !UnwindSafe for CompositorState
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
§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.