mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-18 18:50:56 +03:00
capture backend can now be configured via the `capture_backend` cli argument / config entry
34 lines
865 B
Rust
34 lines
865 B
Rust
use crate::capture::error::MacOSInputCaptureCreationError;
|
|
use crate::capture::InputCapture;
|
|
use crate::client::{ClientEvent, ClientHandle};
|
|
use crate::event::Event;
|
|
use futures_core::Stream;
|
|
use std::task::{Context, Poll};
|
|
use std::{io, pin::Pin};
|
|
|
|
pub struct MacOSInputCapture;
|
|
|
|
impl MacOSInputCapture {
|
|
pub fn new() -> std::result::Result<Self, MacOSInputCaptureCreationError> {
|
|
Err(MacOSInputCaptureCreationError::NotImplemented)
|
|
}
|
|
}
|
|
|
|
impl Stream for MacOSInputCapture {
|
|
type Item = io::Result<(ClientHandle, Event)>;
|
|
|
|
fn poll_next(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
|
|
Poll::Pending
|
|
}
|
|
}
|
|
|
|
impl InputCapture for MacOSInputCapture {
|
|
fn notify(&mut self, _event: ClientEvent) -> io::Result<()> {
|
|
Ok(())
|
|
}
|
|
|
|
fn release(&mut self) -> io::Result<()> {
|
|
Ok(())
|
|
}
|
|
}
|