# video_driver.hpp

Go to the documentation of this file.

    00001 /* $Id: video_driver.hpp 14907 2009-01-08 11:06:07Z peter1138 $ */
    00002
    00005 #ifndef VIDEO_VIDEO_DRIVER_HPP
    00006 #define VIDEO_VIDEO_DRIVER_HPP
    00007
    00008 #include "../driver.h"
    00009 #include "../core/geometry_type.hpp"
    00010
    00011 class VideoDriver: public Driver {
    00012 public:
    00013   virtual void MakeDirty(int left, int top, int width, int height) = 0;
    00014
    00015   virtual void MainLoop() = 0;
    00016
    00017   virtual bool ChangeResolution(int w, int h) = 0;
    00018
    00019   virtual bool ToggleFullscreen(bool fullscreen) = 0;
    00020 };
    00021
    00022 class VideoDriverFactoryBase: public DriverFactoryBase {
    00023 };
    00024
    00025 template <class T>
    00026 class VideoDriverFactory: public VideoDriverFactoryBase {
    00027 public:
    00028   VideoDriverFactory() { this->RegisterDriver(((T *)this)->GetName(), Driver::DT_VIDEO, ((T *)this)->priority); }
    00029
    00033   const char *GetName();
    00034 };
    00035
    00036 extern VideoDriver *_video_driver;
    00037 extern char *_ini_videodriver;
    00038 extern int _num_resolutions;
    00039 extern Dimension _resolutions[32];
    00040 extern Dimension _cur_resolution;
    00041
    00042 #endif /* VIDEO_VIDEO_DRIVER_HPP */