move lan-mouse protocol to separate crate (#178)

This commit is contained in:
Ferdinand Schober
2024-08-11 16:51:47 +02:00
committed by GitHub
parent fe06ca1fae
commit 19c2c4327f
28 changed files with 451 additions and 545 deletions

View File

@@ -195,9 +195,9 @@ impl InputEmulation {
}
let event = Event::Keyboard(KeyboardEvent::Modifiers {
mods_depressed: 0,
mods_latched: 0,
mods_locked: 0,
depressed: 0,
latched: 0,
locked: 0,
group: 0,
});
self.emulation.consume(event, handle).await?;

View File

@@ -213,7 +213,6 @@ impl<'a> Emulation for LibeiEmulation<'a> {
d.frame(self.serial.load(Ordering::SeqCst), now);
}
}
PointerEvent::Frame {} => {}
},
Event::Keyboard(k) => match k {
KeyboardEvent::Key {
@@ -235,7 +234,6 @@ impl<'a> Emulation for LibeiEmulation<'a> {
}
KeyboardEvent::Modifiers { .. } => {}
},
_ => {}
}
self.context
.flush()

View File

@@ -262,7 +262,6 @@ impl Emulation for MacOSEmulation {
};
event.post(CGEventTapLocation::HID);
}
PointerEvent::Frame { .. } => {}
},
Event::Keyboard(keyboard_event) => match keyboard_event {
KeyboardEvent::Key {
@@ -286,7 +285,6 @@ impl Emulation for MacOSEmulation {
}
KeyboardEvent::Modifiers { .. } => {}
},
_ => (),
}
// FIXME
Ok(())

View File

@@ -53,7 +53,6 @@ impl Emulation for WindowsEmulation {
value,
} => scroll(axis, value as i32),
PointerEvent::AxisDiscrete120 { axis, value } => scroll(axis, value),
PointerEvent::Frame {} => {}
},
Event::Keyboard(keyboard_event) => match keyboard_event {
KeyboardEvent::Key {
@@ -71,7 +70,6 @@ impl Emulation for WindowsEmulation {
}
KeyboardEvent::Modifiers { .. } => {}
},
_ => {}
}
// FIXME
Ok(())

View File

@@ -200,7 +200,6 @@ impl VirtualInput {
.axis_discrete(0, axis, value as f64 / 6., value / 120);
self.pointer.frame();
}
PointerEvent::Frame {} => self.pointer.frame(),
}
self.pointer.frame();
}
@@ -209,16 +208,15 @@ impl VirtualInput {
self.keyboard.key(time, key, state as u32);
}
KeyboardEvent::Modifiers {
mods_depressed,
mods_latched,
mods_locked,
depressed: mods_depressed,
latched: mods_latched,
locked: mods_locked,
group,
} => {
self.keyboard
.modifiers(mods_depressed, mods_latched, mods_locked, group);
}
},
_ => {}
}
Ok(())
}

View File

@@ -123,7 +123,6 @@ impl Emulation for X11Emulation {
PointerEvent::AxisDiscrete120 { axis, value } => {
self.emulate_scroll(axis, value as f64);
}
PointerEvent::Frame {} => {}
},
Event::Keyboard(KeyboardEvent::Key {
time: _,

View File

@@ -108,7 +108,6 @@ impl<'a> Emulation for DesktopPortalEmulation<'a> {
.notify_pointer_axis(&self.session, dx, dy, true)
.await?;
}
PointerEvent::Frame {} => {}
},
Keyboard(k) => {
match k {
@@ -130,7 +129,6 @@ impl<'a> Emulation for DesktopPortalEmulation<'a> {
}
}
}
_ => {}
}
Ok(())
}