1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
use crate::*;
// use raw_gl_context::GlContext;
/// Controls a single window.
pub trait WindowController {
fn title(&self) -> String { String::from("Phosphor") }
fn initial_dimensions(&self) -> Dimensions { Dimensions::new(800,600) }
fn minimum_dimensions(&self) -> Option<Dimensions> { None }
fn maximum_dimensions(&self) -> Option<Dimensions> { None }
fn resizable(&self) -> bool { true }
fn cursor_icon(&mut self) -> Option<CursorIcon> { None }
fn cursor_visible(&mut self) -> bool { true }
fn on_resize(&mut self, _dimensions: Dimensions) {}
fn on_move(&mut self, _position: Point) {}
fn on_focus_change(&mut self, _focused: bool) {}
fn on_process(&mut self) {}
fn on_mouse_enter(&mut self) {}
fn on_mouse_exit(&mut self) {}
fn on_mouse_move(&mut self, _position: Point) {}
fn on_left_mouse_button(&mut self, _pressed: PressState) {}
fn on_middle_mouse_button(&mut self, _pressed: PressState) {}
fn on_right_mouse_button(&mut self, _pressed: PressState) {}
fn on_keyboard_input(&mut self, _input: KeyboardInput) {}
fn on_keyboard_modifier_change(&mut self, _modifiers: ModifiersState) {}
fn on_character_received(&mut self, _character: char) {}
fn on_file_hovered(&mut self, _path: std::path::PathBuf) {}
fn on_file_dropped(&mut self, _path: std::path::PathBuf) {}
fn on_line_scroll_horizontal(&mut self, _delta: f64) {}
fn on_line_scroll_vertical(&mut self, _delta: f64) {}
fn on_pixel_scroll_horizontal(&mut self, _delta: f64) {}
fn on_pixel_scroll_vertical(&mut self, _delta: f64) {}
fn render_request(&mut self) -> RenderRequest { RenderRequest::None }
fn render(&mut self, _buffer: &mut Buffer, _hint: RenderHint) {}
// fn render_gl(&mut self, _context: &mut GlContext) {}
}
|