openMSX
Public Member Functions | Protected Member Functions | List of all members
openmsx::VideoSystem Class Referenceabstract

Video back-end system. More...

#include <VideoSystem.hh>

Inheritance diagram for openmsx::VideoSystem:
Inheritance graph
[legend]

Public Member Functions

virtual ~VideoSystem ()=default
 
virtual std::unique_ptr< RasterizercreateRasterizer (VDP &vdp)=0
 Create the rasterizer selected by the current renderer setting.
 
virtual std::unique_ptr< V9990RasterizercreateV9990Rasterizer (V9990 &vdp)=0
 Create the V9990 rasterizer selected by the current renderer setting.
 
virtual void flush ()=0
 Finish pending drawing operations and make them visible to the user.
 
virtual void takeScreenShot (const std::string &filename, bool withOsd)
 Take a screenshot.
 
virtual void updateWindowTitle ()
 Called when the window title string has changed.
 
virtual gl::ivec2 getMouseCoord ()=0
 Returns the current mouse pointer coordinates.
 
virtual OutputSurfacegetOutputSurface ()=0
 TODO.
 
virtual void showCursor (bool show)=0
 
virtual bool getCursorEnabled ()=0
 
virtual std::string getClipboardText ()=0
 
virtual void setClipboardText (zstring_view text)=0
 
virtual std::optional< gl::ivec2getWindowPosition ()=0
 
virtual void setWindowPosition (gl::ivec2 pos)=0
 
virtual void repaint ()=0
 Requests a repaint of the output surface.
 

Protected Member Functions

 VideoSystem ()=default
 

Detailed Description

Video back-end system.

Definition at line 25 of file VideoSystem.hh.

Constructor & Destructor Documentation

◆ ~VideoSystem()

virtual openmsx::VideoSystem::~VideoSystem ( )
virtualdefault

◆ VideoSystem()

openmsx::VideoSystem::VideoSystem ( )
protecteddefault

Member Function Documentation

◆ createRasterizer()

virtual std::unique_ptr< Rasterizer > openmsx::VideoSystem::createRasterizer ( VDP vdp)
pure virtual

Create the rasterizer selected by the current renderer setting.

Video systems that use a rasterizer must override this method.

Parameters
vdpThe VDP whose display will be rendered.
Returns
The rasterizer created.

Implemented in openmsx::DummyVideoSystem, and openmsx::SDLVideoSystem.

◆ createV9990Rasterizer()

virtual std::unique_ptr< V9990Rasterizer > openmsx::VideoSystem::createV9990Rasterizer ( V9990 vdp)
pure virtual

Create the V9990 rasterizer selected by the current renderer setting.

Video systems that use a rasterizer must override this method.

Parameters
vdpThe V9990 whose display will be rendered.
Returns
The rasterizer created.

Implemented in openmsx::DummyVideoSystem, and openmsx::SDLVideoSystem.

◆ flush()

virtual void openmsx::VideoSystem::flush ( )
pure virtual

Finish pending drawing operations and make them visible to the user.

Implemented in openmsx::DummyVideoSystem, and openmsx::SDLVideoSystem.

◆ getClipboardText()

virtual std::string openmsx::VideoSystem::getClipboardText ( )
pure virtual

◆ getCursorEnabled()

virtual bool openmsx::VideoSystem::getCursorEnabled ( )
pure virtual

◆ getMouseCoord()

virtual gl::ivec2 openmsx::VideoSystem::getMouseCoord ( )
pure virtual

Returns the current mouse pointer coordinates.

Implemented in openmsx::DummyVideoSystem, and openmsx::SDLVideoSystem.

◆ getOutputSurface()

virtual OutputSurface * openmsx::VideoSystem::getOutputSurface ( )
pure virtual

◆ getWindowPosition()

virtual std::optional< gl::ivec2 > openmsx::VideoSystem::getWindowPosition ( )
pure virtual

◆ repaint()

virtual void openmsx::VideoSystem::repaint ( )
pure virtual

Requests a repaint of the output surface.

An implementation might start a repaint directly, or trigger a queued rendering.

Implemented in openmsx::DummyVideoSystem, and openmsx::SDLVideoSystem.

◆ setClipboardText()

virtual void openmsx::VideoSystem::setClipboardText ( zstring_view  text)
pure virtual

◆ setWindowPosition()

virtual void openmsx::VideoSystem::setWindowPosition ( gl::ivec2  pos)
pure virtual

◆ showCursor()

virtual void openmsx::VideoSystem::showCursor ( bool  show)
pure virtual

◆ takeScreenShot()

void openmsx::VideoSystem::takeScreenShot ( const std::string &  filename,
bool  withOsd 
)
virtual

Take a screenshot.

The default implementation throws an exception.

Parameters
filenameName of the file to save the screenshot to.
withOsdShould OSD elements be included in the screenshot.
Exceptions
MSXExceptionIf taking the screen shot fails.

Reimplemented in openmsx::SDLVideoSystem.

Definition at line 6 of file VideoSystem.cc.

◆ updateWindowTitle()

void openmsx::VideoSystem::updateWindowTitle ( )
virtual

Called when the window title string has changed.

Reimplemented in openmsx::SDLVideoSystem.

Definition at line 13 of file VideoSystem.cc.


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