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
7#include "components.hh"
8
9#include <memory>
10#include <optional>
11#include <string>
12
13namespace openmsx {
14
15class Rasterizer;
16class VDP;
17class V9990Rasterizer;
18class LDRasterizer;
19class V9990;
20class LaserdiscPlayer;
21class OutputSurface;
22
26{
27public:
28 virtual ~VideoSystem() = default;
29
35 [[nodiscard]] virtual std::unique_ptr<Rasterizer> createRasterizer(VDP& vdp) = 0;
36
42 [[nodiscard]] virtual std::unique_ptr<V9990Rasterizer> createV9990Rasterizer(
43 V9990& vdp) = 0;
44
45#if COMPONENT_LASERDISC
46 [[nodiscard]] virtual std::unique_ptr<LDRasterizer> createLDRasterizer(
47 LaserdiscPlayer &ld) = 0;
48#endif
49
52 virtual void flush() = 0;
53
60 virtual void takeScreenShot(const std::string& filename, bool withOsd);
61
64 virtual void updateWindowTitle();
65
68 [[nodiscard]] virtual gl::ivec2 getMouseCoord() = 0;
69
71 [[nodiscard]] virtual OutputSurface* getOutputSurface() = 0;
72 virtual void showCursor(bool show) = 0;
73 [[nodiscard]] virtual bool getCursorEnabled() = 0;
74 [[nodiscard]] virtual std::string getClipboardText() = 0;
75 virtual void setClipboardText(zstring_view text) = 0;
76
77 [[nodiscard]] virtual std::optional<gl::ivec2> getWindowPosition() = 0;
78 virtual void setWindowPosition(gl::ivec2 pos) = 0;
79
82 virtual void repaint() = 0;
83
84protected:
85 VideoSystem() = default;
86};
87
88} // namespace openmsx
89
90#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:67
Video back-end system.
virtual void updateWindowTitle()
Called when the window title string has changed.
virtual void flush()=0
Finish pending drawing operations and make them visible to the user.
virtual bool getCursorEnabled()=0
virtual std::optional< gl::ivec2 > getWindowPosition()=0
virtual void takeScreenShot(const std::string &filename, bool withOsd)
Take a screenshot.
Definition VideoSystem.cc:6
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 OutputSurface * getOutputSurface()=0
TODO.
virtual void setWindowPosition(gl::ivec2 pos)=0
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.
This file implemented 3 utility functions:
Definition Autofire.cc:11