Crate input[][src]

Expand description

A flexible structure for user interactions to be used in window frameworks and widgets libraries.


pub use controller::ControllerAxisArgs;
pub use controller::ControllerButton;
pub use controller::ControllerHat;
pub use keyboard::Key;
pub use mouse::MouseButton;
pub use controller::ControllerAxisEvent;
pub use generic_event::GenericEvent;
pub use mouse::MouseCursorEvent;
pub use mouse::MouseRelativeEvent;
pub use mouse::MouseScrollEvent;


Back-end agnostic controller events.

Event identifiers.

Trait for generic events

Back-end agnostic keyboard keys.

Back-end agnostic mouse buttons.


After render arguments.

Button arguments.

Close arguments.

Idle arguments, such as expected idle time in seconds.

Render arguments.

Resize arguments.

Touch arguments

Update arguments, such as delta time in seconds.


Models different kinds of buttons.

Stores button state.

Models all events.

Models dragging and dropping files.

Stores controller hat state.

Models input events.

Models loop events.

Models different kinds of motion.

Stores the touch state.


After rendering and buffers are swapped.

Changed button state.

Window is closing.

When window gets or loses cursor.

When window gets or loses focus.

When background tasks should be performed.

The press of a button.

The release of a button.

When the next frame should be rendered.

When the window is resized.

When receiving text from user, such as typing a character.

When a touch is started, moved, ended or cancelled.

When the application state should be updated.

Type Definitions

The type of time stamp.