Extend cursor availability to the shell level

This commit is contained in:
Héctor Ramón Jiménez 2023-06-08 20:35:40 +02:00
parent 57db196c3a
commit aba98e4965
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
6 changed files with 73 additions and 49 deletions

View file

@ -1,12 +1,13 @@
use crate::{Point, Rectangle, Vector};
/// The mouse cursor state.
#[derive(Debug, Clone, Copy, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Default)]
pub enum Cursor {
/// The cursor has a defined position.
Available(Point),
/// The cursor is currently unavailable (i.e. out of bounds or busy).
#[default]
Unavailable,
}