pub struct ZcosmicWorkspaceHandleV1 { /* private fields */ }
Expand description
a workspace handing a group of surfaces
A zcosmic_workspace_handle_v1 object represents a a workspace that handles a group of surfaces.
Each workspace has a name, conveyed to the client with the name event; a list of states, conveyed to the client with the state event; and optionally a set of coordinates, conveyed to the client with the coordinates event. The client may request that the compositor activate or deactivate the workspace.
Each workspace can belong to only a single workspace group. Depepending on the compositor policy, there might be workspaces with the same name in different workspace groups, but these workspaces are still separate (e.g. one of them might be active while the other is not).
See also the Request enum for this interface.
Implementations§
Source§impl ZcosmicWorkspaceHandleV1
impl ZcosmicWorkspaceHandleV1
Sourcepub fn name(&self, name: String)
pub fn name(&self, name: String)
workspace name changed
This event is emitted immediately after the zcosmic_workspace_handle_v1 is created and whenever the name of the workspace changes.
Sourcepub fn coordinates(&self, coordinates: Vec<u8>)
pub fn coordinates(&self, coordinates: Vec<u8>)
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.
Sourcepub fn state(&self, state: Vec<u8>)
pub fn state(&self, state: Vec<u8>)
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.
Sourcepub fn capabilities(&self, capabilities: Vec<u8>)
pub fn capabilities(&self, capabilities: Vec<u8>)
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.
Sourcepub fn remove(&self)
pub fn remove(&self)
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.
Sourcepub fn tiling_state(&self, state: TilingState)
pub fn tiling_state(&self, state: 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.
Trait Implementations§
Source§impl Borrow<ObjectId> for ZcosmicWorkspaceHandleV1
impl Borrow<ObjectId> for ZcosmicWorkspaceHandleV1
Source§impl Clone for ZcosmicWorkspaceHandleV1
impl Clone for ZcosmicWorkspaceHandleV1
Source§fn clone(&self) -> ZcosmicWorkspaceHandleV1
fn clone(&self) -> ZcosmicWorkspaceHandleV1
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ZcosmicWorkspaceHandleV1
impl Debug for ZcosmicWorkspaceHandleV1
Source§impl Hash for ZcosmicWorkspaceHandleV1
impl Hash for ZcosmicWorkspaceHandleV1
Source§impl PartialEq<Weak<ZcosmicWorkspaceHandleV1>> for ZcosmicWorkspaceHandleV1
impl PartialEq<Weak<ZcosmicWorkspaceHandleV1>> for ZcosmicWorkspaceHandleV1
Source§impl PartialEq for ZcosmicWorkspaceHandleV1
impl PartialEq for ZcosmicWorkspaceHandleV1
Source§impl Resource for ZcosmicWorkspaceHandleV1
impl Resource for ZcosmicWorkspaceHandleV1
Source§fn object_data(&self) -> Option<&Arc<dyn Any + Send + Sync>>
fn object_data(&self) -> Option<&Arc<dyn Any + Send + Sync>>
Source§fn handle(&self) -> &WeakHandle
fn handle(&self) -> &WeakHandle
Source§fn from_id(conn: &DisplayHandle, id: ObjectId) -> Result<Self, InvalidId>
fn from_id(conn: &DisplayHandle, id: ObjectId) -> Result<Self, InvalidId>
Source§fn send_event(&self, evt: Self::Event<'_>) -> Result<(), InvalidId>
fn send_event(&self, evt: Self::Event<'_>) -> Result<(), InvalidId>
Source§fn parse_request(
conn: &DisplayHandle,
msg: Message<ObjectId, OwnedFd>,
) -> Result<(Self, Self::Request), DispatchError>
fn parse_request( conn: &DisplayHandle, msg: Message<ObjectId, OwnedFd>, ) -> Result<(Self, Self::Request), DispatchError>
Source§fn write_event<'a>(
&self,
conn: &DisplayHandle,
msg: Self::Event<'a>,
) -> Result<Message<ObjectId, BorrowedFd<'a>>, InvalidId>
fn write_event<'a>( &self, conn: &DisplayHandle, msg: Self::Event<'a>, ) -> Result<Message<ObjectId, BorrowedFd<'a>>, InvalidId>
Source§fn is_alive(&self) -> bool
fn is_alive(&self) -> bool
impl Eq for ZcosmicWorkspaceHandleV1
Auto Trait Implementations§
impl Freeze for ZcosmicWorkspaceHandleV1
impl !RefUnwindSafe for ZcosmicWorkspaceHandleV1
impl Send for ZcosmicWorkspaceHandleV1
impl Sync for ZcosmicWorkspaceHandleV1
impl Unpin for ZcosmicWorkspaceHandleV1
impl !UnwindSafe for ZcosmicWorkspaceHandleV1
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.