namespace Mf {
+class Video;
+typedef boost::shared_ptr<Video> VideoP;
+
+
class Video
{
public:
+
struct Attributes
{
// OpenGL attributes
Attributes();
};
+
+ static VideoP alloc(const std::string& caption, const std::string& icon)
+ {
+ return VideoP(new Video(caption, icon));
+ }
+
Video();
explicit Video(const Attributes& attribs);
- explicit Video(const std::string& caption, const std::string& icon);
+ Video(const std::string& caption, const std::string& icon);
~Video();
void setVideoMode(const long mode[3]);
void makeActive();
void swap();
-
- struct Exception : public std::runtime_error
- {
- explicit Exception(const std::string& what_arg) :
- std::runtime_error(what_arg) {}
- };
+ int getWidth() const;
+ int getHeight() const;
private:
+
void init(const Attributes& attribs);
void recreateContext();
void setIcon();
- SDL_Surface* context_;
- unsigned flags_;
- Attributes attribs_;
-};
+ // TODO this implementation should be hidden
-typedef boost::shared_ptr<Video> VideoPtr;
+ SDL_Surface* mContext;
+ unsigned mFlags;
+ Attributes mAttribs;
+};
} // namespace Mf