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 93 Lines • ▼ Show 20 Line(s) | 134 | void setOrientation(Qt::ScreenOrientation set) { | |||
134 | m_orientation = set; | 135 | m_orientation = set; | ||
135 | } | 136 | } | ||
136 | bool internal() const { | 137 | bool internal() const { | ||
137 | return m_internal; | 138 | return m_internal; | ||
138 | } | 139 | } | ||
139 | void setInternal(bool set) { | 140 | void setInternal(bool set) { | ||
140 | m_internal = set; | 141 | m_internal = set; | ||
141 | } | 142 | } | ||
143 | void setDpmsSupported(bool set) { | ||||
144 | m_supportsDpms = set; | ||||
145 | } | ||||
146 | virtual void updateDpms(KWayland::Server::OutputInterface::DpmsMode mode) { | ||||
147 | Q_UNUSED(mode); | ||||
148 | } | ||||
142 | virtual void updateMode(int modeIndex) { | 149 | virtual void updateMode(int modeIndex) { | ||
143 | Q_UNUSED(modeIndex); | 150 | Q_UNUSED(modeIndex); | ||
144 | } | 151 | } | ||
145 | virtual void transform(KWayland::Server::OutputDeviceInterface::Transform transform) { | 152 | virtual void transform(KWayland::Server::OutputDeviceInterface::Transform transform) { | ||
146 | Q_UNUSED(transform); | 153 | Q_UNUSED(transform); | ||
147 | } | 154 | } | ||
148 | void setWaylandMode(const QSize &size, int refreshRate); | 155 | void setWaylandMode(const QSize &size, int refreshRate); | ||
149 | 156 | | |||
150 | private: | 157 | private: | ||
151 | QPointer<KWayland::Server::OutputInterface> m_waylandOutput; | 158 | QPointer<KWayland::Server::OutputInterface> m_waylandOutput; | ||
152 | QPointer<KWayland::Server::XdgOutputInterface> m_xdgOutput; | 159 | QPointer<KWayland::Server::XdgOutputInterface> m_xdgOutput; | ||
153 | QPointer<KWayland::Server::OutputDeviceInterface> m_waylandOutputDevice; | 160 | QPointer<KWayland::Server::OutputDeviceInterface> m_waylandOutputDevice; | ||
154 | 161 | | |||
162 | KWayland::Server::OutputInterface::DpmsMode m_dpms = KWayland::Server::OutputInterface::DpmsMode::On; | ||||
163 | | ||||
155 | QPoint m_globalPos; | 164 | QPoint m_globalPos; | ||
156 | qreal m_scale = 1; | 165 | qreal m_scale = 1; | ||
157 | QSize m_physicalSize; | 166 | QSize m_physicalSize; | ||
158 | Qt::ScreenOrientation m_orientation = Qt::PrimaryOrientation; | 167 | Qt::ScreenOrientation m_orientation = Qt::PrimaryOrientation; | ||
159 | bool m_internal = false; | 168 | bool m_internal = false; | ||
169 | bool m_supportsDpms = false; | ||||
160 | }; | 170 | }; | ||
161 | 171 | | |||
162 | } | 172 | } | ||
163 | 173 | | |||
164 | #endif // KWIN_OUTPUT_H | 174 | #endif // KWIN_OUTPUT_H |