openMSX
VideoSystem.hh
Go to the documentation of this file.
1#ifndef VIDEOSYSTEM_HH
2#define VIDEOSYSTEM_HH
3
4#include "gl_vec.hh"
5#include "zstring_view.hh"
6#include <string>
7#include <memory>
8#include "components.hh"
9
10namespace openmsx {
11
12class Rasterizer;
13class VDP;
14class V9990Rasterizer;
15class LDRasterizer;
16class V9990;
17class LaserdiscPlayer;
18class OutputSurface;
19
23{
24public:
25 virtual ~VideoSystem() = default;
26
32 [[nodiscard]] virtual std::unique_ptr<Rasterizer> createRasterizer(VDP& vdp) = 0;
33
39 [[nodiscard]] virtual std::unique_ptr<V9990Rasterizer> createV9990Rasterizer(
40 V9990& vdp) = 0;
41
42#if COMPONENT_LASERDISC
43 [[nodiscard]] virtual std::unique_ptr<LDRasterizer> createLDRasterizer(
44 LaserdiscPlayer &ld) = 0;
45#endif
46
59 [[nodiscard]] virtual bool checkSettings();
60
63 virtual void flush() = 0;
64
71 virtual void takeScreenShot(const std::string& filename, bool withOsd);
72
75 virtual void updateWindowTitle();
76
79 [[nodiscard]] virtual gl::ivec2 getMouseCoord() = 0;
80
82 [[nodiscard]] virtual OutputSurface* getOutputSurface() = 0;
83 virtual void showCursor(bool show) = 0;
84 [[nodiscard]] virtual bool getCursorEnabled() = 0;
85 [[nodiscard]] virtual std::string getClipboardText() = 0;
86 virtual void setClipboardText(zstring_view text) = 0;
87
90 virtual void repaint() = 0;
91
92protected:
93 VideoSystem() = default;
94};
95
96} // namespace openmsx
97
98#endif
A frame buffer where pixels can be written to.
Implementation of the Yamaha V9990 VDP as used in the GFX9000 cartridge by Sunrise.
Definition: V9990.hh:35
Unified implementation of MSX Video Display Processors (VDPs).
Definition: VDP.hh:64
Video back-end system.
Definition: VideoSystem.hh:23
virtual void updateWindowTitle()
Called when the window title string has changed.
Definition: VideoSystem.cc:18
virtual void flush()=0
Finish pending drawing operations and make them visible to the user.
virtual bool getCursorEnabled()=0
virtual std::unique_ptr< LDRasterizer > createLDRasterizer(LaserdiscPlayer &ld)=0
virtual void takeScreenShot(const std::string &filename, bool withOsd)
Take a screenshot.
Definition: VideoSystem.cc:11
virtual std::unique_ptr< V9990Rasterizer > createV9990Rasterizer(V9990 &vdp)=0
Create the V9990 rasterizer selected by the current renderer setting.
virtual gl::ivec2 getMouseCoord()=0
Returns the current mouse pointer coordinates.
virtual void setClipboardText(zstring_view text)=0
virtual void repaint()=0
Requests a repaint of the output surface.
virtual bool checkSettings()
Requests that this renderer checks its settings against the current RenderSettings.
Definition: VideoSystem.cc:6
virtual OutputSurface * getOutputSurface()=0
TODO.
virtual std::string getClipboardText()=0
virtual void showCursor(bool show)=0
virtual ~VideoSystem()=default
virtual std::unique_ptr< Rasterizer > createRasterizer(VDP &vdp)=0
Create the rasterizer selected by the current renderer setting.
Like std::string_view, but with the extra guarantee that it refers to a zero-terminated string.
Definition: zstring_view.hh:22
This file implemented 3 utility functions:
Definition: Autofire.cc:9