]> git.tdb.fi Git - libs/gui.git/blob - source/graphics/videomode.h
2836e11a5c134f00d0f610b54833089efeaa04ef
[libs/gui.git] / source / graphics / videomode.h
1 #ifndef MSP_GRAPHICS_VIDEOMODE_H_
2 #define MSP_GRAPHICS_VIDEOMODE_H_
3
4 #include <stdexcept>
5
6 namespace Msp {
7 namespace Graphics {
8
9 struct Monitor;
10 struct VideoMode;
11
12 class unsupported_video_mode: public std::runtime_error
13 {
14 public:
15         unsupported_video_mode(const VideoMode &);
16         virtual ~unsupported_video_mode() throw () { }
17 };
18
19
20 enum VideoRotation
21 {
22         ROTATE_ANY,
23         ROTATE_NORMAL,
24         ROTATE_LEFT,
25         ROTATE_RIGHT,
26         ROTATE_INVERTED
27 };
28
29 struct VideoMode
30 {
31         unsigned index;
32         const Monitor *monitor;
33         unsigned width;
34         unsigned height;
35         unsigned rate;
36         VideoRotation rotation;
37
38         VideoMode();
39         VideoMode(unsigned, unsigned);
40 };
41
42 } // namespace Graphics
43 } // namespace Msp
44
45 #endif