summaryrefslogtreecommitdiff
path: root/src/window.h
blob: 2bc917a45d8f810a87585dc111d103191eae2f40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef WINDOW_H
#define WINDOW_H
#include "command.h"
#include "point.h"
#include<SDL2/SDL.h>

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();
        Command* handleEvent( SDL_Event e );
        void toggleFullscreen();
        Point getSize();
    private:
        SDL_Window* window_;
        bool fullscreen_;
        bool closed_;
        bool focused_;

        Command* close;
        Command* unfocus;
        Command* focus;
        Command* nop;
};

#endif