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
31
32
33
#[cfg(feature = "desktop_gl")]
mod glutin;
#[cfg(feature = "desktop_gl")]
pub use self::glutin::GlutinInput as input_impl;
#[cfg(feature = "raspberry_pi")]
mod pi;
#[cfg(feature = "raspberry_pi")]
pub use self::pi::PiInput as input_impl;
use crate::render::Drawer;
pub trait Input {
type Window: Drawer;
fn update(&mut self, drawer: &mut Self::Window);
fn is_mouse_down(&self) -> bool;
fn get_mouse_pos(&self) -> (usize, usize);
fn do_continue(&self) -> bool;
fn new() -> Self;
}