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