1use std::borrow::Cow;
2use std::path::PathBuf;
3
4use crate::message_bar::Message;
5use crate::term::SizeInfo;
6
7#[derive(Clone, Debug, PartialEq)]
8pub enum Event {
9 DPRChanged(f64, (u32, u32)),
10 ConfigReload(PathBuf),
11 MouseCursorDirty,
12 Message(Message),
13 Title(String),
14 Wakeup,
15 Urgent,
16 Exit,
17}
18
19pub trait Notify {
21 fn notify<B: Into<Cow<'static, [u8]>>>(&mut self, _: B);
25}
26
27pub trait OnResize {
29 fn on_resize(&mut self, size: &SizeInfo);
30}
31
32pub trait EventListener {
34 fn send_event(&self, event: Event);
35}