diff options
author | Ekaitz Zarraga <ekaitz@elenq.tech> | 2021-12-24 19:53:16 +0100 |
---|---|---|
committer | Ekaitz Zarraga <ekaitz@elenq.tech> | 2021-12-24 19:53:16 +0100 |
commit | 9a9a0e090190dc7a2dba833d1d4efa8417283edc (patch) | |
tree | 4ba43ee254a1362e8400d4a78f6fcaa5c6f3b12b /src/window.h | |
parent | 4eee72704bd85db58981636109fdb456eb78a3c1 (diff) |
Overall cleaning and restructuring using commands
Diffstat (limited to 'src/window.h')
-rw-r--r-- | src/window.h | 16 |
1 files changed, 12 insertions, 4 deletions
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<SDL2/SDL.h> 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 |