| e8555c89 Andy McCall |
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 |
|
| 13 |
namespace openmsx { |
| 14 |
|
| 15 |
class Rasterizer; |
| 16 |
class VDP; |
| 17 |
class V9990Rasterizer; |
| 18 |
class LDRasterizer; |
| 19 |
class V9990; |
| 20 |
class LaserdiscPlayer; |
| 21 |
class OutputSurface; |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
class VideoSystem |
| 26 |
{ |
| 27 |
public: |
| 28 |
virtual ~VideoSystem() = default; |
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
[[nodiscard]] virtual std::unique_ptr<Rasterizer> createRasterizer(VDP& vdp) = 0; |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 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 |
|
| 50 |
|
| 51 |
|
| 52 |
virtual void flush() = 0; |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
virtual void takeScreenShot(const std::string& filename, bool withOsd); |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
virtual void updateWindowTitle(); |
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
[[nodiscard]] virtual std::optional<gl::ivec2> getMouseCoord() = 0; |
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
[[nodiscard]] virtual std::optional<gl::vec2> getMsxPixelSize() = 0; |
| 78 |
|
| 79 |
|
| 80 |
[[nodiscard]] virtual OutputSurface* getOutputSurface() = 0; |
| 81 |
virtual void showCursor(bool show) = 0; |
| 82 |
[[nodiscard]] virtual bool getCursorEnabled() = 0; |
| 83 |
[[nodiscard]] virtual std::string getClipboardText() = 0; |
| 84 |
virtual void setClipboardText(zstring_view text) = 0; |
| 85 |
|
| 86 |
[[nodiscard]] virtual std::optional<gl::ivec2> getWindowPosition() = 0; |
| 87 |
virtual void setWindowPosition(gl::ivec2 pos) = 0; |
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
virtual void repaint() = 0; |
| 92 |
|
| 93 |
protected: |
| 94 |
VideoSystem() = default; |
| 95 |
}; |
| 96 |
|
| 97 |
} |
| 98 |
|
| 99 |
#endif |