ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <windowed.h>

Inheritance diagram for WindowedGraphicsManager:
Collaboration diagram for WindowedGraphicsManager:

List of all members.

Classes

struct  DisplayArea
 Data about the display area of a virtual screen. More...

Public Member Functions

 WindowedGraphicsManager ()
virtual void showOverlay () override
virtual void hideOverlay () override
virtual void setShakePos (int shakeXOffset, int shakeYOffset) override
int getWindowWidth () const
int getWindowHeight () const

Protected Member Functions

virtual bool gameNeedsAspectRatioCorrection () const =0
virtual void handleResizeImpl (const int width, const int height, const int xdpi, const int ydpi)=0
 Backend-specific implementation for updating internal surfaces that need to reflect the new window size.
Common::Point convertVirtualToWindow (const int x, const int y) const
 Converts the given point from the active virtual screen's coordinate space to the window's coordinate space (i.e.
Common::Point convertWindowToVirtual (int x, int y) const
 Converts the given point from the window's coordinate space to the active virtual screen's coordinate space (i.e.
frac_t getDesiredGameAspectRatio () const
virtual int getGameRenderScale () const
void handleResize (const int width, const int height, const int xdpi, const int ydpi)
 Called after the window has been updated with new dimensions.
virtual void recalculateDisplayAreas ()
 Recalculates the display areas for the game and overlay surfaces within the window.
virtual void setSystemMousePosition (const int x, const int y)=0
 Sets the position of the hardware mouse cursor in the host system, relative to the window.
virtual bool showMouse (bool visible) override
void warpMouse (int x, int y) override
 Move ("warp") the mouse cursor to the specified position.
void setMousePosition (int x, int y)
 Sets the position of the rendered mouse cursor in the window.

Protected Attributes

int _windowWidth
 The width of the window, excluding window decoration.
int _windowHeight
 The height of the window, excluding window decoration.
int _xdpi
 The DPI of the window.
int _ydpi
bool _overlayVisible
 Whether the overlay (i.e.
int _gameScreenShakeXOffset
 The offset by which the screen is moved horizontally.
int _gameScreenShakeYOffset
 The offset by which the screen is moved vertically.
Common::Rect _gameDrawRect
 The scaled draw rectangle for the game surface within the window.
Common::Rect _overlayDrawRect
 The scaled draw rectangle for the overlay (launcher) surface within the window.
DisplayArea _activeArea
 Display area information about the currently active virtual screen.
bool _forceRedraw
 Whether the screen must be redrawn on the next frame.
bool _cursorVisible
 Whether the cursor is actually visible.
bool _cursorNeedsRedraw
 Whether the mouse cursor needs to be redrawn on the next frame.
bool _cursorLastInActiveArea
 Whether the last position of the system cursor was within the active area of the window.
int _cursorX
 The position of the mouse cursor, in window coordinates.
int _cursorY

Private Member Functions

void populateDisplayAreaDrawRect (const frac_t displayAspect, int originalWidth, Common::Rect &drawRect) const

Detailed Description

Definition at line 41 of file windowed.h.


Constructor & Destructor Documentation

WindowedGraphicsManager::WindowedGraphicsManager (  )  [inline]

Definition at line 43 of file windowed.h.


Member Function Documentation

Common::Point WindowedGraphicsManager::convertVirtualToWindow ( const int  x,
const int  y 
) const [inline, protected]

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).

Definition at line 110 of file windowed.h.

Common::Point WindowedGraphicsManager::convertWindowToVirtual ( int  x,
int  y 
) const [inline, protected]

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).

Definition at line 134 of file windowed.h.

virtual bool WindowedGraphicsManager::gameNeedsAspectRatioCorrection (  )  const [protected, pure virtual]
Returns:
whether or not the game screen must have aspect ratio correction applied for correct rendering.
frac_t WindowedGraphicsManager::getDesiredGameAspectRatio (  )  const [inline, protected]
Returns:
the desired aspect ratio of the game surface.

Definition at line 161 of file windowed.h.

virtual int WindowedGraphicsManager::getGameRenderScale (  )  const [inline, protected, virtual]
Returns:
the scale used between the game size and the surface on which it is rendered.

Definition at line 172 of file windowed.h.

int WindowedGraphicsManager::getWindowHeight (  )  const [inline]

Definition at line 90 of file windowed.h.

int WindowedGraphicsManager::getWindowWidth (  )  const [inline]

Definition at line 89 of file windowed.h.

void WindowedGraphicsManager::handleResize ( const int  width,
const int  height,
const int  xdpi,
const int  ydpi 
) [inline, protected]

Called after the window has been updated with new dimensions.

Parameters:
width The new width of the window, excluding window decoration.
height The new height of the window, excluding window decoration.

Definition at line 182 of file windowed.h.

virtual void WindowedGraphicsManager::handleResizeImpl ( const int  width,
const int  height,
const int  xdpi,
const int  ydpi 
) [protected, pure virtual]

Backend-specific implementation for updating internal surfaces that need to reflect the new window size.

virtual void WindowedGraphicsManager::hideOverlay (  )  [inline, override, virtual]

Implements GraphicsManager.

Definition at line 69 of file windowed.h.

void WindowedGraphicsManager::populateDisplayAreaDrawRect ( const frac_t  displayAspect,
int  originalWidth,
Common::Rect drawRect 
) const [inline, private]

Definition at line 373 of file windowed.h.

virtual void WindowedGraphicsManager::recalculateDisplayAreas (  )  [inline, protected, virtual]

Recalculates the display areas for the game and overlay surfaces within the window.

Definition at line 194 of file windowed.h.

void WindowedGraphicsManager::setMousePosition ( int  x,
int  y 
) [inline, protected]

Sets the position of the rendered mouse cursor in the window.

Parameters:
x X coordinate in window coordinates.
y Y coordinate in window coordinates.

Definition at line 268 of file windowed.h.

virtual void WindowedGraphicsManager::setShakePos ( int  shakeXOffset,
int  shakeYOffset 
) [inline, override, virtual]

Implements GraphicsManager.

Definition at line 80 of file windowed.h.

virtual void WindowedGraphicsManager::setSystemMousePosition ( const int  x,
const int  y 
) [protected, pure virtual]

Sets the position of the hardware mouse cursor in the host system, relative to the window.

Parameters:
x X coordinate in window coordinates.
y Y coordinate in window coordinates.
virtual bool WindowedGraphicsManager::showMouse ( bool  visible  )  [inline, override, protected, virtual]

Implements GraphicsManager.

Definition at line 226 of file windowed.h.

virtual void WindowedGraphicsManager::showOverlay (  )  [inline, override, virtual]

Implements GraphicsManager.

Definition at line 58 of file windowed.h.

void WindowedGraphicsManager::warpMouse ( int  x,
int  y 
) [inline, override, protected, virtual]

Move ("warp") the mouse cursor to the specified position.

Parameters:
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.

Definition at line 243 of file windowed.h.


Member Data Documentation

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.

Definition at line 344 of file windowed.h.

Whether the last position of the system cursor was within the active area of the window.

Definition at line 365 of file windowed.h.

Whether the mouse cursor needs to be redrawn on the next frame.

Definition at line 359 of file windowed.h.

Whether the cursor is actually visible.

Definition at line 354 of file windowed.h.

The position of the mouse cursor, in window coordinates.

Definition at line 370 of file windowed.h.

Definition at line 370 of file windowed.h.

Whether the screen must be redrawn on the next frame.

Definition at line 349 of file windowed.h.

The scaled draw rectangle for the game surface within the window.

Definition at line 311 of file windowed.h.

The offset by which the screen is moved horizontally.

Definition at line 301 of file windowed.h.

The offset by which the screen is moved vertically.

Definition at line 306 of file windowed.h.

The scaled draw rectangle for the overlay (launcher) surface within the window.

Definition at line 317 of file windowed.h.

Whether the overlay (i.e.

launcher, including the out-of-game launcher) is visible or not.

Definition at line 296 of file windowed.h.

The height of the window, excluding window decoration.

Definition at line 285 of file windowed.h.

The width of the window, excluding window decoration.

Definition at line 280 of file windowed.h.

The DPI of the window.

Definition at line 290 of file windowed.h.

Definition at line 290 of file windowed.h.


The documentation for this class was generated from the following file:


Generated on Sat Aug 8 2020 05:02:47 for ResidualVM by doxygen 1.7.1
curved edge   curved edge