#[non_exhaustive]
pub enum Event<'a> { Id { id: String, }, Name { name: String, }, Coordinates { coordinates: Vec<u8>, }, State { state: WEnum<State>, }, Capabilities { capabilities: WEnum<WorkspaceCapabilities>, }, Removed, }

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Id

workspace id

If this event is emitted, it will be send immediately after the ext_workspace_handle_v1 is created or when an id is assigned to a workspace (at most once during it’s lifetime).

An id will never change during the lifetime of the ext_workspace_handle_v1 and is guaranteed to be unique during it’s lifetime.

Ids are not human-readable and shouldn’t be displayed, use name for that purpose.

Compositors are expected to only send ids for workspaces likely stable across multiple sessions and can be used by clients to store preferences for workspaces. Workspaces without ids should be considered temporary and any data associated with them should be deleted once the respective object is lost.

Fields

§

Name

workspace name changed

This event is emitted immediately after the ext_workspace_handle_v1 is created and whenever the name of the workspace changes.

A name is meant to be human-readable and can be displayed to a user. Unlike the id it is neither stable nor unique.

Fields

§name: String
§

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 ext_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.

Fields

§coordinates: Vec<u8>
§

State

the state of the workspace changed

This event is emitted immediately after the ext_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.

Missing states convey the opposite meaning, e.g. an unset active bit means the workspace is currently inactive.

Fields

§state: WEnum<State>
§

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 ext_workspace_handle_v1 . When the capabilities change, compositors must send this event again.

Fields

§capabilities: WEnum<WorkspaceCapabilities>

capabilities

§

Removed

this workspace has been removed

This event is send when the workspace associated with the ext_workspace_handle_v1 has been removed. After sending this request, the compositor will immediately consider the object inert. Any requests will be ignored except the destroy request.

It is guaranteed there won’t be any more events referencing this ext_workspace_handle_v1.

The compositor must only remove a workspaces not currently belonging to any workspace_group.

Implementations§

source§

impl<'a> Event<'a>

source

pub fn opcode(&self) -> u16

Get the opcode number of this message

Trait Implementations§

source§

impl<'a> Debug for Event<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast for T
where T: 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>

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)

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)

Convert &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
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.