Classes | |
struct | DisplayArea |
Public Member Functions | |
void | showOverlay (bool inGUI) override |
void | hideOverlay () override |
bool | isOverlayVisible () const override |
void | setShakePos (int shakeXOffset, int shakeYOffset) override |
int | getWindowWidth () const |
int | getWindowHeight () const |
Public Member Functions inherited from GraphicsManager | |
virtual bool | hasFeature (OSystem::Feature f) const =0 |
virtual void | setFeatureState (OSystem::Feature f, bool enable)=0 |
virtual bool | getFeatureState (OSystem::Feature f) const =0 |
virtual const OSystem::GraphicsMode * | getSupportedGraphicsModes () const |
virtual int | getDefaultGraphicsMode () const |
virtual bool | setGraphicsMode (int mode, uint flags=OSystem::kGfxModeNoFlags) |
virtual int | getGraphicsMode () const |
virtual bool | setShader (const Common::Path &fileName) |
virtual const OSystem::GraphicsMode * | getSupportedStretchModes () const |
virtual int | getDefaultStretchMode () const |
virtual bool | setStretchMode (int mode) |
virtual int | getStretchMode () const |
virtual Common::RotationMode | getRotationMode () const |
virtual uint | getDefaultScaler () const |
virtual uint | getDefaultScaleFactor () const |
virtual bool | setScaler (uint mode, int factor) |
virtual uint | getScaler () const |
virtual uint | getScaleFactor () const |
virtual void | initSize (uint width, uint height, const Graphics::PixelFormat *format=NULL)=0 |
virtual void | initSizeHint (const Graphics::ModeList &modes) |
virtual int | getScreenChangeID () const =0 |
virtual void | beginGFXTransaction ()=0 |
virtual OSystem::TransactionError | endGFXTransaction ()=0 |
virtual int16 | getHeight () const =0 |
virtual int16 | getWidth () const =0 |
virtual void | setPalette (const byte *colors, uint start, uint num)=0 |
virtual void | grabPalette (byte *colors, uint start, uint num) const =0 |
virtual void | copyRectToScreen (const void *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 | fillScreen (const Common::Rect &r, uint32 col)=0 |
virtual void | updateScreen ()=0 |
virtual void | setFocusRectangle (const Common::Rect &rect)=0 |
virtual void | clearFocusRectangle ()=0 |
virtual Graphics::PixelFormat | getOverlayFormat () const =0 |
virtual void | clearOverlay ()=0 |
virtual void | grabOverlay (Graphics::Surface &surface) const =0 |
virtual void | copyRectToOverlay (const void *buf, int pitch, int x, int y, int w, int h)=0 |
virtual int16 | getOverlayHeight () const =0 |
virtual int16 | getOverlayWidth () const =0 |
virtual float | getHiDPIScreenFactor () const |
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 |
virtual void | setCursorPalette (const byte *colors, uint start, uint num)=0 |
virtual void | displayMessageOnOSD (const Common::U32String &msg) |
virtual void | displayActivityIconOnOSD (const Graphics::Surface *icon) |
virtual void | saveScreenshot () |
virtual bool | lockMouse (bool lock) |
Public Member Functions inherited from PaletteManager | |
void | setPalette (const Graphics::Palette &pal, uint start=0) |
Graphics::Palette | grabPalette (uint start, uint num) |
Protected Member Functions | |
virtual bool | gameNeedsAspectRatioCorrection () const =0 |
virtual void | handleResizeImpl (const int width, const int height)=0 |
Common::Point | convertVirtualToWindow (const int x, const int y) const |
Common::Point | convertWindowToVirtual (int x, int y) const |
frac_t | getDesiredGameAspectRatio () const |
virtual int | getGameRenderScale () const |
void | handleResize (const int width, const int height) |
virtual void | recalculateDisplayAreas () |
virtual void | setSystemMousePosition (const int x, const int y)=0 |
virtual void | notifyActiveAreaChanged () |
bool | showMouse (bool visible) override |
void | warpMouse (int x, int y) override |
void | setMousePosition (int x, int y) |
Protected Attributes | |
int | _windowWidth |
int | _windowHeight |
int | _screenAlign |
bool | _overlayVisible |
bool | _overlayInGUI |
int | _gameScreenShakeXOffset |
int | _gameScreenShakeYOffset |
Common::Rect | _gameDrawRect |
Common::Rect | _overlayDrawRect |
DisplayArea | _activeArea |
bool | _forceRedraw |
bool | _cursorVisible |
bool | _cursorNeedsRedraw |
bool | _cursorLastInActiveArea |
int | _cursorX |
int | _cursorY |
|
protectedpure virtual |
Implemented in OpenGL::OpenGLGraphicsManager, SurfaceSdlGraphicsManager, LibretroGraphics, and LibretroOpenGLGraphics.
|
protectedpure virtual |
Backend-specific implementation for updating internal surfaces that need to reflect the new window size.
Implemented in OpenGL::OpenGLGraphicsManager, SdlGraphicsManager, SurfaceSdlGraphicsManager, LibretroGraphics, OpenGLSdlGraphicsManager, and LibretroOpenGLGraphics.
|
inlineprotected |
Converts the given point from the active virtual screen's coordinate space to the window's coordinate space (i.e. game-to-window or overlay-to-window).
|
inlineprotected |
Converts the given point from the window's coordinate space to the active virtual screen's coordinate space (i.e. window-to-game or window-to-overlay).
|
inlineprotected |
|
inlineprotectedvirtual |
Reimplemented in OpenGL::OpenGLGraphicsManager, and SurfaceSdlGraphicsManager.
|
inlineprotected |
Called after the window has been updated with new dimensions.
width | The new width of the window, excluding window decoration. |
height | The new height of the window, excluding window decoration. |
|
inlineprotectedvirtual |
Recalculates the display areas for the game and overlay surfaces within the window.
Reimplemented in OpenGL::OpenGLGraphicsManager, and AndroidGraphicsManager.
|
protectedpure virtual |
Sets the position of the hardware mouse cursor in the host system, relative to the window.
x | X coordinate in window coordinates. |
y | Y coordinate in window coordinates. |
Implemented in SdlGraphicsManager, LibretroGraphics, AndroidGraphicsManager, iOSGraphicsManager, and LibretroOpenGLGraphics.
|
inlineprotectedvirtual |
Called whenever the active area has changed.
Reimplemented in SdlGraphicsManager.
|
inlineoverrideprotectedvirtual |
Move ("warp") the mouse cursor to the specified position.
x | The new X position of the mouse in virtual screen coordinates. |
y | The new Y position of the mouse in virtual screen coordinates. |
Implements GraphicsManager.
Reimplemented in LibretroGraphics.
|
inlineprotected |
Sets the position of the rendered mouse cursor in the window.
x | X coordinate in window coordinates. |
y | Y coordinate in window coordinates. |
|
protected |
The width of the window, excluding window decoration.
|
protected |
The height of the window, excluding window decoration.
|
protected |
How the overlay and game screens are aligned in the window. Centered vertically and horizontally by default.
|
protected |
Whether the overlay (i.e. launcher, including the out-of-game launcher) is visible or not.
|
protected |
Whether when overlay is shown, mouse coordinates depend on window or game screen size
|
protected |
The offset by which the screen is moved horizontally.
|
protected |
The offset by which the screen is moved vertically.
|
protected |
The scaled draw rectangle for the game surface within the window.
|
protected |
The scaled draw rectangle for the overlay (launcher) surface within the window.
|
protected |
Display area information about the currently active virtual screen. This will be the overlay screen when the overlay is active, and the game screen otherwise.
|
protected |
Whether the screen must be redrawn on the next frame.
|
protected |
Whether the cursor is actually visible.
|
protected |
Whether the mouse cursor needs to be redrawn on the next frame.
|
protected |
Whether the last position of the system cursor was within the active area of the window.
|
protected |
The position of the mouse cursor, in window coordinates.