diff --git a/src/backend/blt.rs b/src/backend/blt.rs index de0a137..20f0583 100644 --- a/src/backend/blt.rs +++ b/src/backend/blt.rs @@ -79,7 +79,7 @@ impl backend::Backend for Concrete { // TODO: unsupported } - fn poll_event(&self) -> Event { + fn poll_event(&mut self) -> Event { // TODO: we could add backend-specific controls here. // Ex: ctrl+mouse wheel cause window cellsize to change if let Some(ev) = terminal::wait_event() { diff --git a/src/backend/curses/n.rs b/src/backend/curses/n.rs index fc0e963..20538a7 100644 --- a/src/backend/curses/n.rs +++ b/src/backend/curses/n.rs @@ -139,7 +139,7 @@ impl backend::Backend for Concrete { ncurses::mvaddstr(y as i32, x as i32, text); } - fn poll_event(&self) -> Event { + fn poll_event(&mut self) -> Event { let ch: i32 = ncurses::getch(); // Is it a UTF-8 starting point? diff --git a/src/backend/curses/pan.rs b/src/backend/curses/pan.rs index 3f77378..0866b86 100644 --- a/src/backend/curses/pan.rs +++ b/src/backend/curses/pan.rs @@ -136,7 +136,7 @@ impl backend::Backend for Concrete { self.window.mvaddstr(y as i32, x as i32, text); } - fn poll_event(&self) -> Event { + fn poll_event(&mut self) -> Event { // TODO: there seems to not be any indication // of Ctrl/Alt/Shift in these :v if let Some(ev) = self.window.getch() { diff --git a/src/backend/mod.rs b/src/backend/mod.rs index 41ff8a2..f5619f8 100644 --- a/src/backend/mod.rs +++ b/src/backend/mod.rs @@ -27,7 +27,7 @@ pub trait Backend { fn screen_size(&self) -> (usize, usize); /// Main input method - fn poll_event(&self) -> event::Event; + fn poll_event(&mut self) -> event::Event; /// Main method used for printing fn print_at(&self, (usize, usize), &str); diff --git a/src/backend/termion.rs b/src/backend/termion.rs index 7284a43..60943fb 100644 --- a/src/backend/termion.rs +++ b/src/backend/termion.rs @@ -144,7 +144,7 @@ impl backend::Backend for Concrete { self.timeout = Some(1000 / fps as u32); } - fn poll_event(&self) -> Event { + fn poll_event(&mut self) -> Event { let input = &self.input; let resize = &self.resize;