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


Generated on Sat Feb 15 2020 05:00:44 for ResidualVM by doxygen 1.7.1
curved edge   curved edge