pub enum WindowEvent {
Show 22 variants RedrawRequested(WindowRedrawRequestedEvent), Resized(WindowResizedEvent), Moved(WindowMovedEvent), CloseRequested(WindowCloseRequestedEvent), Destroyed(WindowDestroyedEvent), DroppedFile(WindowDroppedFileEvent), HoveredFile(WindowHoveredFileEvent), HoveredFileCancelled(WindowHoveredFileCancelledEvent), FocusGained(WindowFocusGainedEvent), FocusLost(WindowFocusLostEvent), KeyboardInput(WindowKeyboardInputEvent), TextInput(WindowTextInputEvent), MouseEnter(WindowMouseEnterEvent), MouseLeave(WindowMouseLeaveEvent), MouseMove(WindowMouseMoveEvent), MouseButton(WindowMouseButtonEvent), MouseWheel(WindowMouseWheelEvent), AxisMotion(WindowAxisMotionEvent), TouchpadPressure(WindowTouchpadPressureEvent), Touch(WindowTouchEvent), ScaleFactorChanged(WindowScaleFactorChangedEvent), ThemeChanged(WindowThemeChangedEvent),
}
Expand description

Window event.

Variants

RedrawRequested(WindowRedrawRequestedEvent)

A redraw was requested by the OS or application code.

Resized(WindowResizedEvent)

A window was resized.

Moved(WindowMovedEvent)

A window was moved.

CloseRequested(WindowCloseRequestedEvent)

A window was closed.

Destroyed(WindowDestroyedEvent)

A window was destroyed.

DroppedFile(WindowDroppedFileEvent)

A file was dropped on a window.

HoveredFile(WindowHoveredFileEvent)

A file is being hovered over a window.

HoveredFileCancelled(WindowHoveredFileCancelledEvent)

A file that was being hovered over a window was canceled..

FocusGained(WindowFocusGainedEvent)

A window gained input focus.

FocusLost(WindowFocusLostEvent)

A window lost input focus.

KeyboardInput(WindowKeyboardInputEvent)

A window received keyboard input.

TextInput(WindowTextInputEvent)

A window received text input.

MouseEnter(WindowMouseEnterEvent)

The mouse cursor entered a window.

MouseLeave(WindowMouseLeaveEvent)

The mouse cursor left a window.

MouseMove(WindowMouseMoveEvent)

The mouse cursor was moved on a window.

MouseButton(WindowMouseButtonEvent)

A mouse button was pressed or released on a window.

MouseWheel(WindowMouseWheelEvent)

A window received mouse wheel input.

AxisMotion(WindowAxisMotionEvent)

A window received axis motion input.

TouchpadPressure(WindowTouchpadPressureEvent)

A window received touchpad pressure input.

Touch(WindowTouchEvent)

A window received touch input.

ScaleFactorChanged(WindowScaleFactorChangedEvent)

The scale factor between logical and physical pixels for a window changed.

ThemeChanged(WindowThemeChangedEvent)

The theme for a window changed.

Implementations

Get the window ID of the event.

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

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.