[−][src]Enum turtle::event::Event
Possible events returned from Drawing::poll_event()
.
Events are used to make programs more interactive. See that method's documentation for more information about how to use events.
This type is meant to provide a simplified model of piston_window
's Event
type.
Variants
KeyPressed(Key)
Sent when a keyboard key is pressed
KeyReleased(Key)
Sent when a keyboard key is released
MouseButtonPressed(MouseButton)
Sent when a mouse button is pressed
MouseButtonReleased(MouseButton)
Sent when a mouse button is released
ControllerButtonPressed(ControllerButton)
Sent when a controller button is pressed
ControllerButtonReleased(ControllerButton)
Sent when a controller button is released
ControllerAxisChange(ControllerAxis)
Sent when a controller axis (usually a joystick) is changed
Sent when the mouse is moving. Only sent when the mouse is over the window.
x
and y
represent the new coordinates of where the mouse is currently.
Coordinates are relative to the center of the window.
Sent when the mouse is scrolled. Only sent when the mouse is over the window.
x
and y
are in scroll ticks.
Touch(Touch)
Sent when a user touches the screen
Sent when the window gets resized
WindowFocused(bool)
Sent when the window focus changes
The boolean value is true if the window is in focus.
WindowCursor(bool)
Sent when the window gains or loses the cursor.
The boolean value is true if the window gained the cursor.
Sent when the window is closed
Trait Implementations
impl Clone for Event
[src]
impl Copy for Event
[src]
impl PartialEq<Event> for Event
[src]
impl Debug for Event
[src]
impl StructuralPartialEq for Event
[src]
impl Serialize for Event
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Event
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
impl RefUnwindSafe for Event
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,