-#include <msp/strings/format.h>
#include "display.h"
#include "display_private.h"
#include "window.h"
namespace Msp {
namespace Graphics {
-unsupported_video_mode::unsupported_video_mode(const VideoMode &mode):
- runtime_error(format("%dx%d", mode.width, mode.height))
-{ }
-
-
void Display::add_window(Window &wnd)
{
priv->windows[wnd.get_private().window] = &wnd;
#include <list>
#include <stdexcept>
#include <string>
+#include "videomode.h"
namespace Msp {
namespace Graphics {
class Window;
-struct VideoMode
-{
- unsigned width;
- unsigned height;
- unsigned rate;
-
- VideoMode(): width(0), height(0), rate(0) { }
- VideoMode(unsigned w, unsigned h): width(w), height(h), rate(0) { }
-};
-
-
-class unsupported_video_mode: public std::runtime_error
-{
-public:
- unsupported_video_mode(const VideoMode &);
- virtual ~unsupported_video_mode() throw () { }
-};
-
-
class Display
{
public:
--- /dev/null
+#include <msp/strings/format.h>
+#include "videomode.h"
+
+namespace Msp {
+namespace Graphics {
+
+unsupported_video_mode::unsupported_video_mode(const VideoMode &mode):
+ runtime_error(format("%dx%d", mode.width, mode.height))
+{ }
+
+} // namespace Graphics
+} // namespace Msp
--- /dev/null
+#ifndef MSP_GRAPHICS_VIDEOMODE_H_
+#define MSP_GRAPHICS_VIDEOMODE_H_
+
+namespace Msp {
+namespace Graphics {
+
+struct VideoMode;
+
+class unsupported_video_mode: public std::runtime_error
+{
+public:
+ unsupported_video_mode(const VideoMode &);
+ virtual ~unsupported_video_mode() throw () { }
+};
+
+
+struct VideoMode
+{
+ unsigned width;
+ unsigned height;
+ unsigned rate;
+
+ VideoMode(): width(0), height(0), rate(0) { }
+ VideoMode(unsigned w, unsigned h): width(w), height(h), rate(0) { }
+};
+
+} // namespace Graphics
+} // namespace Msp
+
+#endif