oxygengine_backend_desktop/
resource.rs

1use glutin::event::WindowEvent;
2
3#[derive(Default)]
4pub struct DesktopAppEvents {
5    queue: Vec<WindowEvent<'static>>,
6}
7
8impl DesktopAppEvents {
9    pub(crate) fn push(&mut self, event: WindowEvent<'static>) {
10        self.queue.push(event);
11    }
12
13    pub(crate) fn clear(&mut self) {
14        self.queue.clear();
15    }
16
17    pub fn iter(&self) -> impl Iterator<Item = &WindowEvent> {
18        self.queue.iter()
19    }
20}