X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphics%2Fvideomode.h;h=c527ed75de9d75b2d42b45a8635f87ee7c854be9;hb=3c5bbaeadb33d288c0f9e487b52904b7ed7e4319;hp=d883d17d26ac8572928951ac68356f6d214f90bc;hpb=e09c2211539f417474b1d3226f56f021938329bf;p=libs%2Fgui.git diff --git a/source/graphics/videomode.h b/source/graphics/videomode.h index d883d17..c527ed7 100644 --- a/source/graphics/videomode.h +++ b/source/graphics/videomode.h @@ -1,27 +1,41 @@ #ifndef MSP_GRAPHICS_VIDEOMODE_H_ #define MSP_GRAPHICS_VIDEOMODE_H_ +#include + namespace Msp { namespace Graphics { +struct Monitor; struct VideoMode; class unsupported_video_mode: public std::runtime_error { public: unsupported_video_mode(const VideoMode &); - virtual ~unsupported_video_mode() throw () { } }; -struct VideoMode +enum VideoRotation { - unsigned width; - unsigned height; - unsigned rate; + ROTATE_ANY, + ROTATE_NORMAL, + ROTATE_LEFT, + ROTATE_RIGHT, + ROTATE_INVERTED +}; - VideoMode(): width(0), height(0), rate(0) { } - VideoMode(unsigned w, unsigned h): width(w), height(h), rate(0) { } +struct VideoMode +{ + unsigned index = 0; + const Monitor *monitor = nullptr; + unsigned width = 0; + unsigned height = 0; + float rate = 0.0f; + VideoRotation rotation = ROTATE_ANY; + + VideoMode() = default; + VideoMode(unsigned, unsigned); }; } // namespace Graphics