author | truebrain |
Fri, 18 Jul 2008 10:15:16 +0000 | |
branch | noai |
changeset 11168 | 3842648184cd |
parent 11044 | 097ea3e7ec56 |
permissions | -rw-r--r-- |
9631 | 1 |
/* $Id$ */ |
2 |
||
10455
22c441f5adf9
(svn r12997) [NoAI] -Sync: with trunk r12895:12996.
rubidium
parents:
9724
diff
changeset
|
3 |
/** @file video_driver.hpp Base of all video drivers. */ |
22c441f5adf9
(svn r12997) [NoAI] -Sync: with trunk r12895:12996.
rubidium
parents:
9724
diff
changeset
|
4 |
|
9631 | 5 |
#ifndef VIDEO_VIDEO_DRIVER_HPP |
6 |
#define VIDEO_VIDEO_DRIVER_HPP |
|
7 |
||
8 |
#include "../driver.h" |
|
11044
097ea3e7ec56
(svn r13600) [NoAI] -Sync: with trunk r13508:13599.
rubidium
parents:
10455
diff
changeset
|
9 |
#include "../core/geometry_type.hpp" |
9631 | 10 |
|
11 |
class VideoDriver: public Driver { |
|
12 |
public: |
|
13 |
virtual void MakeDirty(int left, int top, int width, int height) = 0; |
|
14 |
||
15 |
virtual void MainLoop() = 0; |
|
16 |
||
17 |
virtual bool ChangeResolution(int w, int h) = 0; |
|
18 |
||
9723
eee46cb39750
(svn r11796) [NoAI] -Sync: with trunk r11502:11795.
rubidium
parents:
9641
diff
changeset
|
19 |
virtual bool ToggleFullscreen(bool fullscreen) = 0; |
9631 | 20 |
}; |
21 |
||
22 |
class VideoDriverFactoryBase: public DriverFactoryBase { |
|
23 |
}; |
|
24 |
||
25 |
template <class T> |
|
26 |
class VideoDriverFactory: public VideoDriverFactoryBase { |
|
27 |
public: |
|
9641
855e32c08c9b
(svn r10533) [NoAI] -Sync with trunk r10460:r10532.
truelight
parents:
9631
diff
changeset
|
28 |
VideoDriverFactory() { this->RegisterDriver(((T *)this)->GetName(), Driver::DT_VIDEO, ((T *)this)->priority); } |
9631 | 29 |
|
30 |
/** |
|
31 |
* Get the long, human readable, name for the Driver-class. |
|
32 |
*/ |
|
33 |
const char *GetName(); |
|
34 |
}; |
|
35 |
||
36 |
extern VideoDriver *_video_driver; |
|
9724
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
37 |
extern char _ini_videodriver[32]; |
b39bc69bb2f2
(svn r12051) [NoAI] -Sync: with trunk (r11795:12050).
rubidium
parents:
9723
diff
changeset
|
38 |
extern int _num_resolutions; |
11044
097ea3e7ec56
(svn r13600) [NoAI] -Sync: with trunk r13508:13599.
rubidium
parents:
10455
diff
changeset
|
39 |
extern Dimension _resolutions[32]; |
097ea3e7ec56
(svn r13600) [NoAI] -Sync: with trunk r13508:13599.
rubidium
parents:
10455
diff
changeset
|
40 |
extern Dimension _cur_resolution; |
9631 | 41 |
|
42 |
#endif /* VIDEO_VIDEO_DRIVER_HPP */ |