pub enum Command {
Configure {
id: WindowId,
rect: Rect,
states: States,
},
Stack(Vec<WindowId>),
Focus(Option<WindowId>),
Close(WindowId),
Frame {
id: WindowId,
frame: Option<Frame>,
},
Overlay {
key: u32,
rect: Rect,
image: Image,
},
ClearOverlay(u32),
Cursor(&'static str),
Effect {
id: WindowId,
transform: Option<Transform>,
},
WakeAt(Instant),
Redraw,
Desktops {
count: u32,
current: u32,
},
}Expand description
What the policy tells the compositor to do.
Variants§
Configure
Place and size the client area and set its states. Sent for a window the client has not mapped yet, it is the initial configure.
Stack(Vec<WindowId>)
Where every window stands, bottom first. A mapped window left out keeps its place below the listed ones.
Focus(Option<WindowId>)
Give the keyboard to this window, or to none.
Close(WindowId)
Ask the client to close the window.
Frame
The frame around a window, or none: the compositor presents the parts with the window
and keeps its layout (Rect::grown by the extents) for the window list’s geometry.
Overlay
A raster over everything on the layout (a menu, an on-screen display), replacing the one of the same key.
ClearOverlay(u32)
Take an overlay down.
Cursor(&'static str)
The pointer image while the policy holds the pointer, by CSS cursor name; default
hands the choice back to the client under the pointer.
Effect
Present a window through a transform (an effect frame), or plainly again.
WakeAt(Instant)
Call the policy back with Event::Tick no later than this.
Redraw
Everything on the layout changed from the policy’s side (a theme), so every frame is to be presented again.
Desktops
The virtual desktops: how many there are and which is current, counted from zero, for the workspace protocol the pagers read.
Trait Implementations§
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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>
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)
&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)
&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> ⓘ
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> ⓘ
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> ⓘ
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