pub trait ToastInputHandler {
// Provided methods
fn calculate_stack_offset(
&self,
toast_index: usize,
toast_height: f64,
spacing: f64,
) -> f64 { ... }
fn is_mouse_over(&self, mouse_pos: (f64, f64), toast_rect: &Rect) -> bool { ... }
fn is_dismiss_click(
&self,
mouse_pos: (f64, f64),
close_button_rect: &Rect,
) -> bool { ... }
fn update_opacity_fade(
&self,
phase: FadePhase,
elapsed_ms: u32,
fade_duration_ms: u32,
) -> f64 { ... }
fn calculate_position(
&self,
screen_size: (f64, f64),
toast_size: (f64, f64),
offset: (f64, f64),
vertical_offset: f64,
) -> (f64, f64) { ... }
}Expand description
Input handler adapter for toast interactions