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     // Clipboard
00074     virtual bool hasTextInClipboard();
00075     virtual Common::String getTextFromClipboard();
00076     virtual bool setTextInClipboard(const Common::String &text);
00077 
00078     virtual void setWindowCaption(const char *caption);
00079     virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
00080     virtual uint32 getMillis(bool skipRecord = false);
00081     virtual void delayMillis(uint msecs);
00082     virtual void getTimeAndDate(TimeDate &td) const;
00083     virtual Audio::Mixer *getMixer();
00084     virtual Common::TimerManager *getTimerManager();
00085     virtual Common::SaveFileManager *getSavefileManager();
00086 
00087     //Screenshots
00088     virtual Common::String getScreenshotsPath();
00089 
00090     // ResidualVM specific code
00091     virtual void setupScreen(uint screenW, uint screenH, bool fullscreen, bool accel3d) override;
00092     // ResidualVM specific code
00093     virtual void launcherInitSize(uint w, uint h) override;
00094 
00095 protected:
00096     bool _inited;
00097     bool _initedSDL;
00098 #ifdef USE_SDL_NET
00099     bool _initedSDLnet;
00100 #endif
00101 
00106     SdlMixerManager *_mixerManager;
00107 
00111     SdlEventSource *_eventSource;
00112 
00116     SdlWindow *_window;
00117 
00118     // ResidualVM specific code
00119     // Graphics capabilities
00120     void detectDesktopResolution();
00121     void detectFramebufferSupport();
00122     ResVmSdlGraphicsManager::Capabilities _capabilities;
00123     // End of ResidualVM specific code
00124 
00125     virtual Common::EventSource *getDefaultEventSource() { return _eventSource; }
00126 
00130     virtual void initSDL();
00131 
00135     virtual AudioCDManager *createAudioCDManager();
00136 
00137     // Logging
00138     virtual Common::WriteStream *createLogFile() { return 0; }
00139     Backends::Log::Log *_logger;
00140 };
00141 
00142 #endif


Generated on Sat May 18 2019 05:01:20 for ResidualVM by doxygen 1.7.1
curved edge   curved edge