winit/platform_impl/linux/wayland/event_loop/proxy.rs
1//! An event loop proxy.
2
3use sctk::reexports::calloop::ping::Ping;
4
5/// A handle that can be sent across the threads and used to wake up the `EventLoop`.
6#[derive(Clone)]
7pub struct EventLoopProxy {
8 ping: Ping,
9}
10
11impl EventLoopProxy {
12 pub fn new(ping: Ping) -> Self {
13 Self { ping }
14 }
15
16 pub fn wake_up(&self) {
17 self.ping.ping();
18 }
19}