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
27
28
29
30
use crate::event::key::Key;
use crate::event::destination::SDLDestination;
use super::*;

pub mod imp;
pub mod destination;
pub mod consuming;
pub mod position;
pub mod key;
pub mod cast;

#[derive(Clone)]
pub struct Event {
    pub e: SDLEvent,
    ws: (f32,f32),
}

impl Deref for Event {
    type Target = SDLEvent;

    fn deref(&self) -> &Self::Target {
        &self.e
    }
}

impl DerefMut for Event {
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.e
    }
}