Changeset View
Changeset View
Standalone View
Standalone View
platform.h
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Line(s) | 48 | public: | |||
---|---|---|---|---|---|
96 | virtual QSize screenSize() const; | 96 | virtual QSize screenSize() const; | ||
97 | /** | 97 | /** | ||
98 | * Implementing subclasses should provide all geometries in case the backend represents | 98 | * Implementing subclasses should provide all geometries in case the backend represents | ||
99 | * a basic screen and uses the BasicScreens. | 99 | * a basic screen and uses the BasicScreens. | ||
100 | * | 100 | * | ||
101 | * Base implementation returns one QRect positioned at 0/0 with screenSize() as size. | 101 | * Base implementation returns one QRect positioned at 0/0 with screenSize() as size. | ||
102 | **/ | 102 | **/ | ||
103 | virtual QVector<QRect> screenGeometries() const; | 103 | virtual QVector<QRect> screenGeometries() const; | ||
104 | | ||||
105 | /** | ||||
106 | * Implementing subclasses should provide all geometries in case the backend represents | ||||
107 | * a basic screen and uses the BasicScreens. | ||||
108 | * | ||||
109 | * Base implementation returns a screen with a scale of 1. | ||||
110 | **/ | ||||
111 | virtual QVector<int> screenScales() const; | ||||
104 | /** | 112 | /** | ||
105 | * Implement this method to receive configuration change requests through KWayland's | 113 | * Implement this method to receive configuration change requests through KWayland's | ||
106 | * OutputManagement interface. | 114 | * OutputManagement interface. | ||
107 | * | 115 | * | ||
108 | * Base implementation warns that the current backend does not implement this | 116 | * Base implementation warns that the current backend does not implement this | ||
109 | * functionality. | 117 | * functionality. | ||
110 | */ | 118 | */ | ||
111 | virtual void configurationChangeRequested(KWayland::Server::OutputConfigurationInterface *config); | 119 | virtual void configurationChangeRequested(KWayland::Server::OutputConfigurationInterface *config); | ||
▲ Show 20 Lines • Show All 83 Lines • ▼ Show 20 Line(s) | 202 | void setOutputsEnabled(bool enabled) { | |||
195 | m_outputsEnabled = enabled; | 203 | m_outputsEnabled = enabled; | ||
196 | } | 204 | } | ||
197 | int initialOutputCount() const { | 205 | int initialOutputCount() const { | ||
198 | return m_initialOutputCount; | 206 | return m_initialOutputCount; | ||
199 | } | 207 | } | ||
200 | void setInitialOutputCount(int count) { | 208 | void setInitialOutputCount(int count) { | ||
201 | m_initialOutputCount = count; | 209 | m_initialOutputCount = count; | ||
202 | } | 210 | } | ||
211 | int initialOutputScale() const { | ||||
212 | return m_initialOutputScale; | ||||
213 | } | ||||
214 | void setInitialOutputScale(int scale) { | ||||
215 | m_initialOutputScale = scale; | ||||
216 | } | ||||
203 | 217 | | |||
204 | public Q_SLOTS: | 218 | public Q_SLOTS: | ||
205 | void pointerMotion(const QPointF &position, quint32 time); | 219 | void pointerMotion(const QPointF &position, quint32 time); | ||
206 | void pointerButtonPressed(quint32 button, quint32 time); | 220 | void pointerButtonPressed(quint32 button, quint32 time); | ||
207 | void pointerButtonReleased(quint32 button, quint32 time); | 221 | void pointerButtonReleased(quint32 button, quint32 time); | ||
208 | void pointerAxisHorizontal(qreal delta, quint32 time); | 222 | void pointerAxisHorizontal(qreal delta, quint32 time); | ||
209 | void pointerAxisVertical(qreal delta, quint32 time); | 223 | void pointerAxisVertical(qreal delta, quint32 time); | ||
210 | void keyboardKeyPressed(quint32 key, quint32 time); | 224 | void keyboardKeyPressed(quint32 key, quint32 time); | ||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | 262 | private: | |||
253 | } m_cursor; | 267 | } m_cursor; | ||
254 | bool m_handlesOutputs = false; | 268 | bool m_handlesOutputs = false; | ||
255 | bool m_ready = false; | 269 | bool m_ready = false; | ||
256 | QSize m_initialWindowSize; | 270 | QSize m_initialWindowSize; | ||
257 | QByteArray m_deviceIdentifier; | 271 | QByteArray m_deviceIdentifier; | ||
258 | bool m_pointerWarping = false; | 272 | bool m_pointerWarping = false; | ||
259 | bool m_outputsEnabled = true; | 273 | bool m_outputsEnabled = true; | ||
260 | int m_initialOutputCount = 1; | 274 | int m_initialOutputCount = 1; | ||
275 | int m_initialOutputScale = 1; | ||||
261 | EGLDisplay m_eglDisplay; | 276 | EGLDisplay m_eglDisplay; | ||
262 | }; | 277 | }; | ||
263 | 278 | | |||
264 | } | 279 | } | ||
265 | 280 | | |||
266 | Q_DECLARE_INTERFACE(KWin::Platform, "org.kde.kwin.Platform") | 281 | Q_DECLARE_INTERFACE(KWin::Platform, "org.kde.kwin.Platform") | ||
267 | 282 | | |||
268 | #endif | 283 | #endif |