From 9a9a0e090190dc7a2dba833d1d4efa8417283edc Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Fri, 24 Dec 2021 19:53:16 +0100 Subject: Overall cleaning and restructuring using commands --- src/window.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/window.h') diff --git a/src/window.h b/src/window.h index efa2165..ee4c146 100644 --- a/src/window.h +++ b/src/window.h @@ -1,3 +1,6 @@ +#ifndef WINDOW_H +#define WINDOW_H +#include "command.h" #include struct Point{ @@ -14,14 +17,19 @@ class Window{ int y = SDL_WINDOWPOS_UNDEFINED ); ~Window(); SDL_Window* window(); - void handleEvent( SDL_Event e ); + Command* handleEvent( SDL_Event e ); void toggleFullscreen(); Point getSize(); - bool closed(); - bool focused(); private: SDL_Window* window_; bool fullscreen_; - bool focused_; bool closed_; + bool focused_; + + Command* close; + Command* unfocus; + Command* focus; + Command* nop; }; + +#endif -- cgit v1.2.3