blob: 5f104912a1a62dc3c38e1e57fe37a2ef6dd7426b (
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
38
39
40
41
42
|
#ifndef WINDOW_HPP
#define WINDOW_HPP
#include <SDL2/SDL.h>
#include <string>
namespace yage
{
// window flags that can change it's appearance
enum WindowFlags : unsigned
{
SHOWN=0x1,
HIDDEN=0x2,
FULLSCREEN=0x4,
BORDERLESS=0x8,
};
// window wrapper around SDL_Window pointer
class Window
{
public: // member variables
private:
// window handle
SDL_Window *window_=nullptr;
public: // member functions
Window();
// destroys the window handle
~Window();
// create the window, initialize the handle and update the width and height
void create(const std::string &window_name, int width, int height, unsigned flags=WindowFlags::SHOWN);
// swap the buffer
void swapBuffer();
private:
};
} // yage
#endif
|