]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Video.hh
the massive refactoring effort
[chaz/yoink] / src / Moof / Video.hh
diff --git a/src/Moof/Video.hh b/src/Moof/Video.hh
deleted file mode 100644 (file)
index 8d8e6f3..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-
-/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
-**]  All rights reserved.
-*
-* vi:ts=4 sw=4 tw=75
-*
-* Distributable under the terms and conditions of the 2-clause BSD license;
-* see the file COPYING for a complete text of the license.
-*
-**************************************************************************/
-
-#ifndef _MOOF_VIDEO_HH_
-#define _MOOF_VIDEO_HH_
-
-#include <string>
-
-#include <boost/shared_ptr.hpp>
-#include <SDL/SDL.h>
-
-#include <Moof/Backend.hh>
-
-
-namespace Mf {
-
-
-class Settings;
-
-class Video;
-typedef boost::shared_ptr<Video> VideoP;
-
-
-class Video
-{
-public:
-
-       struct Attributes
-       {
-               // OpenGL attributes
-               int                     colorBuffer[4]; // rgba
-               int                     frameBuffer;
-               bool            doubleBuffer;
-               int                     depthBuffer;
-               int                     stencilBuffer;
-               int                     accumBuffer[4]; // rgba
-               bool            stereo;
-               int                     multisampleBuffers;
-               int                     multisampleSamples;
-               bool            swapControl;
-               bool            hardwareOnly;
-
-               // Window attributes
-               std::string     caption;
-               std::string     icon;
-               int                     mode[3];                // width, height, bpp
-               bool            fullscreen;
-               bool            resizable;
-               bool            cursorVisible;
-               bool            cursorGrab;
-
-               Attributes();
-               Attributes(const Settings& settings);
-
-       private:
-
-               void init();
-
-               Backend         mBackend;
-       };
-
-
-       static VideoP alloc(const Attributes& attribs)
-       {
-               return VideoP(new Video(attribs));
-       }
-
-       Video();
-       explicit Video(const Attributes& attribs);
-       ~Video();
-
-       void setVideoMode(const int mode[3]);
-       Attributes attributes() const;
-
-       void resize(int width, int height);
-       bool iconify();
-
-       void setCaption(const std::string& caption);
-       std::string getCaption() const;
-
-       const std::string& getIcon() const;
-
-       void setFull(bool full);
-       void toggleFull();
-       bool isFull() const;
-
-       void setCursorVisible(bool hasCursor);
-       void toggleCursorVisible();
-       bool isCursorVisible() const;
-
-       void setResizable(bool resizable);
-       void toggleResizable();
-       bool isResizable() const;
-
-       void setCursorGrab(bool cursorGrab);
-       void toggleCursorGrab();
-       bool isCursorGrab() const;
-
-       void swap();
-
-       int getWidth() const;
-       int getHeight() const;
-
-       void makeCurrent() const;
-
-       static Video* current()
-       {
-               return gCurrentVideo;
-       }
-
-private:
-
-       void init();
-
-       void recreateContext();
-       void setOpenGLAttributes();
-
-       void setIcon();
-
-       // TODO this implementation should be hidden
-
-       SDL_Surface*            mContext;
-       unsigned                        mFlags;
-       Attributes                      mAttribs;
-
-       static Video*           gCurrentVideo;
-};
-
-
-} // namespace Mf
-
-#endif // _MOOF_VIDEO_HH_
-
This page took 0.023971 seconds and 4 git commands to generate.