Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00012 #ifndef VIDEO_VIDEO_DRIVER_HPP
00013 #define VIDEO_VIDEO_DRIVER_HPP
00014
00015 #include "../driver.h"
00016 #include "../core/geometry_type.hpp"
00017
00018 class VideoDriver: public Driver {
00019 public:
00020 virtual void MakeDirty(int left, int top, int width, int height) = 0;
00021
00022 virtual void MainLoop() = 0;
00023
00024 virtual bool ChangeResolution(int w, int h) = 0;
00025
00026 virtual bool ToggleFullscreen(bool fullscreen) = 0;
00027 };
00028
00029 class VideoDriverFactoryBase: public DriverFactoryBase {
00030 };
00031
00032 template <class T>
00033 class VideoDriverFactory: public VideoDriverFactoryBase {
00034 public:
00035 VideoDriverFactory() { this->RegisterDriver(((T *)this)->GetName(), Driver::DT_VIDEO, ((T *)this)->priority); }
00036
00040 const char *GetName();
00041 };
00042
00043 extern VideoDriver *_video_driver;
00044 extern char *_ini_videodriver;
00045 extern int _num_resolutions;
00046 extern Dimension _resolutions[32];
00047 extern Dimension _cur_resolution;
00048 extern bool _rightclick_emulate;
00049
00050 #endif