summaryrefslogtreecommitdiff
path: root/src/video/video_driver.hpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-05-02 16:14:23 +0000
committerrubidium <rubidium@openttd.org>2011-05-02 16:14:23 +0000
commit4d5dbf51707c42c24eeafdb65016b079c54adcf2 (patch)
tree0197dcc17f4a8411ecea2223f356019c902fe7b9 /src/video/video_driver.hpp
parente9837ff1ec1326aec622366ae29ff1aa81581daf (diff)
downloadopenttd-4d5dbf51707c42c24eeafdb65016b079c54adcf2.tar.xz
(svn r22410) -Document: some more bits ;)
Diffstat (limited to 'src/video/video_driver.hpp')
-rw-r--r--src/video/video_driver.hpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/video/video_driver.hpp b/src/video/video_driver.hpp
index f8defcca2..1e647cb1c 100644
--- a/src/video/video_driver.hpp
+++ b/src/video/video_driver.hpp
@@ -15,20 +15,47 @@
#include "../driver.h"
#include "../core/geometry_type.hpp"
+/** The base of all video drivers. */
class VideoDriver: public Driver {
public:
+ /**
+ * Mark a particular area dirty.
+ * @param left The left most line of the dirty area.
+ * @param top The top most line of the dirty area.
+ * @param width The width of the dirty area.
+ * @param height The height of the dirty area.
+ */
virtual void MakeDirty(int left, int top, int width, int height) = 0;
+ /**
+ * Perform the actual drawing.
+ */
virtual void MainLoop() = 0;
+ /**
+ * Change the resolution of the window.
+ * @param w The new width.
+ * @param h The new height.
+ * @return True if the change succeeded.
+ */
virtual bool ChangeResolution(int w, int h) = 0;
+ /**
+ * Change the full screen setting.
+ * @param fullscreen The new setting.
+ * @return True if the change succeeded.
+ */
virtual bool ToggleFullscreen(bool fullscreen) = 0;
};
+/** Base of the factory for the video drivers. */
class VideoDriverFactoryBase: public DriverFactoryBase {
};
+/**
+ * Factory for the video drivers.
+ * @tparam T The type of the video factory to register.
+ */
template <class T>
class VideoDriverFactory: public VideoDriverFactoryBase {
public: