Allow styling the cursor in MouseEventHandler

Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra
2021-08-27 19:01:49 +02:00
co-authored by Max Brunsfeld Nathan Sobo
parent 53dc08dfc5
commit 5e6e0c68cd
6 changed files with 92 additions and 7 deletions
+9
View File
@@ -47,6 +47,8 @@ pub trait Platform: Send + Sync {
fn write_credentials(&self, url: &str, username: &str, password: &[u8]);
fn read_credentials(&self, url: &str) -> Option<(String, Vec<u8>)>;
fn set_cursor_style(&self, style: CursorStyle);
}
pub(crate) trait ForegroundPlatform {
@@ -114,6 +116,13 @@ pub enum PromptLevel {
Critical,
}
#[derive(Copy, Clone, Debug)]
pub enum CursorStyle {
Arrow,
ResizeLeftRight,
PointingHand,
}
pub trait FontSystem: Send + Sync {
fn load_family(&self, name: &str) -> anyhow::Result<Vec<FontId>>;
fn select_font(