mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-16 16:41:28 +03:00
fix windows
This commit is contained in:
@@ -20,6 +20,8 @@ pub enum EmulationCreationError {
|
|||||||
X11(#[from] X11EmulationCreationError),
|
X11(#[from] X11EmulationCreationError),
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
MacOs(#[from] MacOSEmulationCreationError),
|
MacOs(#[from] MacOSEmulationCreationError),
|
||||||
|
#[cfg(windows)]
|
||||||
|
Windows(#[from] WindowsEmulationCreationError),
|
||||||
NoAvailableBackend,
|
NoAvailableBackend,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,6 +38,8 @@ impl Display for EmulationCreationError {
|
|||||||
EmulationCreationError::X11(e) => format!("x11 backend: {e}"),
|
EmulationCreationError::X11(e) => format!("x11 backend: {e}"),
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
EmulationCreationError::MacOs(e) => format!("macos backend: {e}"),
|
EmulationCreationError::MacOs(e) => format!("macos backend: {e}"),
|
||||||
|
#[cfg(windows)]
|
||||||
|
EmulationCreationError::Windows(e) => format!("windows backend: {e}"),
|
||||||
EmulationCreationError::NoAvailableBackend => "no backend available".to_string(),
|
EmulationCreationError::NoAvailableBackend => "no backend available".to_string(),
|
||||||
};
|
};
|
||||||
write!(f, "could not create input emulation backend: {reason}")
|
write!(f, "could not create input emulation backend: {reason}")
|
||||||
@@ -158,3 +162,7 @@ impl Display for MacOSEmulationCreationError {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(windows)]
|
||||||
|
#[derive(Debug, Error)]
|
||||||
|
pub enum WindowsEmulationCreationError {}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
|
use super::error::WindowsEmulationCreationError;
|
||||||
use crate::{
|
use crate::{
|
||||||
emulate::InputEmulation,
|
emulate::InputEmulation,
|
||||||
event::{KeyboardEvent, PointerEvent},
|
event::{KeyboardEvent, PointerEvent},
|
||||||
scancode,
|
scancode,
|
||||||
};
|
};
|
||||||
use anyhow::Result;
|
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use std::ops::BitOrAssign;
|
use std::ops::BitOrAssign;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
@@ -33,7 +33,7 @@ pub struct WindowsEmulation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl WindowsEmulation {
|
impl WindowsEmulation {
|
||||||
pub fn new() -> Result<Self> {
|
pub fn new() -> Result<Self, WindowsEmulationCreationError> {
|
||||||
Ok(Self { repeat_task: None })
|
Ok(Self { repeat_task: None })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user