summaryrefslogtreecommitdiffstats
path: root/native/src/window/event.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2023-01-13 20:33:59 +0100
committerLibravatar GitHub <noreply@github.com>2023-01-13 20:33:59 +0100
commit597af315af714f3ecadd195516e80506504dcb26 (patch)
tree200d0447efc60c9066b762c9f1a00ce55d66def7 /native/src/window/event.rs
parentd2b66805b350b4bd2ca5cb2818a6c05e3cfb5235 (diff)
parent507820a8438cec25074f92b72e118e0931fa7f9f (diff)
downloadiced-597af315af714f3ecadd195516e80506504dcb26.tar.gz
iced-597af315af714f3ecadd195516e80506504dcb26.tar.bz2
iced-597af315af714f3ecadd195516e80506504dcb26.zip
Merge pull request #1647 from iced-rs/feature/widget-request-redraw
Widget-driven animations
Diffstat (limited to '')
-rw-r--r--native/src/window/event.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/native/src/window/event.rs b/native/src/window/event.rs
index 86321ac0..e2fb5e66 100644
--- a/native/src/window/event.rs
+++ b/native/src/window/event.rs
@@ -1,3 +1,5 @@
+use crate::time::Instant;
+
use std::path::PathBuf;
/// A window-related event.
@@ -19,6 +21,11 @@ pub enum Event {
height: u32,
},
+ /// A window redraw was requested.
+ ///
+ /// The [`Instant`] contains the current time.
+ RedrawRequested(Instant),
+
/// The user has requested for the window to close.
///
/// Usually, you will want to terminate the execution whenever this event