(
&mut self,
event: &MouseDownEvent,
window: &mut Window,
cx: &mut Context<Self>,
)
| 380 | event: &MouseDownEvent, |
| 381 | window: &mut Window, |
| 382 | cx: &mut Context<Self>, |
| 383 | ) { |
| 384 | window.focus(&self.focus_handle, cx); |
| 385 | self.seek_to_pointer(event.position, cx); |
| 386 | } |
| 387 | |
| 388 | fn on_key_down(&mut self, event: &KeyDownEvent, _window: &mut Window, cx: &mut Context<Self>) { |
| 389 | match event.keystroke.key.as_str() { |
| 390 | "space" => self.toggle_playback(cx), |
| 391 | "left" => self.seek_by(-SEEK_STEP_SECS, cx), |
| 392 | "right" => self.seek_by(SEEK_STEP_SECS, cx), |
| 393 | "home" => self.seek_to(Duration::ZERO, cx), |
nothing calls this directly
no test coverage detected