[][src]Enum cat_engine::WindowEvent

pub enum WindowEvent {
    Update,
    RedrawRequested,
    CloseRequested,
    EventLoopClosed,
    Suspended,
    Resumed,
    Focused(bool),
    Resized([u32; 2]),
    Moved([i32; 2]),
    MouseMovementDelta([f32; 2]),
    MouseWheelScroll(MouseScrollDelta),
    MousePressed(MouseButton),
    MouseReleased(MouseButton),
    KeyboardPressed(KeyboardButton),
    KeyboardReleased(KeyboardButton),
    CharacterInput(char),
    ModifiersChanged(ModifiersState),
    DroppedFile(PathBuf),
    HoveredFile(PathBuf),
    HoveredFileCancelled,
}

Внешние события окна. Outer window events.

Variants

Update

feature != "lazy"

RedrawRequested

Кадр окна можно обновить.

The window should be redrawn.

CloseRequested

The window has been requested to close.

EventLoopClosed

Event loop has been stopped.

For the DefaultWindow means nothing, for the others means that a page (closure) will be closed.

Suspended

Приложение приостановлено.

Emitted when the application has been suspended.

Resumed

Приложение возобновлено.

Emitted when the application has been resumed.

Focused(bool)

Окно получило или потеряло фокус. True - получило, false - потеряло.

The window gained or lost focus. The parameter is true if the window has gained focus, and false if it has lost focus.

Resized([u32; 2])

Размера окна изменён. Содержит новый размер.

The size of the window has changed. Contains the client area's new dimensions.

Moved([i32; 2])

Окно сдвинуто. Содержит новую позицию.

The position of the window has changed. Contains the window's new position.

MouseMovementDelta([f32; 2])

Сдвиг мышки (сдвиг за пределы экрана игнорируется).

Mouse movement (moving beyond the window border is ignored).

MouseWheelScroll(MouseScrollDelta)

Describes a difference in the mouse scroll wheel state.

MousePressed(MouseButton)
MouseReleased(MouseButton)
KeyboardPressed(KeyboardButton)
KeyboardReleased(KeyboardButton)
CharacterInput(char)
ModifiersChanged(ModifiersState)

Состояние Shift, Ctrl, Alt или Logo изменено.

Shift, Ctrl, Alt or Logo state has been changed.

DroppedFile(PathBuf)

A file has been dropped into the window. When the user drops multiple files at once, this event will be emitted for each file separately.

feature = "file_drop"

HoveredFile(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.

feature = "file_drop"

HoveredFileCancelled

A file was hovered, but has exited the window. There will be a single HoveredFileCancelled event triggered even if multiple files were hovered.

feature = "file_drop"

Trait Implementations

impl Clone for WindowEvent[src]

impl Debug for WindowEvent[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.