UGDK  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
window.h
Go to the documentation of this file.
1 #ifndef UGDK_DESKTOP_2D_WINDOW_H_
2 #define UGDK_DESKTOP_2D_WINDOW_H_
3 
4 #include <ugdk/math/integer2D.h>
5 #include <ugdk/desktop/window.h>
6 
7 #include <ugdk/desktop.h>
8 #include <ugdk/graphic.h>
9 #include <ugdk/structure/types.h>
10 
11 struct SDL_Window;
12 
13 namespace ugdk {
14 namespace desktop {
15 namespace mode2d {
16 
17 class Window final : public desktop::Window {
18  private:
19  Window(SDL_Window* sdl_window);
20 
21  public:
22  ~Window();
23 
25  void Present() override;
26 
28 
30  void ChangeSettings(const math::Integer2D& size, bool fullscreen, bool vsync) override;
31 
32  uint32 id() const override;
33  const char* title() const override;
34  math::Integer2D size() const override;
35  bool fullscreen() const override;
36  bool vsync() const override { return vsync_; }
37 
38  private:
39  SDL_Window* sdl_window_;
40  bool vsync_;
41 
42  friend class ::ugdk::desktop::mode2d::Manager;
43  friend class ::ugdk::graphic::Manager;
44 };
45 
46 } // namespace mode2d
47 } // namespace desktop
48 } // namespace ugdk
49 
50 #endif // UGDK_DESKTOP_2D_WINDOW_H_
math::Integer2D size() const override
bool fullscreen() const override
Definition: window.h:12
uint32_t uint32
Definition: types.h:14
Definition: integer2D.h:20
void Present() override
Presents the current canvas in the screen.
Window()
Definition: window.h:31
Definition: animation.h:11
const char * title() const override
bool vsync() const override
Definition: window.h:36
void ChangeSettings(const math::Integer2D &size, bool fullscreen, bool vsync) override
Updates the settings and applies the changes.
Definition: window.h:17
uint32 id() const override