#[non_exhaustive]
pub enum Event { Closed, Done, Title { title: String, }, AppId { app_id: String, }, OutputEnter { output: WlOutput, }, OutputLeave { output: WlOutput, }, WorkspaceEnter { workspace: ZcosmicWorkspaceHandleV1, }, WorkspaceLeave { workspace: ZcosmicWorkspaceHandleV1, }, State { state: Vec<u8>, }, Geometry { output: WlOutput, x: i32, y: i32, width: i32, height: i32, }, ExtWorkspaceEnter { workspace: ExtWorkspaceHandleV1, }, ExtWorkspaceLeave { workspace: ExtWorkspaceHandleV1, }, }

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

Closed

the toplevel has been closed

The server will emit no further events on the zcosmic_toplevel_handle_v1 after this event. Any requests received aside from the destroy request will be ignored. Upon receiving this event, the client should make the destroy request to allow freeing of resources.

Note: This event will not be emitted for clients binding version 2 of this protocol, as ext_foreign_toplevel_handle_v1.closed is equivalent.

§

Done

all information about the toplevel has been sent

This event is sent after all changes in the toplevel state have been sent.

This allows changes to the zcosmic_toplevel_handle_v1 properties to be seen as atomic, even if they happen via multiple events.

Note: this is is not sent after the closed event.

Note: This event will not be emitted for clients binding version 2 of this protocol, as ext_foreign_toplevel_handle_v1.done is equivalent.

§

Title

title change

This event is emitted whenever the title of the toplevel changes.

Note: This event will not be emitted for clients binding version 2 of this protocol, as ext_foreign_toplevel_handle_v1.title is equivalent.

Fields

§title: String
§

AppId

app_id change

This event is emitted whenever the app_id of the toplevel changes.

Note: This event will not be emitted for clients binding version 2 of this protocol, as ext_foreign_toplevel_handle_v1.app_id is equivalent.

Fields

§app_id: String
§

OutputEnter

toplevel entered an output

This event is emitted whenever the toplevel becomes visible on the given output. A toplevel may be visible on multiple outputs.

Fields

§output: WlOutput
§

OutputLeave

toplevel left an output

This event is emitted whenever the toplevel is no longer visible on a given output. It is guaranteed that an output_enter event with the same output has been emitted before this event.

Fields

§output: WlOutput
§

WorkspaceEnter

toplevel entered an workspace

This event is emitted whenever the toplevel becomes visible on the given workspace. A toplevel may be visible on multiple workspaces.

§

WorkspaceLeave

toplevel left an workspace

This event is emitted whenever the toplevel is no longer visible on a given workspace. It is guaranteed that an workspace_enter event with the same workspace has been emitted before this event.

§

State

the toplevel state changed

This event is emitted once on creation of the zcosmic_toplevel_handle_v1 and again whenever the state of the toplevel changes.

Fields

§state: Vec<u8>
§

Geometry

the toplevel’s position and/or size has changed

Emitted when the geometry of a toplevel (it’s position and/or size) relative to the provided output has changed.

This event is emitted once on creation of the zcosmic_toplevel_handle_v1 for every entered output and again whenever the geometry of the toplevel changes relative to any output.

Only available since version 2 of the interface

Fields

§output: WlOutput
§x: i32

x coordinate of the upper-left corner

§y: i32

y coordinate of the upper-left corner

§width: i32

width of the toplevel

§height: i32

height of the toplevel

§

ExtWorkspaceEnter

toplevel entered an workspace

This event is emitted whenever the toplevel becomes visible on the given workspace. A toplevel may be visible on multiple workspaces.

Only available since version 3 of the interface

Fields

§

ExtWorkspaceLeave

toplevel left an workspace

This event is emitted whenever the toplevel is no longer visible on a given workspace. It is guaranteed that an workspace_enter event with the same workspace has been emitted before this event.

Only available since version 3 of the interface

Fields

Implementations§

Source§

impl Event

Source

pub fn opcode(&self) -> u16

Get the opcode number of this message

Trait Implementations§

Source§

impl Debug for Event

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Event

§

impl !RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl !UnwindSafe for Event

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
Source§

impl<T> Downcast for T
where T: Any,

Source§

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.
Source§

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.
Source§

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.
Source§

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.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

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.