summaryrefslogtreecommitdiffstats
path: root/native/src/window
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-01-12 02:59:08 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-01-12 02:59:08 +0100
commit7354f68b3ca345767de3f09dccddf168493977bf (patch)
treea09626c11a25ab4260c576733f1700e9ad12894b /native/src/window
parent7ccd87c36b54e0d53f65f5774f140a0528ae4504 (diff)
downloadiced-7354f68b3ca345767de3f09dccddf168493977bf.tar.gz
iced-7354f68b3ca345767de3f09dccddf168493977bf.tar.bz2
iced-7354f68b3ca345767de3f09dccddf168493977bf.zip
Draft `Shell:request_redraw` API
... and implement `TextInput` cursor blink :tada:
Diffstat (limited to 'native/src/window')
-rw-r--r--native/src/window/event.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/native/src/window/event.rs b/native/src/window/event.rs
index 86321ac0..16684222 100644
--- a/native/src/window/event.rs
+++ b/native/src/window/event.rs
@@ -1,4 +1,5 @@
use std::path::PathBuf;
+use std::time::Instant;
/// A window-related event.
#[derive(PartialEq, Eq, Clone, Debug)]
@@ -19,6 +20,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