winit/src/platform_impl/web/event_loop/state.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
343 B
Rust
Raw Normal View History

2019-06-25 03:15:34 +02:00
use super::backend;
2023-06-01 17:22:28 +02:00
use web_time::Instant;
2019-06-25 03:15:34 +02:00
#[derive(Debug)]
2019-06-25 03:15:34 +02:00
pub enum State {
Init,
WaitUntil { _timeout: backend::Schedule, start: Instant, end: Instant },
2019-06-25 03:15:34 +02:00
Wait { start: Instant },
Poll { _request: backend::Schedule },
2019-06-25 03:15:34 +02:00
Exit,
}
impl State {
pub fn exiting(&self) -> bool {
2022-06-10 13:43:33 +03:00
matches!(self, State::Exit)
2019-06-25 03:15:34 +02:00
}
}