openMSX
Public Member Functions | List of all members
openmsx::SDLVideoSystem Class Referencefinal

#include <SDLVideoSystem.hh>

Inheritance diagram for openmsx::SDLVideoSystem:
Inheritance graph
[legend]
Collaboration diagram for openmsx::SDLVideoSystem:
Collaboration graph
[legend]

Public Member Functions

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

Additional Inherited Members

- Protected Member Functions inherited from openmsx::VideoSystem
 VideoSystem ()=default
 

Detailed Description

Definition at line 20 of file SDLVideoSystem.hh.

Constructor & Destructor Documentation

◆ SDLVideoSystem()

openmsx::SDLVideoSystem::SDLVideoSystem ( Reactor reactor)
explicit

◆ ~SDLVideoSystem()

openmsx::SDLVideoSystem::~SDLVideoSystem ( )
override

Member Function Documentation

◆ createRasterizer()

std::unique_ptr< Rasterizer > openmsx::SDLVideoSystem::createRasterizer ( VDP vdp)
overridevirtual

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.

Implements openmsx::VideoSystem.

Definition at line 57 of file SDLVideoSystem.cc.

References openmsx::MSXDevice::getMotherBoard(), openmsx::MSXDevice::getName(), openmsx::RenderSettings::getRenderer(), and openmsx::RenderSettings::SDLGL_PP.

◆ createV9990Rasterizer()

std::unique_ptr< V9990Rasterizer > openmsx::SDLVideoSystem::createV9990Rasterizer ( V9990 vdp)
overridevirtual

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.

Implements openmsx::VideoSystem.

Definition at line 71 of file SDLVideoSystem.cc.

References openmsx::MSXDevice::getMotherBoard(), openmsx::MSXDevice::getName(), openmsx::RenderSettings::getRenderer(), and openmsx::RenderSettings::SDLGL_PP.

◆ flush()

void openmsx::SDLVideoSystem::flush ( )
overridevirtual

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

Implements openmsx::VideoSystem.

Definition at line 100 of file SDLVideoSystem.cc.

◆ getClipboardText()

std::string openmsx::SDLVideoSystem::getClipboardText ( )
overridevirtual

Implements openmsx::VideoSystem.

Definition at line 153 of file SDLVideoSystem.cc.

◆ getCursorEnabled()

bool openmsx::SDLVideoSystem::getCursorEnabled ( )
overridevirtual

Implements openmsx::VideoSystem.

Definition at line 148 of file SDLVideoSystem.cc.

◆ getMouseCoord()

gl::ivec2 openmsx::SDLVideoSystem::getMouseCoord ( )
overridevirtual

Returns the current mouse pointer coordinates.

Implements openmsx::VideoSystem.

Definition at line 126 of file SDLVideoSystem.cc.

◆ getOutputSurface()

OutputSurface * openmsx::SDLVideoSystem::getOutputSurface ( )
overridevirtual

TODO.

Implements openmsx::VideoSystem.

Definition at line 133 of file SDLVideoSystem.cc.

◆ getWindowPosition()

std::optional< gl::ivec2 > openmsx::SDLVideoSystem::getWindowPosition ( )
overridevirtual

Implements openmsx::VideoSystem.

Definition at line 172 of file SDLVideoSystem.cc.

◆ repaint()

void openmsx::SDLVideoSystem::repaint ( )
overridevirtual

Requests a repaint of the output surface.

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

Implements openmsx::VideoSystem.

Definition at line 182 of file SDLVideoSystem.cc.

References openmsx::Display::repaintImpl().

◆ setClipboardText()

void openmsx::SDLVideoSystem::setClipboardText ( zstring_view  text)
overridevirtual

Implements openmsx::VideoSystem.

Definition at line 163 of file SDLVideoSystem.cc.

References zstring_view::c_str().

◆ setWindowPosition()

void openmsx::SDLVideoSystem::setWindowPosition ( gl::ivec2  pos)
overridevirtual

Implements openmsx::VideoSystem.

Definition at line 177 of file SDLVideoSystem.cc.

◆ showCursor()

void openmsx::SDLVideoSystem::showCursor ( bool  show)
overridevirtual

Implements openmsx::VideoSystem.

Definition at line 138 of file SDLVideoSystem.cc.

◆ takeScreenShot()

void openmsx::SDLVideoSystem::takeScreenShot ( const std::string &  filename,
bool  withOsd 
)
overridevirtual

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 from openmsx::VideoSystem.

Definition at line 105 of file SDLVideoSystem.cc.

References openmsx::Display::repaintImpl().

◆ updateWindowTitle()

void openmsx::SDLVideoSystem::updateWindowTitle ( )
overridevirtual

Called when the window title string has changed.

Reimplemented from openmsx::VideoSystem.

Definition at line 121 of file SDLVideoSystem.cc.


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