ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

sdl.h

Go to the documentation of this file.
00001 /* ScummVM - Graphic Adventure Engine
00002  *
00003  * ScummVM is the legal property of its developers, whose names
00004  * are too numerous to list here. Please refer to the COPYRIGHT
00005  * file distributed with this source distribution.
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 #ifndef PLATFORM_SDL_H
00024 #define PLATFORM_SDL_H
00025 
00026 #include "backends/platform/sdl/sdl-sys.h"
00027 
00028 #include "backends/modular-backend.h"
00029 #include "backends/mixer/sdl/sdl-mixer.h"
00030 #include "backends/events/sdl/sdl-events.h"
00031 #include "backends/log/log.h"
00032 #include "backends/platform/sdl/sdl-window.h"
00033 #include "backends/graphics/sdl/resvm-sdl-graphics.h"
00034 
00035 #include "common/array.h"
00036 
00040 class OSystem_SDL : public ModularBackend {
00041 public:
00042     OSystem_SDL();
00043     virtual ~OSystem_SDL();
00044 
00050     virtual void init();
00051 
00057     virtual SdlMixerManager *getMixerManager();
00058 
00059     virtual bool hasFeature(Feature f);
00060 
00061     // Override functions from ModularBackend and OSystem
00062     virtual void initBackend();
00063     virtual void engineInit();
00064     virtual void engineDone();
00065     virtual void quit();
00066     virtual void fatalError();
00067 
00068     // Logging
00069     virtual void logMessage(LogMessageType::Type type, const char *message);
00070 
00071     virtual Common::String getSystemLanguage() const;
00072 
00073 #if SDL_VERSION_ATLEAST(2, 0, 0)
00074     // Clipboard
00075     virtual bool hasTextInClipboard();
00076     virtual Common::String getTextFromClipboard();
00077     virtual bool setTextInClipboard(const Common::String &text);
00078 #endif
00079 
00080     virtual void setWindowCaption(const char *caption);
00081     virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
00082     virtual uint32 getMillis(bool skipRecord = false);
00083     virtual void delayMillis(uint msecs);
00084     virtual void getTimeAndDate(TimeDate &td) const;
00085     virtual Audio::Mixer *getMixer();
00086     virtual Common::TimerManager *getTimerManager();
00087     virtual Common::SaveFileManager *getSavefileManager();
00088 
00089     //Screenshots
00090     virtual Common::String getScreenshotsPath();
00091 
00092     // ResidualVM specific code
00093     virtual void setupScreen(uint screenW, uint screenH, bool fullscreen, bool accel3d) override;
00094     // ResidualVM specific code
00095     virtual void launcherInitSize(uint w, uint h) override;
00096     // ResidualVM specific code
00097     Common::Array<uint> getSupportedAntiAliasingLevels() const;
00098 
00099 protected:
00100     bool _inited;
00101     bool _initedSDL;
00102 #ifdef USE_SDL_NET
00103     bool _initedSDLnet;
00104 #endif
00105 
00114     Common::String _logFilePath;
00115 
00120     SdlMixerManager *_mixerManager;
00121 
00125     SdlEventSource *_eventSource;
00126 
00130     SdlWindow *_window;
00131 
00132     // ResidualVM specific code
00133     // Graphics capabilities
00134     void detectDesktopResolution();
00135     void detectFramebufferSupport();
00136     void detectAntiAliasingSupport();
00137     ResVmSdlGraphicsManager::Capabilities _capabilities;
00138     // End of ResidualVM specific code
00139 
00140     virtual Common::EventSource *getDefaultEventSource() { return _eventSource; }
00141 
00145     virtual void initSDL();
00146 
00150     virtual AudioCDManager *createAudioCDManager();
00151 
00152     // Logging
00153     virtual Common::String getDefaultLogFileName() { return Common::String(); }
00154     virtual Common::WriteStream *createLogFile();
00155     Backends::Log::Log *_logger;
00156 };
00157 
00158 #endif


Generated on Sat Apr 4 2020 05:00:26 for ResidualVM by doxygen 1.7.1
curved edge   curved edge