summaryrefslogtreecommitdiffstats
path: root/include/video.hpp
blob: 45b1fc54ec1751e6b7deeac1ac46400d0e82ce58 (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
33
34
35
36
37
#pragma once

#include <string>
#include <array>

extern "C" {
#include <SDL2/SDL_video.h>
}

namespace wrapsdl2 {
    typedef SDL_Point point;
    typedef SDL_Rect rect;

    class window {
    public:
        window() = delete;
        window(const window& other) = delete;

        window(const std::string& title, std::size_t width, std::size_t height);
        ~window();

        // setters
        void show();
        void hide();
        void raise();

        // getters
        bool visible();

        // rendering
        void update();

    private:
        SDL_Window *m_window;
        SDL_Surface *m_surface;
    };
}