ragnarok/
source.rs

1use crate::{
2    CursorPoint,
3    NameOfEvent,
4};
5
6pub trait SourceEvent: Clone + PartialEq {
7    type Name: NameOfEvent;
8
9    fn is_pressed(&self) -> bool;
10    fn is_moved(&self) -> bool;
11
12    fn try_location(&self) -> Option<CursorPoint>;
13
14    fn as_event_name(&self) -> Self::Name;
15}