use super::{InputState, KeyPress, LayerId, TextAction, WidgetResponse};
use crate::types::WidgetId;
pub trait CoordinatorDriver {
fn begin_frame(&mut self, input: InputState);
fn end_frame(&mut self) -> Vec<(WidgetId, WidgetResponse)>;
fn set_cursor_pos(&mut self, x: f64, y: f64);
fn process_click(&self, x: f64, y: f64) -> Option<WidgetId>;
fn process_right_click(&self, x: f64, y: f64) -> Option<WidgetId>;
fn process_double_click(&self, x: f64, y: f64) -> Option<WidgetId>;
fn process_scroll(&self, x: f64, y: f64) -> Option<WidgetId>;
fn process_drag_press(&self, x: f64, y: f64) -> Option<WidgetId>;
fn process_hover(&self, x: f64, y: f64) -> Option<WidgetId>;
fn process_drag_start(&mut self, x: f64, y: f64) -> Option<WidgetId>;
fn process_drag_move(&mut self, x: f64, y: f64) -> Option<(WidgetId, f64, f64)>;
fn process_drag_end(&mut self) -> Option<WidgetId>;
fn set_focus(&mut self, id: impl Into<WidgetId>);
fn clear_focus(&mut self);
fn focus_next(&mut self);
fn focus_prev(&mut self);
fn grab_pointer(&mut self, id: impl Into<WidgetId>);
fn release_pointer(&mut self);
fn on_char(&mut self, ch: char) -> TextAction;
fn on_key(&mut self, key: KeyPress) -> TextAction;
fn push_layer(&mut self, id: LayerId, z_order: u32, modal: bool);
fn pop_layer(&mut self, id: &LayerId);
}