Crate input [−] [src]
A flexible structure for user interactions to be used in window frameworks and widgets libraries.
Reexports
pub use mouse::MouseButton; |
pub use keyboard::Key; |
pub use joystick::{JoystickAxisArgs, JoystickButton}; |
pub use generic_event::GenericEvent; |
pub use mouse::{MouseCursorEvent, MouseRelativeEvent, MouseScrollEvent}; |
pub use joystick::{JoystickAxisEvent}; |
Modules
generic_event |
Trait for generic events |
joystick |
Back-end agnostic joystick events. |
keyboard |
Back-end agnostic keyboard keys. |
mouse |
Back-end agnostic mouse buttons. |
Structs
AfterRenderArgs |
After render arguments. |
EventId |
Used to identify events arguments provided by traits. |
IdleArgs |
Idle arguments, such as expected idle time in seconds. |
RenderArgs |
Render arguments |
UpdateArgs |
Update arguments, such as delta time in seconds |
Enums
Button |
Models different kinds of buttons. |
Event |
Adds render and update events to input events |
Input |
Models input events. |
Motion |
Models different kinds of motion. |
Traits
AfterRenderEvent |
After rendering and buffers are swapped. |
CursorEvent |
When window gets or loses cursor |
FocusEvent |
When window gets or loses focus |
IdleEvent |
When background tasks should be performed |
PressEvent |
The press of a button |
ReleaseEvent |
The release of a button |
RenderEvent |
When the next frame should be rendered |
ResizeEvent |
When the window is resized |
TextEvent |
When receiving text from user, such as typing a character |
UpdateEvent |
When the application state should be updated |