1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
use super::*; /// Represents an input event which occurred as a result of a buffer resize. #[derive(Clone, Copy, Debug, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub struct ResizeEvent { /// The size of the screen buffer. pub size: Vector2<u16>, } impl ResizeEvent { /** Returns an empty ResizeEvent. */ pub fn new() -> ResizeEvent { ResizeEvent { size: Vector2::new(0, 0), } } } impl Into<InputEvent> for ResizeEvent { fn into(self) -> InputEvent { InputEvent::Resize(self) } }