From 7354f68b3ca345767de3f09dccddf168493977bf Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 12 Jan 2023 02:59:08 +0100 Subject: Draft `Shell:request_redraw` API ... and implement `TextInput` cursor blink :tada: --- native/src/window/event.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'native/src/window') 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 -- cgit