argh, clean out copy
[supertux.git] / src / unison / src / video / opengl / 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_OPENGL_WINDOW_HPP
7 #define UNISON_VIDEO_OPENGL_WINDOW_HPP
8
9 #include <unison/video/backend/Window.hpp>
10 #include <unison/video/RenderOptions.hpp>
11
12 #include <string>
13
14 #include "SDL.h"
15
16 namespace Unison
17 {
18    namespace Video
19    {
20       namespace Backend
21       {
22          class Texture;
23       }
24       namespace OpenGL
25       {
26          class Window : public Backend::Window
27          {
28             public:
29                Window(const Area &size, const Area &logical_size, bool fullscreen = false);
30
31                ~Window();
32                void take_screenshot(const std::string &filename) const;
33                void flip();
34                void set_title(const std::string &title);
35                void set_icon(const Surface &icon);
36                Area get_size() const;
37                bool is_fullscreen() const;
38                void blit(const Surface &src, const Point &dst_pos, const Rect &src_rect, const RenderOptions &options);
39                void blit(const Video::Texture &src, const Point &dst_pos, const Rect &src_rect, const RenderOptions &options);
40                void fill(const Color &color, const Rect &rect);
41                void fill_blend(const Color &color, const Rect &rect);
42             private:
43                /// The logical size of the window;
44                Area logical_size;
45
46                /// The window
47                SDL_Surface *window;
48          };
49       }
50    }
51 }
52
53 #endif