2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8 /** @file win32_v.h Base of the Windows video driver. */
13 #include "video_driver.hpp"
15 /** The video driver for windows. */
16 class VideoDriver_Win32
: public VideoDriver
{
18 const char *Start(const char * const *param
) override
;
22 void MakeDirty(int left
, int top
, int width
, int height
) override
;
24 void MainLoop() override
;
26 bool ChangeResolution(int w
, int h
) override
;
28 bool ToggleFullscreen(bool fullscreen
) override
;
30 bool AfterBlitterChange() override
;
32 void AcquireBlitterLock() override
;
34 void ReleaseBlitterLock() override
;
36 bool ClaimMousePointer() override
;
38 void EditBoxLostFocus() override
;
40 const char *GetName() const override
{ return "win32"; }
42 bool MakeWindow(bool full_screen
);
45 /** The factory for Windows' video driver. */
46 class FVideoDriver_Win32
: public DriverFactoryBase
{
48 FVideoDriver_Win32() : DriverFactoryBase(Driver::DT_VIDEO
, 10, "win32", "Win32 GDI Video Driver") {}
49 Driver
*CreateInstance() const override
{ return new VideoDriver_Win32(); }
52 #endif /* VIDEO_WIN32_H */