#[non_exhaustive]
pub enum Event {
Show 17 variants TitleChanged { title: String, }, AppIdChanged { app_id: String, }, StateChanged { flags: u32, }, VirtualDesktopChanged { number: i32, }, ThemedIconNameChanged { name: String, }, Unmapped, InitialState, ParentWindow { parent: Option<OrgKdePlasmaWindow>, }, Geometry { x: i32, y: i32, width: u32, height: u32, }, IconChanged, PidChanged { pid: u32, }, VirtualDesktopEntered { id: String, }, VirtualDesktopLeft { is: String, }, ApplicationMenu { service_name: String, object_path: String, }, ActivityEntered { id: String, }, ActivityLeft { id: String, }, ResourceNameChanged { resource_name: String, },
}

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

TitleChanged

window title has been changed

This event will be sent as soon as the window title is changed.

Fields

§title: String

window title

§

AppIdChanged

application identifier has been changed

This event will be sent as soon as the application identifier is changed.

Fields

§app_id: String
§

StateChanged

window state has been changed

This event will be sent as soon as the window state changes.

Values for state argument are described by org_kde_plasma_window_management.state.

Fields

§flags: u32

bitfield of state flags

§

VirtualDesktopChanged

window was moved to another workspace

DEPRECATED: use virtual_desktop_entered and virtual_desktop_left instead This event will be sent when a window is moved to another virtual desktop.

It is not sent if it becomes visible on all virtual desktops though.

Fields

§number: i32

zero based virtual desktop number

§

ThemedIconNameChanged

window’s icon name changed

This event will be sent whenever the themed icon name changes. May be null.

Fields

§name: String

the new themed icon name

§

Unmapped

window’s surface was unmapped

This event will be sent immediately after the window is closed and its surface is unmapped.

§

InitialState

All initial known state is submitted

This event will be sent immediately after all initial state been sent to the client. If the Plasma window is already unmapped, the unmapped event will be sent before the initial_state event.

Only available since version 4 of the interface

§

ParentWindow

The parent window changed

This event will be sent whenever the parent window of this org_kde_plasma_window changes. The passed parent is another org_kde_plasma_window and this org_kde_plasma_window is a transient window to the parent window. If the parent argument is null, this org_kde_plasma_window does not have a parent window.

Only available since version 5 of the interface

Fields

§parent: Option<OrgKdePlasmaWindow>

The parent window

§

Geometry

The geometry of this window in absolute coordinates

This event will be sent whenever the window geometry of this org_kde_plasma_window changes. The coordinates are in absolute coordinates of the windowing system.

Only available since version 6 of the interface

Fields

§x: i32

x position of the org_kde_plasma_window

§y: i32

y position of the org_kde_plasma_window

§width: u32

width of the org_kde_plasma_window

§height: u32

height of the org_kde_plasma_window

§

IconChanged

The icon of the window changed

This event will be sent whenever the icon of the window changes, but there is no themed icon name. Common examples are Xwayland windows which have a pixmap based icon.

The client can request the icon using get_icon.

Only available since version 7 of the interface

§

PidChanged

process id of application owning the window has changed

This event will be sent when the compositor has set the process id this window belongs to. This should be set once before the initial_state is sent.

Fields

§pid: u32

process id

§

VirtualDesktopEntered

the window entered a new virtual desktop

This event will be sent when the window has entered a new virtual desktop. The window can be on more than one desktop, or none: then is considered on all of them.

Only available since version 8 of the interface

Fields

§id: String

desktop id

§

VirtualDesktopLeft

the window left a virtual desktop

This event will be sent when the window left a virtual desktop. If the window leaves all desktops, it can be considered on all. If the window gets manually added on all desktops, the server has to send virtual_desktop_left for every previous desktop it was in for the window to be really considered on all desktops.

Only available since version 8 of the interface

Fields

§is: String

desktop id

§

ApplicationMenu

notify the client that the current appmenu changed

This event will be sent after the application menu for the window has changed.

Only available since version 10 of the interface

Fields

§service_name: String
§object_path: String
§

ActivityEntered

the window entered an activity

This event will be sent when the window has entered an activity. The window can be on more than one activity, or none: then is considered on all of them.

Only available since version 14 of the interface

Fields

§id: String

activity id

§

ActivityLeft

the window left an activity

This event will be sent when the window left an activity. If the window leaves all activities, it will be considered on all. If the window gets manually added on all activities, the server has to send activity_left for every previous activity it was in for the window to be really considered on all activities.

Only available since version 14 of the interface

Fields

§id: String

activity id

§

ResourceNameChanged

X11 resource name has changed

This event will be sent when the X11 resource name of the window has changed. This is only set for XWayland windows.

Only available since version 16 of the interface

Fields

§resource_name: String

resource name

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>,

§

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>,

§

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.