|
OpenTTD Source
1.11.0-beta1
|
Go to the documentation of this file.
10 #ifndef VIDEO_VIDEO_DRIVER_HPP
11 #define VIDEO_VIDEO_DRIVER_HPP
13 #include "../driver.h"
14 #include "../core/geometry_type.hpp"
15 #include "../core/math_func.hpp"
80 virtual bool ClaimMousePointer()
bool fullscreen
Whether to use (true) fullscreen mode.
static Driver ** GetActiveDriver(Driver::Type type)
Get the active driver for the given type.
The base of all video drivers.
Dimensions (a width and height) of a rectangle in 2D.
virtual void MakeDirty(int left, int top, int width, int height)=0
Mark a particular area dirty.
virtual bool ToggleFullscreen(bool fullscreen)=0
Change the full screen setting.
Dimension _cur_resolution
The current resolution.
static uint ClampU(const uint a, const uint min, const uint max)
Clamp an unsigned integer between an interval.
virtual void ReleaseBlitterLock()
Release any lock(s) required to be held when changing blitters.
virtual bool HasGUI() const
Whether the driver has a graphical user interface with the end user.
int height
Height in pixels of our display surface.
const uint DEFAULT_WINDOW_HEIGHT
Default window height.
bool _rightclick_emulate
Whether right clicking is emulated.
virtual void AcquireBlitterLock()
Acquire any lock(s) required to be held when changing blitters.
virtual bool ChangeResolution(int w, int h)=0
Change the resolution of the window.
static VideoDriver * GetInstance()
Get the currently active instance of the video driver.
void UpdateAutoResolution()
Apply resolution auto-detection and clamp to sensible defaults.
@ DT_VIDEO
A video driver.
int width
Width in pixels of our display surface.
std::string _ini_videodriver
The video driver a stored in the configuration file.
virtual void MainLoop()=0
Perform the actual drawing.
virtual void EditBoxLostFocus()
An edit box lost the input focus.
const uint DEFAULT_WINDOW_WIDTH
Default window width.
A driver for communicating with the user.
std::vector< Dimension > _resolutions
List of resolutions.
virtual void EditBoxGainedFocus()
An edit box gained the input focus.
virtual bool AfterBlitterChange()
Callback invoked after the blitter was changed.