#[non_exhaustive]pub enum Event<'a> {
Name {
name: String,
},
Coordinates {
coordinates: Vec<u8>,
},
State {
state: Vec<u8>,
},
Capabilities {
capabilities: Vec<u8>,
},
Remove,
TilingState {
state: WEnum<TilingState>,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Name
workspace name changed
This event is emitted immediately after the zcosmic_workspace_handle_v1 is created and whenever the name of the workspace changes.
Coordinates
workspace coordinates changed
This event is used to organize workspaces into an N-dimensional grid within a workspace group, and if supported, is emitted immediately after the zcosmic_workspace_handle_v1 is created and whenever the coordinates of the workspace change. Compositors may not send this event if they do not conceptually arrange workspaces in this way. If compositors simply number workspaces, without any geometric interpretation, they may send 1D coordinates, which clients should not interpret as implying any geometry. Sending an empty array means that the compositor no longer orders the workspace geometrically.
Coordinates have an arbitrary number of dimensions N with an uint32 position along each dimension. By convention if N > 1, the first dimension is X, the second Y, the third Z, and so on. The compositor may chose to utilize these events for a more novel workspace layout convention, however. No guarantee is made about the grid being filled or bounded; there may be a workspace at coordinate 1 and another at coordinate 1000 and none in between. Within a workspace group, however, workspaces must have unique coordinates of equal dimensionality.
State
the state of the workspace changed
This event is emitted immediately after the zcosmic_workspace_handle_v1 is created and each time the workspace state changes, either because of a compositor action or because of a request in this protocol.
Capabilities
compositor capabilities
This event advertises the capabilities supported by the compositor. If a capability isn’t supported, clients should hide or disable the UI elements that expose this functionality. For instance, if the compositor doesn’t advertise support for removing workspaces, a button triggering the remove request should not be displayed.
The compositor will ignore requests it doesn’t support. For instance, a compositor which doesn’t advertise support for remove will ignore remove requests.
Compositors must send this event once after creation of an zcosmic_workspace_handle_v1 . When the capabilities change, compositors must send this event again.
The capabilities are sent as an array of 32-bit unsigned integers in native endianness.
Remove
this workspace has been destroyed
This event means the zcosmic_workspace_handle_v1 has been destroyed. It is guaranteed there won’t be any more events for this zcosmic_workspace_handle_v1. The zext_workspace_handle_v1 becomes inert so any requests will be ignored except the destroy request.
TilingState
indicates if tiling behavior is enabled for this workspace
This event is emitted immediately after the zcosmic_workspace_handle_v1 is created and each time the workspace tiling state changes, either because of a compositor action or because of a request in this protocol.
Only available since version 2 of the interface
Fields
state: WEnum<TilingState>
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Event<'a>
impl<'a> RefUnwindSafe for Event<'a>
impl<'a> Send for Event<'a>
impl<'a> Sync for Event<'a>
impl<'a> Unpin for Event<'a>
impl<'a> UnwindSafe for Event<'a>
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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
.Source§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
.Source§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.Source§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.