Initial integration, lots of broken stuff
[supertux.git] / src / unison / include / unison / video / backend / Window.hpp
1 //          Copyright Timothy Goya 2007.
2 // Distributed under the Boost Software License, Version 1.0.
3 //    (See accompanying file LICENSE_1_0.txt or copy at
4 //          http://www.boost.org/LICENSE_1_0.txt)
5
6 #ifndef UNISON_VIDEO_BACKEND_WINDOW_HPP
7 #define UNISON_VIDEO_BACKEND_WINDOW_HPP
8
9 #include <unison/video/Blittable.hpp>
10 #include <unison/video/RenderOptions.hpp>
11 #include <unison/video/Coord.hpp>
12 #include <unison/video/Rect.hpp>
13
14 #include <string>
15 #include <vector>
16
17 namespace Unison
18 {
19    namespace Video
20    {
21       class Color;
22       class Rect;
23       class Texture;
24       class Surface;
25       namespace Backend
26       {
27          /// Backend-specific window interface
28          class Window : public Blittable
29          {
30             public:
31                /// Destructor
32                virtual ~Window()
33                {
34                }
35
36                /// Take a screenshot of the window
37                /// \param[in] filename The destination filename
38                virtual void take_screenshot(const std::string &filename) const = 0;
39
40                /// Flip request buffers
41                /// \note Should be called only once per frame!
42                virtual void flip() = 0;
43
44                /// Set window title
45                virtual void set_title(const std::string &title) = 0;
46
47                /// Set window icon
48                virtual void set_icon(const Surface &icon) = 0;
49
50                /// Retrieves the window's size
51                /// \return The size of the window
52                virtual Area get_size() const = 0;
53
54                /// Queries whether the window is in fullscreen mode
55                /// \return Whether the window is fullscreen
56                virtual bool is_fullscreen() const = 0;
57          };
58       }
59    }
60 }
61
62 #endif