10 lines
270 B
Rust
10 lines
270 B
Rust
use ratatui::crossterm::event::KeyEvent;
|
|
|
|
use crate::database::DB;
|
|
use crate::events::AppEvent;
|
|
|
|
pub trait Focused {
|
|
fn take_focus(&mut self);
|
|
fn lose_focus(&mut self);
|
|
fn handle_input(&mut self, key_event: KeyEvent, db: &mut DB) -> Option<Vec<AppEvent>>;
|
|
}
|