Enum winctx::Event

source ·
#[non_exhaustive]
pub enum Event { Shutdown {}, MenuItemClicked { item_id: ItemId, event: MouseEvent, }, IconClicked { area_id: AreaId, event: MouseEvent, }, NotificationClicked { area_id: AreaId, id: NotificationId, event: MouseEvent, }, NotificationDismissed { area_id: AreaId, id: NotificationId, }, Clipboard { event: ClipboardEvent, }, CopyData { ty: usize, data: Vec<u8>, }, Error { error: Error, }, }
Expand description

An event emitted by the event loop.

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

Shutdown

Window has been shut down.

§

MenuItemClicked

Fields

§item_id: ItemId

The item that was clicked.

§event: MouseEvent

The generated event.

The menu item identified by ItemId has been clicked.

§

IconClicked

Fields

§area_id: AreaId

The area that was clicked.

§event: MouseEvent

The generated event.

An icon has been clicked.

§

NotificationClicked

Fields

§area_id: AreaId

The area the notification belonged to.

§id: NotificationId

The identifier of the notification.

§event: MouseEvent

The generated event.

Indicates that the notification with the associated token has been clicked.

§

NotificationDismissed

Fields

§area_id: AreaId

The area from which the dismissed notification originated.

§id: NotificationId

The identifier of the dismissed notification.

The notification associated with the given token either timed out or was dismissed.

§

Clipboard

Fields

§event: ClipboardEvent

The generated clipboard event.

The system clipboard has been modified.

§

CopyData

Fields

§ty: usize

The type parameter passed when sending the data.

§data: Vec<u8>

The data.

Data was copied to the current process remotely using Window::copy_data.

§

Error

Fields

§error: Error

The reported error.

A non-fatal error has been reported.

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