diff options
Diffstat (limited to 'src/window.h')
-rw-r--r-- | src/window.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/window.h b/src/window.h new file mode 100644 index 0000000..efa2165 --- /dev/null +++ b/src/window.h @@ -0,0 +1,27 @@ +#include<SDL2/SDL.h> + +struct Point{ + int x, y; +}; + +class Window{ + + public: + Window( const char * title, + int w, + int h, + int x = SDL_WINDOWPOS_UNDEFINED, + int y = SDL_WINDOWPOS_UNDEFINED ); + ~Window(); + SDL_Window* window(); + void handleEvent( SDL_Event e ); + void toggleFullscreen(); + Point getSize(); + bool closed(); + bool focused(); + private: + SDL_Window* window_; + bool fullscreen_; + bool focused_; + bool closed_; +}; |