summaryrefslogtreecommitdiff
path: root/src/sdl_main_window.hpp
blob: fbb9dd45f882b74b59f5d13e7086fab4d029106c (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
#ifndef SDL_MAIN_WINDOW_HPP
#define SDL_MAIN_WINDOW_HPP

#include "sdl_context.hpp"

#include <SDL.h>

namespace bookmouse {

class SdlMainWindow {
  public:
    explicit SdlMainWindow(const SdlContext& sdlContext) noexcept(false);
    SdlMainWindow(const SdlMainWindow&) = delete;
    SdlMainWindow(SdlMainWindow&&) = delete;
    ~SdlMainWindow();

    SdlMainWindow& operator=(const SdlMainWindow&) = delete;
    SdlMainWindow& operator=(SdlMainWindow&&) = delete;

    constexpr SDL_Window* window()
    {
        return m_window;
    }

  private:
    SDL_Window* m_window{nullptr};
};

} // namespace bookmouse

#endif