22 #ifndef BACKENDS_GRAPHICS_ABSTRACT_H 23 #define BACKENDS_GRAPHICS_ABSTRACT_H 25 #include "common/system.h" 26 #include "common/noncopyable.h" 27 #include "common/keyboard.h" 28 #include "common/rotationmode.h" 30 #include "graphics/mode.h" 31 #include "graphics/paletteman.h" 46 static const OSystem::GraphicsMode noGraphicsModes[] = {{
"NONE",
"Normal", 0}, {
nullptr,
nullptr, 0 }};
47 return noGraphicsModes;
49 virtual int getDefaultGraphicsMode()
const {
return 0; }
51 virtual int getGraphicsMode()
const {
return 0; }
52 #if defined(USE_IMGUI) 53 virtual void setImGuiCallbacks(
const ImGuiCallbacks &callbacks) { }
54 virtual void *getImGuiTexture(
const Graphics::Surface &image,
const byte *palette,
int palCount) {
return nullptr; }
55 virtual void freeImGuiTexture(
void *texture) { }
57 virtual bool setShader(
const Common::Path &fileName) {
return false; }
59 static const OSystem::GraphicsMode noStretchModes[] = {{
"NONE",
"Normal", 0}, {
nullptr,
nullptr, 0 }};
60 return noStretchModes;
62 virtual int getDefaultStretchMode()
const {
return 0; }
63 virtual bool setStretchMode(
int mode) {
return false; }
64 virtual int getStretchMode()
const {
return 0; }
66 virtual uint getDefaultScaler()
const {
return 0; }
67 virtual uint getDefaultScaleFactor()
const {
return 1; }
68 virtual bool setScaler(uint mode,
int factor) {
return false; }
69 virtual uint getScaler()
const {
return 0; }
70 virtual uint getScaleFactor()
const {
return 1; }
78 virtual int getScreenChangeID()
const = 0;
80 virtual void beginGFXTransaction() = 0;
83 virtual int16 getHeight()
const = 0;
84 virtual int16 getWidth()
const = 0;
85 virtual void setPalette(
const byte *colors, uint start, uint num) = 0;
86 virtual void grabPalette(byte *colors, uint start, uint num)
const = 0;
87 virtual void copyRectToScreen(
const void *buf,
int pitch,
int x,
int y,
int w,
int h) = 0;
89 virtual void unlockScreen() = 0;
90 virtual void fillScreen(uint32 col) = 0;
91 virtual void fillScreen(
const Common::Rect &r, uint32 col) = 0;
92 virtual void updateScreen() = 0;
93 virtual void setShakePos(
int shakeXOffset,
int shakeYOffset) = 0;
94 virtual void setFocusRectangle(
const Common::Rect& rect) = 0;
95 virtual void clearFocusRectangle() = 0;
97 virtual void showOverlay(
bool inGUI) = 0;
98 virtual void hideOverlay() = 0;
99 virtual bool isOverlayVisible()
const = 0;
101 virtual void clearOverlay() = 0;
103 virtual void copyRectToOverlay(
const void *buf,
int pitch,
int x,
int y,
int w,
int h) = 0;
104 virtual int16 getOverlayHeight()
const = 0;
105 virtual int16 getOverlayWidth()
const = 0;
106 virtual float getHiDPIScreenFactor()
const {
return 1.0f; }
108 virtual bool showMouse(
bool visible) = 0;
109 virtual void warpMouse(
int x,
int y) = 0;
110 virtual void setMouseCursor(
const void *buf, uint w, uint h,
int hotspotX,
int hotspotY, uint32 keycolor,
bool dontScale =
false,
const Graphics::PixelFormat *format =
nullptr,
const byte *mask =
nullptr) = 0;
111 virtual void setCursorPalette(
const byte *colors, uint start, uint num) = 0;
121 virtual void saveScreenshot() {}
122 virtual bool lockMouse(
bool lock) {
return false; }
virtual void setPalette(const byte *colors, uint start, uint num)=0
Feature
Definition: system.h:403
TransactionError
Definition: system.h:1155
virtual void grabPalette(byte *colors, uint start, uint num) const =0
Definition: graphics.h:37
RotationMode
Definition: rotationmode.h:44
Definition: paletteman.h:47