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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#[cfg(feature = "sdl2")]
mod sdl2;
#[cfg(feature = "sdl2")]
pub use self::sdl2::*;
#[cfg(feature = "rokol")]
mod rokol;
#[cfg(feature = "rokol")]
pub use self::rokol::*;
#[cfg(not(any(feature = "sdl2", feature = "rokol")))]
mod dummy {
pub type ExternalKey = u32;
pub type Event = ();
use crate::input::{
keyboard::{Key, Keyboard},
Input,
};
use std::collections::HashMap;
impl Input {
pub fn event(&mut self, _ev: &Event) {
unimplemented!()
}
pub fn on_end_frame(&mut self) {
unimplemented!()
}
}
pub fn key_translation() -> HashMap<ExternalKey, Key> {
unimplemented!()
}
impl Keyboard {
pub fn event(&mut self, _ev: &Event) {
unimplemented!()
}
}
}
#[cfg(not(any(feature = "sdl2", feature = "rokol")))]
pub use dummy::*;