diff options
| author | Aram Drevekenin <aram@poor.dev> | 2025-02-10 16:05:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-10 16:05:48 +0100 |
| commit | 3e493f34c96b16f19773f4137b8eba5cc0a51a9c (patch) | |
| tree | d7082284cec4dbe58d05849d9e279b18598ee671 /zellij-utils/src/plugin_api | |
| parent | docs(changelog): new theme definition spec (diff) | |
| download | sl0ppij-3e493f34c96b16f19773f4137b8eba5cc0a51a9c.tar.gz sl0ppij-3e493f34c96b16f19773f4137b8eba5cc0a51a9c.tar.xz sl0ppij-3e493f34c96b16f19773f4137b8eba5cc0a51a9c.zip | |
feat(ui): about plugin and release notes (#3979)
* basic about screen
* work
* finish implementing about plugin except theme spec
* show about plugin only on first version run
* some cleanups and do the right thing with open/xdg-open
* refactor: make ui framework
* refactor: remove old stuff
* refactor: about plugin
* style(fmt): rustfmt
* chore(repo): about plugin asset
* fix tests
* style(fmt): rustfmt!!
Diffstat (limited to 'zellij-utils/src/plugin_api')
| -rw-r--r-- | zellij-utils/src/plugin_api/event.proto | 1 | ||||
| -rw-r--r-- | zellij-utils/src/plugin_api/event.rs | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/zellij-utils/src/plugin_api/event.proto b/zellij-utils/src/plugin_api/event.proto index 5a55baf0..f6162b68 100644 --- a/zellij-utils/src/plugin_api/event.proto +++ b/zellij-utils/src/plugin_api/event.proto @@ -232,6 +232,7 @@ enum MouseEventName { MouseRightClick = 3; MouseHold = 4; MouseRelease = 5; + MouseHover = 6; } message TabUpdatePayload { diff --git a/zellij-utils/src/plugin_api/event.rs b/zellij-utils/src/plugin_api/event.rs index df80e89d..0f570aee 100644 --- a/zellij-utils/src/plugin_api/event.rs +++ b/zellij-utils/src/plugin_api/event.rs @@ -936,6 +936,12 @@ impl TryFrom<MouseEventPayload> for Mouse { ), _ => Err("Malformed payload for mouse release"), }, + Some(MouseEventName::MouseHover) => match mouse_event_payload.mouse_event_payload { + Some(mouse_event_payload::MouseEventPayload::Position(position)) => Ok( + Mouse::Hover(position.line as isize, position.column as usize), + ), + _ => Err("Malformed payload for mouse hover"), + }, None => Err("Malformed payload for MouseEventName"), } } @@ -993,6 +999,15 @@ impl TryFrom<Mouse> for MouseEventPayload { }, )), }), + Mouse::Hover(line, column) => Ok(MouseEventPayload { + mouse_event_name: MouseEventName::MouseHover as i32, + mouse_event_payload: Some(mouse_event_payload::MouseEventPayload::Position( + ProtobufPosition { + line: line as i64, + column: column as i64, + }, + )), + }), } } } |
