use crate::geometry::*;
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum GrinInput {
Resize(Point),
Key(KeyEvent),
Mouse(MouseEvent),
Raw(Vec<u8>),
}
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub struct MouseEvent {
pub position: Point,
pub action: MouseAction,
}
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum MouseAction {
PressLeft,
PressRight,
PressMiddle,
Release,
Drag,
WheelUp,
WheelDown,
}
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub struct KeyEvent {
pub key: Key,
pub ctrl: bool,
pub alt: bool,
}
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum Key {
Backspace,
Left,
Right,
Up,
Down,
Home,
End,
PageUp,
PageDown,
Delete,
Insert,
F(u8),
Char(char),
Null,
Esc,
Other(u8),
}