]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/videomode.h
Use float rather than unsigned for refresh rate
[libs/gui.git] / source / graphics / videomode.h
index d883d17d26ac8572928951ac68356f6d214f90bc..a9c58bd003d1cb26c0f8c052832194cc1446bcb6 100644 (file)
@@ -1,9 +1,12 @@
 #ifndef MSP_GRAPHICS_VIDEOMODE_H_
 #define MSP_GRAPHICS_VIDEOMODE_H_
 
+#include <stdexcept>
+
 namespace Msp {
 namespace Graphics {
 
+struct Monitor;
 struct VideoMode;
 
 class unsupported_video_mode: public std::runtime_error
@@ -14,14 +17,26 @@ public:
 };
 
 
+enum VideoRotation
+{
+       ROTATE_ANY,
+       ROTATE_NORMAL,
+       ROTATE_LEFT,
+       ROTATE_RIGHT,
+       ROTATE_INVERTED
+};
+
 struct VideoMode
 {
+       unsigned index;
+       const Monitor *monitor;
        unsigned width;
        unsigned height;
-       unsigned rate;
+       float rate;
+       VideoRotation rotation;
 
-       VideoMode(): width(0), height(0), rate(0) { }
-       VideoMode(unsigned w, unsigned h): width(w), height(h), rate(0) { }
+       VideoMode();
+       VideoMode(unsigned, unsigned);
 };
 
 } // namespace Graphics