mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-11 15:20:54 +03:00
* Propose an explicit .rustfnt.toml Use 2024 style, 4 spaces for tabs and epand the default width a tad * Auto-format the existing code with new rules
45 lines
1.0 KiB
Rust
45 lines
1.0 KiB
Rust
use std::task::Poll;
|
|
|
|
use async_trait::async_trait;
|
|
use futures_core::Stream;
|
|
|
|
use super::{Capture, CaptureError, CaptureEvent, Position, error::X11InputCaptureCreationError};
|
|
|
|
pub struct X11InputCapture {}
|
|
|
|
impl X11InputCapture {
|
|
pub fn new() -> std::result::Result<Self, X11InputCaptureCreationError> {
|
|
Err(X11InputCaptureCreationError::NotImplemented)
|
|
}
|
|
}
|
|
|
|
#[async_trait]
|
|
impl Capture for X11InputCapture {
|
|
async fn create(&mut self, _pos: Position) -> Result<(), CaptureError> {
|
|
Ok(())
|
|
}
|
|
|
|
async fn destroy(&mut self, _pos: Position) -> Result<(), CaptureError> {
|
|
Ok(())
|
|
}
|
|
|
|
async fn release(&mut self) -> Result<(), CaptureError> {
|
|
Ok(())
|
|
}
|
|
|
|
async fn terminate(&mut self) -> Result<(), CaptureError> {
|
|
Ok(())
|
|
}
|
|
}
|
|
|
|
impl Stream for X11InputCapture {
|
|
type Item = Result<(Position, CaptureEvent), CaptureError>;
|
|
|
|
fn poll_next(
|
|
self: std::pin::Pin<&mut Self>,
|
|
_cx: &mut std::task::Context<'_>,
|
|
) -> std::task::Poll<Option<Self::Item>> {
|
|
Poll::Pending
|
|
}
|
|
}
|