[][src]Enum bracket_lib::prelude::BEvent

pub enum BEvent {
    Resized {
        new_size: Point,
        dpi_scale_factor: f32,
    },
    Moved {
        new_position: Point,
    },
    CloseRequested,
    Character {
        c: char,
    },
    Focused {
        focused: bool,
    },
    CursorEntered,
    CursorLeft,
    CursorMoved {
        position: Point,
    },
    MouseClick {
        button: usize,
        pressed: bool,
    },
    MouseButtonDown {
        button: usize,
    },
    MouseButtonUp {
        button: usize,
    },
    KeyboardInput {
        key: VirtualKeyCode,
        scan_code: u32,
        pressed: bool,
    },
    ScaleFactorChanged {
        new_size: Point,
        dpi_scale_factor: f32,
    },
}

Available device events

Variants

Resized

The window was resized

Fields of Resized

new_size: Pointdpi_scale_factor: f32
Moved

The window was moved

Fields of Moved

new_position: Point
CloseRequested

The window has requested that it be closed

Character

A character was input

Fields of Character

c: char
Focused

The window gained or lost focus

Fields of Focused

focused: bool
CursorEntered

The mouse cursor entered the window

CursorLeft

The mouse cursor left the window

CursorMoved

The mouse cursor moved

Fields of CursorMoved

position: Point
MouseClick

A mouse button was pressed or released

Fields of MouseClick

button: usizepressed: bool
MouseButtonDown

Mouse button is down

Fields of MouseButtonDown

button: usize
MouseButtonUp

Mouse button is up

Fields of MouseButtonUp

button: usize
KeyboardInput

A key on the keyboard was pressed or released.

Fields of KeyboardInput

key: VirtualKeyCodescan_code: u32pressed: bool
ScaleFactorChanged

The window's scale factor was changed. You generally don't need to do anything for this, unless you are working with pixel coordinates.

Fields of ScaleFactorChanged

new_size: Pointdpi_scale_factor: f32

Trait Implementations

impl Clone for BEvent[src]

impl Debug for BEvent[src]

impl PartialEq<BEvent> for BEvent[src]

impl StructuralPartialEq for BEvent[src]

Auto Trait Implementations

impl RefUnwindSafe for BEvent

impl Send for BEvent

impl Sync for BEvent

impl Unpin for BEvent

impl UnwindSafe for BEvent

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,