]> git.tdb.fi Git - libs/gui.git/blob - source/graphics/videomode.h
Add decorations for things which should be exported from the library
[libs/gui.git] / source / graphics / videomode.h
1 #ifndef MSP_GRAPHICS_VIDEOMODE_H_
2 #define MSP_GRAPHICS_VIDEOMODE_H_
3
4 #include <stdexcept>
5 #include "mspgui_api.h"
6
7 namespace Msp {
8 namespace Graphics {
9
10 struct Monitor;
11 struct VideoMode;
12
13 class MSPGUI_API unsupported_video_mode: public std::runtime_error
14 {
15 public:
16         unsupported_video_mode(const VideoMode &);
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 MSPGUI_API VideoMode
30 {
31         unsigned index = 0;
32         const Monitor *monitor = nullptr;
33         unsigned width = 0;
34         unsigned height = 0;
35         float rate = 0.0f;
36         VideoRotation rotation = ROTATE_ANY;
37
38         VideoMode() = default;
39         VideoMode(unsigned, unsigned);
40 };
41
42 } // namespace Graphics
43 } // namespace Msp
44
45 #endif