From d7364eb89f81fa770bc3658a93917412baa020df Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Thu, 24 Aug 2017 00:24:58 +0100 Subject: Updating docs --- window_8hpp_source.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'window_8hpp_source.html') diff --git a/window_8hpp_source.html b/window_8hpp_source.html index e8f4e32d..d6b97ee8 100644 --- a/window_8hpp_source.html +++ b/window_8hpp_source.html @@ -85,27 +85,27 @@ $(document).ready(function(){initNavTree('window_8hpp_source.html','');});
window.hpp
-Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * window.hpp
3  *
4  * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com> -- MIT License
5  * See file LICENSE for more details
6  * ----------------------------------------------------------------------------
7  */
8 
9 #ifndef WINDOW_HPP
10 #define WINDOW_HPP
11 
12 #include <SDL2/SDL.h>
13 
14 #include <string>
15 
16 namespace yage {
17 
18 // window flags that can change it's appearance
19 enum WindowFlags : unsigned {
20  SHOWN = 0x1,
21  HIDDEN = 0x2,
22  FULLSCREEN = 0x4,
23  BORDERLESS = 0x8,
24 };
25 
26 // window wrapper around SDL_Window pointer
27 class Window {
28 private:
30  SDL_Window* window_ = nullptr;
31 
32 public:
33  Window();
34  Window(const Window&) = delete;
35  Window(Window&&) = delete;
37  ~Window();
38 
39  Window& operator=(const Window&) = delete;
40  Window& operator=(Window&&) = delete;
41 
43  void create(const std::string& window_name, int width, int height,
44  unsigned flags = WindowFlags::SHOWN);
46  void swapBuffer();
48  void clearBuffer();
49 };
50 
51 } // namespace yage
52 
53 #endif
Definition: window.hpp:21
+Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * window.hpp
3  *
4  * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com> -- MIT License
5  * See file LICENSE for more details
6  * ----------------------------------------------------------------------------
7  */
8 
9 #ifndef WINDOW_HPP
10 #define WINDOW_HPP
11 
12 #include <SDL2/SDL.h>
13 
14 #include <string>
15 
16 namespace yage
17 {
18 
19 // window flags that can change it's appearance
20 enum WindowFlags : unsigned {
21  SHOWN = 0x1,
22  HIDDEN = 0x2,
23  FULLSCREEN = 0x4,
24  BORDERLESS = 0x8,
25 };
26 
27 // window wrapper around SDL_Window pointer
28 class Window
29 {
30 private:
32  SDL_Window *window_ = nullptr;
33 
34 public:
35  Window();
36  Window(const Window &) = delete;
37  Window(Window &&) = delete;
39  ~Window();
40 
41  Window &operator=(const Window &) = delete;
42  Window &operator=(Window &&) = delete;
43 
45  void create(const std::string &window_name, int width, int height,
46  unsigned flags = WindowFlags::SHOWN);
48  void swapBuffer();
50  void clearBuffer();
51 };
52 
53 } // namespace yage
54 
55 #endif
Definition: window.hpp:22
-
void swapBuffer()
swap the buffer
Definition: window.cpp:68
-
Definition: window.hpp:27
-
void create(const std::string &window_name, int width, int height, unsigned flags=WindowFlags::SHOWN)
create the window, initialize the handle and update the width and height
Definition: window.cpp:22
-
Definition: window.hpp:22
-
WindowFlags
Definition: window.hpp:19
-
SDL_Window * window_
window handle
Definition: window.hpp:30
-
~Window()
destroys the window handle
Definition: window.cpp:20
-
Definition: window.hpp:20
-
void clearBuffer()
clear buffer
Definition: window.cpp:73
+
void swapBuffer()
swap the buffer
Definition: window.cpp:81
+
Definition: window.hpp:28
+
void create(const std::string &window_name, int width, int height, unsigned flags=WindowFlags::SHOWN)
create the window, initialize the handle and update the width and height
Definition: window.cpp:23
+
Definition: window.hpp:23
+
WindowFlags
Definition: window.hpp:20
+
SDL_Window * window_
window handle
Definition: window.hpp:32
+
~Window()
destroys the window handle
Definition: window.cpp:21
+
Definition: window.hpp:21
+
void clearBuffer()
clear buffer
Definition: window.cpp:87
Templated matrix class.
Definition: camera2d.hpp:17
Window & operator=(const Window &)=delete
-
Definition: window.hpp:23
+
Definition: window.hpp:24