[][src]Enum blinds::event::Event

#[non_exhaustive]pub enum Event {
    Resized(ResizedEvent),
    ScaleFactorChanged(ScaleFactorChangedEvent),
    FocusChanged(FocusChangedEvent),
    ReceivedCharacter(ReceivedCharacterEvent),
    KeyboardInput(KeyboardEvent),
    PointerEntered(PointerEnteredEvent),
    PointerLeft(PointerLeftEvent),
    PointerMoved(PointerMovedEvent),
    PointerInput(PointerInputEvent),
    ScrollInput(ScrollDelta),
    ModifiersChanged(ModifiersChangedEvent),
    GamepadConnected(GamepadConnectedEvent),
    GamepadDisconnected(GamepadDisconnectedEvent),
    GamepadButton(GamepadButtonEvent),
    GamepadAxis(GamepadAxisEvent),
}

An indicator something has changed or input has been dispatched

Variants (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.
Resized(ResizedEvent)

The size of the window has changed, see Window::size

ScaleFactorChanged(ScaleFactorChangedEvent)

The scale factor of the window has changed, see Window::scale_factor

FocusChanged(FocusChangedEvent)

The window has gained operating system focus (true), or lost it (false)

ReceivedCharacter(ReceivedCharacterEvent)

The user typed a character, used for text input

Don't use keyboard events for text! Depending on how the user's operating system and keyboard layout are configured, different keys may produce different Unicode characters.

KeyboardInput(KeyboardEvent)

A key has been pressed, released, or held down

Operating systems often have key repeat settings that cause duplicate events to be generated for a single press.

PointerEntered(PointerEnteredEvent)

A pointer entered the window

PointerLeft(PointerLeftEvent)

A pointer has exited the window

PointerMoved(PointerMovedEvent)

A pointer has a new position, relative to the window's top-left

PointerInput(PointerInputEvent)

A button on a pointer, likely a mouse, has produced an input

ScrollInput(ScrollDelta)

The mousewheel has scrolled, either in lines or pixels (depending on the input method)

ModifiersChanged(ModifiersChangedEvent)

The keyboard modifiers (e.g. shift, alt, ctrl) have changed

GamepadConnected(GamepadConnectedEvent)

A gamepad has been connected

GamepadDisconnected(GamepadDisconnectedEvent)

A gamepad has been disconnected

GamepadButton(GamepadButtonEvent)

A gamepad button has been pressed or released

GamepadAxis(GamepadAxisEvent)

A gamepad axis has changed its value

Trait Implementations

impl Clone for Event[src]

impl Debug for Event[src]

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

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