Enum iced::window::Event

source ·
pub enum Event {
    Moved {
        x: i32,
        y: i32,
    },
    Resized {
        width: u32,
        height: u32,
    },
    RedrawRequested(Instant),
    CloseRequested,
    Focused,
    Unfocused,
    FileHovered(PathBuf),
    FileDropped(PathBuf),
    FilesHoveredLeft,
}
Expand description

A window-related event.

Variants§

§

Moved

Fields

§x: i32

The new logical x location of the window

§y: i32

The new logical y location of the window

A window was moved.

§

Resized

Fields

§width: u32

The new logical width of the window

§height: u32

The new logical height of the window

A window was resized.

§

RedrawRequested(Instant)

A window redraw was requested.

The Instant contains the current time.

§

CloseRequested

The user has requested for the window to close.

Usually, you will want to terminate the execution whenever this event occurs.

§

Focused

A window was focused.

§

Unfocused

A window was unfocused.

§

FileHovered(PathBuf)

A file is being hovered over the window.

When the user hovers multiple files at once, this event will be emitted for each file separately.

§

FileDropped(PathBuf)

A file has beend dropped into the window.

When the user drops multiple files at once, this event will be emitted for each file separately.

§

FilesHoveredLeft

A file was hovered, but has exited the window.

There will be a single FilesHoveredLeft event triggered even if multiple files were hovered.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Convert the source color to the destination color using the specified method
Convert the source color to the destination color using the bradford method by default
Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Convert into T with values clamped to the color defined bounds Read more
Convert into T. The resulting color might be invalid in its color space Read more
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more