Changeset View
Changeset View
Standalone View
Standalone View
abstract_output.h
Show All 24 Lines | |||||
25 | 25 | | |||
26 | #include <QObject> | 26 | #include <QObject> | ||
27 | #include <QPoint> | 27 | #include <QPoint> | ||
28 | #include <QPointer> | 28 | #include <QPointer> | ||
29 | #include <QRect> | 29 | #include <QRect> | ||
30 | #include <QSize> | 30 | #include <QSize> | ||
31 | #include <QVector> | 31 | #include <QVector> | ||
32 | 32 | | |||
33 | #include <KWayland/Server/output_interface.h> | ||||
33 | #include <KWayland/Server/outputdevice_interface.h> | 34 | #include <KWayland/Server/outputdevice_interface.h> | ||
34 | 35 | | |||
35 | namespace KWayland | 36 | namespace KWayland | ||
36 | { | 37 | { | ||
37 | namespace Server | 38 | namespace Server | ||
38 | { | 39 | { | ||
39 | class OutputInterface; | 40 | class OutputInterface; | ||
40 | class OutputDeviceInterface; | 41 | class OutputDeviceInterface; | ||
▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | 99 | virtual int getGammaRampSize() const { | |||
99 | return 0; | 100 | return 0; | ||
100 | } | 101 | } | ||
101 | virtual bool setGammaRamp(const ColorCorrect::GammaRamp &gamma) { | 102 | virtual bool setGammaRamp(const ColorCorrect::GammaRamp &gamma) { | ||
102 | Q_UNUSED(gamma); | 103 | Q_UNUSED(gamma); | ||
103 | return false; | 104 | return false; | ||
104 | } | 105 | } | ||
105 | 106 | | |||
106 | protected: | 107 | protected: | ||
107 | void initWaylandOutput(); | 108 | void initWaylandOutput(bool dpmsSupported); | ||
108 | 109 | | |||
109 | QPointer<KWayland::Server::XdgOutputInterface> xdgOutput() const { | 110 | QPointer<KWayland::Server::XdgOutputInterface> xdgOutput() const { | ||
110 | return m_xdgOutput; | 111 | return m_xdgOutput; | ||
111 | } | 112 | } | ||
112 | void createXdgOutput(); | 113 | void createXdgOutput(); | ||
113 | 114 | | |||
114 | QPointer<KWayland::Server::OutputDeviceInterface> waylandOutputDevice() const { | 115 | QPointer<KWayland::Server::OutputDeviceInterface> waylandOutputDevice() const { | ||
115 | return m_waylandOutputDevice; | 116 | return m_waylandOutputDevice; | ||
Show All 15 Lines | 131 | void setOrientation(Qt::ScreenOrientation set) { | |||
131 | m_orientation = set; | 132 | m_orientation = set; | ||
132 | } | 133 | } | ||
133 | bool internal() const { | 134 | bool internal() const { | ||
134 | return m_internal; | 135 | return m_internal; | ||
135 | } | 136 | } | ||
136 | void setInternal(bool set) { | 137 | void setInternal(bool set) { | ||
137 | m_internal = set; | 138 | m_internal = set; | ||
138 | } | 139 | } | ||
140 | virtual void updateDpms(KWayland::Server::OutputInterface::DpmsMode mode) { | ||||
141 | Q_UNUSED(mode); | ||||
142 | } | ||||
139 | virtual void updateMode(int modeIndex) { | 143 | virtual void updateMode(int modeIndex) { | ||
140 | Q_UNUSED(modeIndex); | 144 | Q_UNUSED(modeIndex); | ||
141 | } | 145 | } | ||
142 | virtual void transform(KWayland::Server::OutputDeviceInterface::Transform transform) { | 146 | virtual void transform(KWayland::Server::OutputDeviceInterface::Transform transform) { | ||
143 | Q_UNUSED(transform); | 147 | Q_UNUSED(transform); | ||
144 | } | 148 | } | ||
145 | void setWaylandMode(const QSize &size, int refreshRate); | 149 | void setWaylandMode(const QSize &size, int refreshRate); | ||
146 | 150 | | |||
147 | private: | 151 | private: | ||
148 | QPointer<KWayland::Server::OutputInterface> m_waylandOutput; | 152 | QPointer<KWayland::Server::OutputInterface> m_waylandOutput; | ||
149 | QPointer<KWayland::Server::XdgOutputInterface> m_xdgOutput; | 153 | QPointer<KWayland::Server::XdgOutputInterface> m_xdgOutput; | ||
150 | QPointer<KWayland::Server::OutputDeviceInterface> m_waylandOutputDevice; | 154 | QPointer<KWayland::Server::OutputDeviceInterface> m_waylandOutputDevice; | ||
151 | 155 | | |||
156 | KWayland::Server::OutputInterface::DpmsMode m_dpms = KWayland::Server::OutputInterface::DpmsMode::On; | ||||
157 | | ||||
152 | QPoint m_globalPos; | 158 | QPoint m_globalPos; | ||
153 | qreal m_scale = 1; | 159 | qreal m_scale = 1; | ||
154 | QSize m_physicalSize; | 160 | QSize m_physicalSize; | ||
155 | Qt::ScreenOrientation m_orientation = Qt::PrimaryOrientation; | 161 | Qt::ScreenOrientation m_orientation = Qt::PrimaryOrientation; | ||
156 | bool m_internal = false; | 162 | bool m_internal = false; | ||
157 | }; | 163 | }; | ||
158 | 164 | | |||
159 | } | 165 | } | ||
160 | 166 | | |||
161 | #endif // KWIN_OUTPUT_H | 167 | #endif // KWIN_OUTPUT_H |