2005-07-24 16:12:37 +02:00
|
|
|
/* $Id$ */
|
|
|
|
|
2009-08-21 22:21:05 +02:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* 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.
|
|
|
|
* 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.
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2008-05-06 17:11:33 +02:00
|
|
|
/** @file win32_v.h Base of the Windows video driver. */
|
|
|
|
|
2005-07-23 17:16:57 +02:00
|
|
|
#ifndef VIDEO_WIN32_H
|
|
|
|
#define VIDEO_WIN32_H
|
|
|
|
|
2007-07-05 14:23:54 +02:00
|
|
|
#include "video_driver.hpp"
|
2005-07-23 17:16:57 +02:00
|
|
|
|
2011-05-02 18:14:23 +02:00
|
|
|
/** The video driver for windows. */
|
2007-07-05 14:23:54 +02:00
|
|
|
class VideoDriver_Win32: public VideoDriver {
|
|
|
|
public:
|
|
|
|
/* virtual */ const char *Start(const char * const *param);
|
|
|
|
|
|
|
|
/* virtual */ void Stop();
|
|
|
|
|
|
|
|
/* virtual */ void MakeDirty(int left, int top, int width, int height);
|
|
|
|
|
|
|
|
/* virtual */ void MainLoop();
|
|
|
|
|
|
|
|
/* virtual */ bool ChangeResolution(int w, int h);
|
|
|
|
|
2008-01-01 15:20:48 +01:00
|
|
|
/* virtual */ bool ToggleFullscreen(bool fullscreen);
|
2011-10-04 23:35:40 +02:00
|
|
|
|
|
|
|
/* virtual */ bool AfterBlitterChange();
|
|
|
|
|
2011-11-17 22:09:08 +01:00
|
|
|
/* virtual */ bool ClaimMousePointer();
|
|
|
|
|
2009-09-05 23:26:51 +02:00
|
|
|
/* virtual */ const char *GetName() const { return "win32"; }
|
2011-02-26 20:13:58 +01:00
|
|
|
|
|
|
|
bool MakeWindow(bool full_screen);
|
2007-07-05 14:23:54 +02:00
|
|
|
};
|
|
|
|
|
2011-05-02 18:14:23 +02:00
|
|
|
/** The factory for Windows' video driver. */
|
2007-07-05 14:23:54 +02:00
|
|
|
class FVideoDriver_Win32: public VideoDriverFactory<FVideoDriver_Win32> {
|
|
|
|
public:
|
2007-07-07 23:14:36 +02:00
|
|
|
static const int priority = 10;
|
2007-07-05 14:23:54 +02:00
|
|
|
/* virtual */ const char *GetName() { return "win32"; }
|
2007-07-07 00:15:00 +02:00
|
|
|
/* virtual */ const char *GetDescription() { return "Win32 GDI Video Driver"; }
|
2007-07-05 14:23:54 +02:00
|
|
|
/* virtual */ Driver *CreateInstance() { return new VideoDriver_Win32(); }
|
|
|
|
};
|
2005-07-23 17:16:57 +02:00
|
|
|
|
2007-02-12 22:55:10 +01:00
|
|
|
#endif /* VIDEO_WIN32_H */
|