compile win & macos

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou committed 2022-11-25 19:28:43 +08:00
1 parent 87306a3d01
commit fff6aad1c5
2 files changed
+32

No files matched your search

+16
View File
@@ -105,6 +105,14 @@ fn get_error() -> String {
}
impl MouseControllable for Enigo {
fn as_any(&self) -> &dyn std::any::Any {
self
}
fn as_mut_any(&mut self) -> &mut dyn std::any::Any {
self
}
fn mouse_move_to(&mut self, x: i32, y: i32) {
mouse_event(
MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_VIRTUALDESK,
@@ -170,6 +178,14 @@ impl MouseControllable for Enigo {
}
impl KeyboardControllable for Enigo {
fn as_any(&self) -> &dyn std::any::Any {
self
}
fn as_mut_any(&mut self) -> &mut dyn std::any::Any {
self
}
fn key_sequence(&mut self, sequence: &str) {
let mut buffer = [0; 2];