|
@@ -97,6 +97,12 @@ pub enum Event {
|
|
|
WindowClosed(String),
|
|
|
/// Application ready.
|
|
|
Ready,
|
|
|
+ /// Sent if the event loop is being resumed.
|
|
|
+ Resumed,
|
|
|
+ /// Emitted when all of the event loop’s input events have been processed and redraw processing is about to begin.
|
|
|
+ ///
|
|
|
+ /// This event is useful as a place to put your code that should be run after all state-changing events have been handled and you want to do stuff (updating state, performing calculations, etc) that happens as the “main body” of your event loop.
|
|
|
+ MainEventsCleared,
|
|
|
}
|
|
|
|
|
|
/// A menu event that was triggered on a window.
|
|
@@ -441,6 +447,8 @@ impl<R: Runtime> App<R> {
|
|
|
},
|
|
|
RunEvent::WindowClose(label) => Event::WindowClosed(label),
|
|
|
RunEvent::Ready => Event::Ready,
|
|
|
+ RunEvent::Resumed => Event::Resumed,
|
|
|
+ RunEvent::MainEventsCleared => Event::MainEventsCleared,
|
|
|
_ => unimplemented!(),
|
|
|
},
|
|
|
);
|