#[non_exhaustive]pub enum Event<'a> {
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
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.
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.
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.
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.
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.
Fields
workspace: ZcosmicWorkspaceHandleV1
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.
Fields
workspace: ZcosmicWorkspaceHandleV1
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.
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
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
workspace: ExtWorkspaceHandleV1
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
workspace: ExtWorkspaceHandleV1
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.