14 lines
292 B
Rust
14 lines
292 B
Rust
|
#[cfg(target_os = "windows")]
|
||
|
mod windows;
|
||
|
|
||
|
use std::sync::mpsc;
|
||
|
|
||
|
pub trait KeyboardBackend {
|
||
|
fn initialize(&self);
|
||
|
fn start(&self);
|
||
|
}
|
||
|
|
||
|
#[cfg(target_os = "windows")]
|
||
|
pub fn get_backend(sender: mpsc::Sender<char>) -> impl KeyboardBackend{
|
||
|
windows::WindowsKeyboardBackend{sender }
|
||
|
}
|