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 
00047 class ModularBackend : public BaseBackend {
00048 public:
00049     ModularBackend();
00050     virtual ~ModularBackend();
00051 
00054 
00055     virtual bool hasFeature(Feature f) override;
00056     virtual void setFeatureState(Feature f, bool enable) override;
00057     virtual bool getFeatureState(Feature f) override;
00058 
00060 
00063 
00064     virtual GraphicsManager *getGraphicsManager();
00065     virtual const GraphicsMode *getSupportedGraphicsModes() const override;
00066     virtual int getDefaultGraphicsMode() const override;
00067     virtual bool setGraphicsMode(int mode) override;
00068     virtual int getGraphicsMode() const override;
00069     virtual const GraphicsMode *getSupportedShaders() const override;
00070     virtual int getShader() const override;
00071     virtual bool setShader(int id) override;
00072     virtual const GraphicsMode *getSupportedStretchModes() const override;
00073     virtual int getDefaultStretchMode() const override;
00074     virtual bool setStretchMode(int mode) override;
00075     virtual int getStretchMode() const override;
00076     virtual void resetGraphicsScale() override;
00077 #ifdef USE_RGB_COLOR
00078     virtual Graphics::PixelFormat getScreenFormat() const override;
00079     virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const override;
00080 #endif
00081     virtual void initSize(uint width, uint height, const Graphics::PixelFormat *format = NULL) override;
00082     virtual void setupScreen(uint screenW, uint screenH, bool fullscreen, bool accel3d); // ResidualVM specific method
00083     virtual Graphics::PixelBuffer getScreenPixelBuffer(); // ResidualVM specific method
00084     virtual void suggestSideTextures(Graphics::Surface *left, Graphics::Surface *right); // ResidualVM specific method
00085     virtual void initSizeHint(const Graphics::ModeList &modes) override;
00086     virtual int getScreenChangeID() const override;
00087     virtual void saveScreenshot() override; // ResidualVM specific method
00088 
00089     virtual void beginGFXTransaction() override;
00090     virtual OSystem::TransactionError endGFXTransaction() override;
00091 
00092     virtual int16 getHeight() override;
00093     virtual int16 getWidth() override;
00094     virtual PaletteManager *getPaletteManager() override;
00095     virtual void copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) override;
00096     virtual Graphics::Surface *lockScreen() override;
00097     virtual void unlockScreen() override;
00098     virtual void fillScreen(uint32 col) override;
00099     virtual void updateScreen() override;
00100     virtual void setShakePos(int shakeOffset) override;
00101     virtual void setFocusRectangle(const Common::Rect& rect) override;
00102     virtual void clearFocusRectangle() override;
00103 
00104     virtual void showOverlay() override;
00105     virtual void hideOverlay() override;
00106     virtual Graphics::PixelFormat getOverlayFormat() const override;
00107     virtual void clearOverlay() override;
00108     virtual void grabOverlay(void *buf, int pitch) override;
00109     virtual void copyRectToOverlay(const void *buf, int pitch, int x, int y, int w, int h) override;
00110     virtual int16 getOverlayHeight() override;
00111     virtual int16 getOverlayWidth() override;
00112 
00113     virtual bool showMouse(bool visible) override;
00114     virtual void warpMouse(int x, int y) override;
00115     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;
00116     virtual void setCursorPalette(const byte *colors, uint start, uint num) override;
00117     virtual bool lockMouse(bool lock); // ResidualVM specific method
00118 
00120 
00123 
00124     virtual MutexRef createMutex() override;
00125     virtual void lockMutex(MutexRef mutex) override;
00126     virtual void unlockMutex(MutexRef mutex) override;
00127     virtual void deleteMutex(MutexRef mutex) override;
00128 
00130 
00133 
00134     virtual Audio::Mixer *getMixer() override;
00135 
00137 
00140 
00141     virtual void quit() override;
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 Jul 13 2019 05:00:54 for ResidualVM by doxygen 1.7.1
curved edge   curved edge