aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/graphics.h
diff options
context:
space:
mode:
Diffstat (limited to 'backends/graphics/graphics.h')
-rw-r--r--backends/graphics/graphics.h85
1 files changed, 85 insertions, 0 deletions
diff --git a/backends/graphics/graphics.h b/backends/graphics/graphics.h
new file mode 100644
index 0000000000..6037bb10e3
--- /dev/null
+++ b/backends/graphics/graphics.h
@@ -0,0 +1,85 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef BACKENDS_GRAPHICS_ABSTRACT_H
+#define BACKENDS_GRAPHICS_ABSTRACT_H
+
+#include "common/system.h"
+#include "common/noncopyable.h"
+
+class GraphicsManager : Common::NonCopyable {
+public:
+ virtual ~GraphicsManager() {}
+
+ virtual bool hasFeature(OSystem::Feature f) = 0;
+ virtual void setFeatureState(OSystem::Feature f, bool enable) = 0;
+ virtual bool getFeatureState(OSystem::Feature f) = 0;
+
+ virtual const OSystem::GraphicsMode *getSupportedGraphicsModes() const = 0;
+ virtual int getDefaultGraphicsMode() const = 0;
+ virtual bool setGraphicsMode(int mode) = 0;
+ virtual int getGraphicsMode() const = 0;
+#ifdef USE_RGB_COLOR
+ virtual Graphics::PixelFormat getScreenFormat() const = 0;
+ virtual Common::List<Graphics::PixelFormat> getSupportedFormats() = 0;
+#endif
+ virtual void initSize(uint width, uint height, const Graphics::PixelFormat *format = NULL) = 0;
+ virtual int getScreenChangeID() const = 0;
+
+ virtual void beginGFXTransaction() = 0;
+ virtual OSystem::TransactionError endGFXTransaction() = 0;
+
+ virtual int16 getHeight() = 0;
+ virtual int16 getWidth() = 0;
+ virtual void setPalette(const byte *colors, uint start, uint num) = 0;
+ virtual void grabPalette(byte *colors, uint start, uint num) = 0;
+ virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) = 0;
+ virtual Graphics::Surface *lockScreen() = 0;
+ virtual void unlockScreen() = 0;
+ virtual void fillScreen(uint32 col) = 0;
+ virtual void updateScreen() = 0;
+ virtual void setShakePos(int shakeOffset) = 0;
+ virtual void setFocusRectangle(const Common::Rect& rect) = 0;
+ virtual void clearFocusRectangle() = 0;
+
+ virtual void showOverlay() = 0;
+ virtual void hideOverlay() = 0;
+ virtual Graphics::PixelFormat getOverlayFormat() const = 0;
+ virtual void clearOverlay() = 0;
+ virtual void grabOverlay(OverlayColor *buf, int pitch) = 0;
+ virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h)= 0;
+ virtual int16 getOverlayHeight() = 0;
+ virtual int16 getOverlayWidth() = 0;
+
+ virtual bool showMouse(bool visible) = 0;
+ virtual void warpMouse(int x, int y) = 0;
+ virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, int cursorTargetScale = 1, const Graphics::PixelFormat *format = NULL) = 0;
+ virtual void setCursorPalette(const byte *colors, uint start, uint num) = 0;
+ virtual void disableCursorPalette(bool disable) = 0;
+
+ virtual void displayMessageOnOSD(const char *msg) {}
+};
+
+#endif