pub enum Event {
Show 15 variants
Outputs(Vec<OutputInfo>),
Added(WindowInfo),
Changed(WindowInfo),
Mapped {
id: WindowId,
size: Size,
},
Resized {
id: WindowId,
size: Size,
},
Unmapped {
id: WindowId,
},
Removed {
id: WindowId,
},
Request {
id: WindowId,
request: Request,
},
TaskbarRect {
id: WindowId,
rect: Option<Rect>,
},
ShowDesktop(bool),
Pointer(PointerEvent, Under),
Key(KeyEvent),
Tick(Instant),
X11Display(u32),
ActivateDesktop(u32),
}Expand description
A decision point the compositor hands the policy.
Variants§
Outputs(Vec<OutputInfo>)
The layout changed: every output, in display id order.
Added(WindowInfo)
A window appeared and waits for its first configure. The policy answers with
Command::Configure at least; the compositor maps the window once the client has drawn.
Changed(WindowInfo)
What the policy knew about a window changed (its title, parent, hints, or type).
Mapped
The client drew its first buffer: the window is on screen at this size.
Resized
A mapped window committed a new size.
Unmapped
The client withdrew its window (a null buffer, an unmap); it may map again.
Removed
The window is gone.
Request
A protocol request about a window.
TaskbarRect
A taskbar told where it shows the window, in layout coordinates, or that it no longer does; where a minimize animation heads.
ShowDesktop(bool)
A shell asked to show or to restore the desktop.
Pointer(PointerEvent, Under)
The pointer moved, pressed, or scrolled; answered with a Verdict.
Key(KeyEvent)
A key went down or up; answered with a Verdict.
Tick(Instant)
The time the policy asked for (Command::WakeAt) came, or a frame is about to render
while an effect runs.
X11Display(u32)
An X server the compositor runs for its X11 clients is up on this display number, so
the policy can hand DISPLAY to what it starts.
ActivateDesktop(u32)
A client (a pager) asked, through the workspace protocol, to switch to this virtual desktop, counted from zero.
Trait Implementations§
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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