event_loop: remove generic user event
Let the users wake up the event loop and then they could poll their user sources. Co-authored-by: Mads Marquart <mads@marquart.dk> Co-authored-by: daxpedda <daxpedda@gmail.com>
This commit is contained in:
parent
7d1287958f
commit
ecb887e5c3
44 changed files with 675 additions and 966 deletions
|
|
@ -12,7 +12,7 @@ use super::{DeviceId, WindowId};
|
|||
/// to the winit's user.
|
||||
#[derive(Default)]
|
||||
pub struct EventSink {
|
||||
pub window_events: Vec<Event<()>>,
|
||||
pub(crate) window_events: Vec<Event>,
|
||||
}
|
||||
|
||||
impl EventSink {
|
||||
|
|
@ -47,7 +47,7 @@ impl EventSink {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
pub fn drain(&mut self) -> Drain<'_, Event<()>> {
|
||||
pub(crate) fn drain(&mut self) -> Drain<'_, Event> {
|
||||
self.window_events.drain(..)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue