ScummVM API documentation
AndroidGraphicsManager Class Reference
Inheritance diagram for AndroidGraphicsManager:
OpenGL::OpenGLGraphicsManager AndroidCommonGraphics TouchControlsDrawer WindowedGraphicsManager GraphicsManager PaletteManager Common::NonCopyable

Public Member Functions

virtual void initSurface () override
 
virtual void deinitSurface () override
 
virtual void resizeSurface () override
 
virtual AndroidCommonGraphics::State getState () const override
 
virtual bool setState (const AndroidCommonGraphics::State &state) override
 
void updateScreen () override
 
void displayMessageOnOSD (const Common::U32String &msg) override
 
virtual bool notifyMousePosition (Common::Point &mouse) override
 
virtual Common::Point getMousePosition () override
 
float getHiDPIScreenFactor () const override
 
void touchControlNotifyChanged () override
 
void touchControlDraw (int16 x, int16 y, int16 w, int16 h, const Common::Rect &clip) override
 
- Public Member Functions inherited from OpenGL::OpenGLGraphicsManager
bool hasFeature (OSystem::Feature f) const override
 
void setFeatureState (OSystem::Feature f, bool enable) override
 
bool getFeatureState (OSystem::Feature f) const override
 
const OSystem::GraphicsModegetSupportedGraphicsModes () const override
 
int getDefaultGraphicsMode () const override
 
bool setGraphicsMode (int mode, uint flags=OSystem::kGfxModeNoFlags) override
 
int getGraphicsMode () const override
 
const OSystem::GraphicsModegetSupportedStretchModes () const override
 
int getDefaultStretchMode () const override
 
bool setStretchMode (int mode) override
 
int getStretchMode () const override
 
bool setShader (const Common::Path &fileNode) override
 
void beginGFXTransaction () override
 
OSystem::TransactionError endGFXTransaction () override
 
int getScreenChangeID () const override
 
void initSize (uint width, uint height, const Graphics::PixelFormat *format) override
 
int16 getWidth () const override
 
int16 getHeight () const override
 
void copyRectToScreen (const void *buf, int pitch, int x, int y, int w, int h) override
 
void fillScreen (uint32 col) override
 
void fillScreen (const Common::Rect &r, uint32 col) override
 
void updateScreen () override
 
Graphics::SurfacelockScreen () override
 
void unlockScreen () override
 
void setFocusRectangle (const Common::Rect &rect) override
 
void clearFocusRectangle () override
 
int16 getOverlayWidth () const override
 
int16 getOverlayHeight () const override
 
Graphics::PixelFormat getOverlayFormat () const override
 
void copyRectToOverlay (const void *buf, int pitch, int x, int y, int w, int h) override
 
void clearOverlay () override
 
void grabOverlay (Graphics::Surface &surface) const override
 
void setMouseCursor (const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format, const byte *mask) override
 
void setCursorPalette (const byte *colors, uint start, uint num) override
 
void displayMessageOnOSD (const Common::U32String &msg) override
 
void displayActivityIconOnOSD (const Graphics::Surface *icon) override
 
void setPalette (const byte *colors, uint start, uint num) override
 
void grabPalette (byte *colors, uint start, uint num) const override
 
- Public Member Functions inherited from WindowedGraphicsManager
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 uint getDefaultScaler () const
 
virtual uint getDefaultScaleFactor () const
 
virtual bool setScaler (uint mode, int factor)
 
virtual uint getScaler () const
 
virtual uint getScaleFactor () const
 
virtual void initSizeHint (const Graphics::ModeList &modes)
 
virtual void saveScreenshot ()
 
virtual bool lockMouse (bool lock)
 

Protected Member Functions

void setSystemMousePosition (const int x, const int y) override
 
void showOverlay (bool inGUI) override
 
void hideOverlay () override
 
bool loadVideoMode (uint requestedWidth, uint requestedHeight, const Graphics::PixelFormat &format) override
 
void refreshScreen () override
 
void syncVirtkeyboardState (bool virtkeybd_on) override
 
- Protected Member Functions inherited from OpenGL::OpenGLGraphicsManager
void renderCursor ()
 
bool isGLESContext () const
 
void notifyContextCreate (ContextType type, Framebuffer *target, const Graphics::PixelFormat &defaultFormat, const Graphics::PixelFormat &defaultFormatAlpha)
 
void notifyContextDestroy ()
 
SurfacecreateSurface (const Graphics::PixelFormat &format, bool wantAlpha=false, bool wantScaler=false, bool wantMask=false)
 
TransactionMode getTransactionMode () const
 
bool loadShader (const Common::Path &fileName)
 
bool saveScreenshot (const Common::Path &filename) const
 
bool getGLPixelFormat (const Graphics::PixelFormat &pixelFormat, GLenum &glIntFormat, GLenum &glFormat, GLenum &glType) const
 
bool gameNeedsAspectRatioCorrection () const override
 
int getGameRenderScale () const override
 
void recalculateDisplayAreas () override
 
void handleResizeImpl (const int width, const int height) override
 
void updateLinearFiltering ()
 
PipelinegetPipeline () const
 
void updateCursorPalette ()
 
void recalculateCursorScaling ()
 
virtual const Graphics::FontgetFontOSD () const
 
- Protected Member Functions inherited from WindowedGraphicsManager
Common::Point convertVirtualToWindow (const int x, const int y) const
 
Common::Point convertWindowToVirtual (int x, int y) const
 
frac_t getDesiredGameAspectRatio () const
 
void handleResize (const int width, const int height)
 
virtual void notifyActiveAreaChanged ()
 
bool showMouse (bool visible) override
 
void warpMouse (int x, int y) override
 
void setMousePosition (int x, int y)
 

Additional Inherited Members

- Protected Types inherited from OpenGL::OpenGLGraphicsManager
enum  TransactionMode { kTransactionNone = 0, kTransactionActive = 1, kTransactionRollback = 2 }
 
- Protected Attributes inherited from OpenGL::OpenGLGraphicsManager
VideoState _currentState
 
VideoState _oldState
 
Graphics::PixelFormat _defaultFormat
 
Graphics::PixelFormat _defaultFormatAlpha
 
Framebuffer_targetBuffer
 
Surface_gameScreen
 
byte _gamePalette [3 *256]
 
Surface_overlay
 
Surface_cursor
 
Surface_cursorMask
 
int _cursorHotspotX
 
int _cursorHotspotY
 
int _cursorHotspotXScaled
 
int _cursorHotspotYScaled
 
float _cursorWidthScaled
 
float _cursorHeightScaled
 
uint32 _cursorKeyColor
 
bool _cursorUseKey
 
bool _cursorDontScale
 
bool _cursorPaletteEnabled
 
byte _cursorPalette [3 *256]
 
- Protected Attributes inherited from WindowedGraphicsManager
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
 

Member Function Documentation

◆ getState()

virtual AndroidCommonGraphics::State AndroidGraphicsManager::getState ( ) const
overridevirtual

Gets the current state of the graphics manager.

Implements AndroidCommonGraphics.

◆ setState()

virtual bool AndroidGraphicsManager::setState ( const AndroidCommonGraphics::State state)
overridevirtual

Sets up a basic state of the graphics manager.

Implements AndroidCommonGraphics.

◆ setSystemMousePosition()

void AndroidGraphicsManager::setSystemMousePosition ( const int  x,
const int  y 
)
inlineoverrideprotectedvirtual

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

Parameters
xX coordinate in window coordinates.
yY coordinate in window coordinates.

Implements WindowedGraphicsManager.

◆ loadVideoMode()

bool AndroidGraphicsManager::loadVideoMode ( uint  requestedWidth,
uint  requestedHeight,
const Graphics::PixelFormat format 
)
overrideprotectedvirtual

Set up the requested video mode. This takes parameters which describe what resolution the game screen requests (this is possibly aspect ratio corrected!).

A sub-class should take these parameters as hints. It might very well set up a mode which it thinks suites the situation best.

requestedWidth This is the requested actual game screen width.

Parameters
requestedHeightThis is the requested actual game screen height.
formatThis is the requested pixel format of the virtual game screen.
Returns
true on success, false otherwise

Implements OpenGL::OpenGLGraphicsManager.

◆ refreshScreen()

void AndroidGraphicsManager::refreshScreen ( )
overrideprotectedvirtual

Refresh the screen contents.

Implements OpenGL::OpenGLGraphicsManager.


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