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

modular-backend.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 BACKENDS_MODULAR_BACKEND_H
00024 #define BACKENDS_MODULAR_BACKEND_H
00025 
00026 #include "backends/base-backend.h"
00027 
00028 class GraphicsManager;
00029 class ResVmGraphicsManager; // ResidualVM specific
00030 class MutexManager;
00031 
00049 class ModularBackend : public BaseBackend {
00050 public:
00051     ModularBackend();
00052     virtual ~ModularBackend();
00053 
00056 
00057     virtual bool hasFeature(Feature f) override;
00058     virtual void setFeatureState(Feature f, bool enable) override;
00059     virtual bool getFeatureState(Feature f) override;
00060 
00062 
00065 
00066     virtual GraphicsManager *getGraphicsManager();
00067     virtual const GraphicsMode *getSupportedGraphicsModes() const override;
00068     virtual int getDefaultGraphicsMode() const override;
00069     virtual bool setGraphicsMode(int mode) override;
00070     virtual int getGraphicsMode() const override;
00071     virtual const GraphicsMode *getSupportedShaders() const override;
00072     virtual int getDefaultShader() const override;
00073     virtual int getShader() const override;
00074     virtual bool setShader(int id) override;
00075     virtual const GraphicsMode *getSupportedStretchModes() const override;
00076     virtual int getDefaultStretchMode() const override;
00077     virtual bool setStretchMode(int mode) override;
00078     virtual int getStretchMode() const override;
00079     virtual void resetGraphicsScale() override;
00080 #ifdef USE_RGB_COLOR
00081     virtual Graphics::PixelFormat getScreenFormat() const override;
00082     virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const override;
00083 #endif
00084     virtual void initSize(uint width, uint height, const Graphics::PixelFormat *format = NULL) override;
00085     virtual void setupScreen(uint screenW, uint screenH, bool fullscreen, bool accel3d); // ResidualVM specific method
00086     virtual Graphics::PixelBuffer getScreenPixelBuffer(); // ResidualVM specific method
00087     virtual void suggestSideTextures(Graphics::Surface *left, Graphics::Surface *right); // ResidualVM specific method
00088     virtual void initSizeHint(const Graphics::ModeList &modes) override;
00089     virtual int getScreenChangeID() const override;
00090 
00091     virtual void beginGFXTransaction() override;
00092     virtual OSystem::TransactionError endGFXTransaction() override;
00093 
00094     virtual int16 getHeight() override;
00095     virtual int16 getWidth() override;
00096     virtual PaletteManager *getPaletteManager() override;
00097     virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) override;
00098     virtual Graphics::Surface *lockScreen() override;
00099     virtual void unlockScreen() override;
00100     virtual void fillScreen(uint32 col) override;
00101     virtual void updateScreen() override;
00102     virtual void setShakePos(int shakeXOffset, int shakeYOffset) override;
00103     virtual void setFocusRectangle(const Common::Rect& rect) override;
00104     virtual void clearFocusRectangle() override;
00105 
00106     virtual void showOverlay() override;
00107     virtual void hideOverlay() override;
00108     virtual Graphics::PixelFormat getOverlayFormat() const override;
00109     virtual void clearOverlay() override;
00110     virtual void grabOverlay(void *buf, int pitch) override;
00111     virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) override;
00112     virtual int16 getOverlayHeight() override;
00113     virtual int16 getOverlayWidth() override;
00114 
00115     virtual bool showMouse(bool visible) override;
00116     virtual void warpMouse(int x, int y) override;
00117     virtual void setMouseCursor(const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale = false, const Graphics::PixelFormat *format = NULL) override;
00118     virtual void setCursorPalette(const byte *colors, uint start, uint num) override;
00119     virtual bool lockMouse(bool lock); // ResidualVM specific method
00120 
00122 
00125 
00126     virtual MutexRef createMutex() override;
00127     virtual void lockMutex(MutexRef mutex) override;
00128     virtual void unlockMutex(MutexRef mutex) override;
00129     virtual void deleteMutex(MutexRef mutex) override;
00130 
00132 
00135 
00136     virtual Audio::Mixer *getMixer() override;
00137 
00139 
00142 
00143     virtual void displayMessageOnOSD(const char *msg) override;
00144     virtual void displayActivityIconOnOSD(const Graphics::Surface *icon) override;
00145 
00147 
00148 protected:
00151 
00152     MutexManager *_mutexManager;
00153     ResVmGraphicsManager *_graphicsManager; // ResidualVM: was GraphicsManager
00154     Audio::Mixer *_mixer;
00155 
00157 };
00158 
00159 #endif


Generated on Sat May 23 2020 05:00:28 for ResidualVM by doxygen 1.7.1
curved edge   curved edge