pub mod cursor_decoder;
// interacting.rs
use crate::drawing::Drawable;
use smithay_client_toolkit::seat::keyboard::KeyEvent;
use std::any::Any;
#[derive(Debug, Clone, Copy)]
pub enum KeyboardEventType {
Pressed,
Released,
Repeating,
}
#[derive(Debug, Clone)]
pub struct KeyboardEvent {
pub t: KeyboardEventType,
pub e: KeyEvent,
}
pub enum Event {
Keyboard(KeyboardEvent), // TODO: Mouse
}
pub trait Interactive: Drawable {
// A control must first be `Drawable` and have a planned drawing area before it can be interacted with via Cursor.
fn handle_and_route(&self, e: &Event, u: &dyn Any);
// TODO: Mouse
}