summaryrefslogtreecommitdiffstats
path: root/input-emulation/src/dummy.rs
blob: f07763997f2272cc26fef12e49f33c60e7847ce0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use async_trait::async_trait;
use input_event::Event;

use super::{EmulationHandle, InputEmulation};

#[derive(Default)]
pub struct DummyEmulation;

impl DummyEmulation {
    pub fn new() -> Self {
        Self {}
    }
}

#[async_trait]
impl InputEmulation for DummyEmulation {
    async fn consume(&mut self, event: Event, client_handle: EmulationHandle) {
        log::info!("received event: ({client_handle}) {event}");
    }
    async fn create(&mut self, _: EmulationHandle) {}
    async fn destroy(&mut self, _: EmulationHandle) {}
}