Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/x11/standalone/x11_output.h
- This file was copied from plugins/platforms/virtual/virtual_output.h.
1 | /******************************************************************** | 1 | /******************************************************************** | ||
---|---|---|---|---|---|
2 | KWin - the KDE window manager | 2 | KWin - the KDE window manager | ||
3 | This file is part of the KDE project. | 3 | This file is part of the KDE project. | ||
4 | 4 | | |||
5 | Copyright (C) 2018 Roman Gilg <subdiff@gmail.com> | 5 | Copyright 2019 Roman Gilg <subdiff@gmail.com> | ||
6 | 6 | | |||
7 | This program is free software; you can redistribute it and/or modify | 7 | This program is free software; you can redistribute it and/or modify | ||
8 | it under the terms of the GNU General Public License as published by | 8 | it under the terms of the GNU General Public License as published by | ||
9 | the Free Software Foundation; either version 2 of the License, or | 9 | the Free Software Foundation; either version 2 of the License, or | ||
10 | (at your option) any later version. | 10 | (at your option) any later version. | ||
11 | 11 | | |||
12 | This program is distributed in the hope that it will be useful, | 12 | This program is distributed in the hope that it will be useful, | ||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. | ||
16 | 16 | | |||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | #ifndef KWIN_VIRTUAL_OUTPUT_H | 20 | #ifndef KWIN_X11_OUTPUT_H | ||
21 | #define KWIN_VIRTUAL_OUTPUT_H | 21 | #define KWIN_X11_OUTPUT_H | ||
22 | 22 | | |||
23 | #include "abstract_output.h" | 23 | #include "abstract_output.h" | ||
24 | #include <kwin_export.h> | ||||
24 | 25 | | |||
25 | #include <QObject> | 26 | #include <QObject> | ||
26 | #include <QRect> | 27 | #include <QRect> | ||
27 | 28 | | |||
28 | namespace KWin | 29 | namespace KWin | ||
29 | { | 30 | { | ||
30 | class VirtualBackend; | | |||
31 | 31 | | |||
32 | class VirtualOutput : public AbstractOutput | 32 | /** | ||
33 | * X11 output representation | ||||
34 | **/ | ||||
35 | class KWIN_EXPORT X11Output : public AbstractOutput | ||||
33 | { | 36 | { | ||
34 | Q_OBJECT | 37 | Q_OBJECT | ||
35 | | ||||
36 | public: | 38 | public: | ||
37 | VirtualOutput(QObject *parent = nullptr); | 39 | explicit X11Output(QObject *parent = nullptr); | ||
38 | virtual ~VirtualOutput(); | 40 | virtual ~X11Output() = default; | ||
39 | | ||||
40 | QSize pixelSize() const override; | | |||
41 | 41 | | |||
42 | void setGeometry(const QRect &geo); | 42 | QString name() const override; | ||
43 | 43 | void setName(QString set); | |||
44 | int getGammaRampSize() const override { | 44 | /** | ||
45 | return m_gammaSize; | 45 | * The geometry of this output in global compositor co-ordinates (i.e scaled) | ||
46 | } | 46 | **/ | ||
47 | bool setGammaRamp(const ColorCorrect::GammaRamp &gamma) override { | 47 | QRect geometry() const override; | ||
48 | Q_UNUSED(gamma); | 48 | void setGeometry(QRect set); | ||
49 | return m_gammaResult; | 49 | | ||
50 | } | 50 | /** | ||
51 | * Current refresh rate in 1/ms. | ||||
52 | **/ | ||||
53 | int refreshRate() const override; | ||||
54 | void setRefreshRate(int set); | ||||
51 | 55 | | |||
52 | private: | 56 | private: | ||
53 | Q_DISABLE_COPY(VirtualOutput); | 57 | QString m_name; | ||
54 | friend class VirtualBackend; | 58 | QRect m_geometry; | ||
55 | 59 | int m_refreshRate; | |||
56 | QSize m_pixelSize; | | |||
57 | | ||||
58 | int m_gammaSize = 200; | | |||
59 | bool m_gammaResult = true; | | |||
60 | }; | 60 | }; | ||
61 | 61 | | |||
62 | } | 62 | } | ||
63 | 63 | | |||
64 | #endif | 64 | #endif |