winit/platform_impl/linux/wayland/event_loop/
proxy.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//! An event loop proxy.

use sctk::reexports::calloop::ping::Ping;

/// A handle that can be sent across the threads and used to wake up the `EventLoop`.
#[derive(Clone)]
pub struct EventLoopProxy {
    ping: Ping,
}

impl EventLoopProxy {
    pub fn new(ping: Ping) -> Self {
        Self { ping }
    }

    pub fn wake_up(&self) {
        self.ping.ping();
    }
}