sdlterm/src/sdlterm.h
changeset 49 1611c462c3e3
parent 48 1f00e90fd72a
child 50 c5b8b9d2da95
--- a/sdlterm/src/sdlterm.h	Sat Jan 05 12:40:32 2013 +0100
+++ b/sdlterm/src/sdlterm.h	Sat Jan 05 16:47:30 2013 +0100
@@ -45,14 +45,15 @@
 {
 	Uint16 ch;
 	Uint16 attr;
+	bool operator !=(const TerminalCell &rhs) const { return ch != rhs.ch || attr != rhs.attr; };
 };
 
 
 class TerminalScreen
 {
 public:
-	TerminalScreen(): _screen_surface(NULL), _cells(NULL), _render() {};
-	~TerminalScreen();
+	TerminalScreen(): _screen_surface(NULL), _render() {};
+	~TerminalScreen() {};
 
 	void select_font(const char *fname_regular, const char *fname_bold, int ptsize);
 	void resize(int pxwidth, int pxheight);
@@ -68,7 +69,8 @@
 
 private:
 	SDL_Surface *_screen_surface;
-	TerminalCell *_cells;
+	std::vector<TerminalCell> _cells_front;
+	std::vector<TerminalCell> _cells_back;
 	GlyphRenderer _render;
 
 	int _pixel_width;  // terminal window width in pixels
@@ -135,6 +137,9 @@
 	int _cursor_y;
 	bool _cursor_visible;
 
+	int _mousemove_last_x;
+	int _mousemove_last_y;
+
 	const char *_translate_keyname(SDLKey sym);
 };