Draft Shell:request_redraw API

... and implement `TextInput` cursor blink 🎉
This commit is contained in:
Héctor Ramón Jiménez 2023-01-12 02:59:08 +01:00
parent 7ccd87c36b
commit 7354f68b3c
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
12 changed files with 267 additions and 111 deletions

View file

@ -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