Changeset View
Changeset View
Standalone View
Standalone View
platform.h
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | 51 | public: | |||
---|---|---|---|---|---|
99 | virtual QSize screenSize() const; | 99 | virtual QSize screenSize() const; | ||
100 | /** | 100 | /** | ||
101 | * Implementing subclasses should provide all geometries in case the backend represents | 101 | * Implementing subclasses should provide all geometries in case the backend represents | ||
102 | * a basic screen and uses the BasicScreens. | 102 | * a basic screen and uses the BasicScreens. | ||
103 | * | 103 | * | ||
104 | * Base implementation returns one QRect positioned at 0/0 with screenSize() as size. | 104 | * Base implementation returns one QRect positioned at 0/0 with screenSize() as size. | ||
105 | **/ | 105 | **/ | ||
106 | virtual QVector<QRect> screenGeometries() const; | 106 | virtual QVector<QRect> screenGeometries() const; | ||
107 | | ||||
108 | /** | ||||
109 | * Implementing subclasses should provide all geometries in case the backend represents | ||||
110 | * a basic screen and uses the BasicScreens. | ||||
111 | * | ||||
112 | * Base implementation returns a screen with a scale of 1. | ||||
113 | **/ | ||||
114 | virtual QVector<qreal> screenScales() const; | ||||
107 | /** | 115 | /** | ||
108 | * Implement this method to receive configuration change requests through KWayland's | 116 | * Implement this method to receive configuration change requests through KWayland's | ||
109 | * OutputManagement interface. | 117 | * OutputManagement interface. | ||
110 | * | 118 | * | ||
111 | * Base implementation warns that the current backend does not implement this | 119 | * Base implementation warns that the current backend does not implement this | ||
112 | * functionality. | 120 | * functionality. | ||
113 | */ | 121 | */ | ||
114 | virtual void configurationChangeRequested(KWayland::Server::OutputConfigurationInterface *config); | 122 | virtual void configurationChangeRequested(KWayland::Server::OutputConfigurationInterface *config); | ||
▲ Show 20 Lines • Show All 148 Lines • ▼ Show 20 Line(s) | 270 | void setOutputsEnabled(bool enabled) { | |||
263 | m_outputsEnabled = enabled; | 271 | m_outputsEnabled = enabled; | ||
264 | } | 272 | } | ||
265 | int initialOutputCount() const { | 273 | int initialOutputCount() const { | ||
266 | return m_initialOutputCount; | 274 | return m_initialOutputCount; | ||
267 | } | 275 | } | ||
268 | void setInitialOutputCount(int count) { | 276 | void setInitialOutputCount(int count) { | ||
269 | m_initialOutputCount = count; | 277 | m_initialOutputCount = count; | ||
270 | } | 278 | } | ||
279 | qreal initialOutputScale() const { | ||||
280 | return m_initialOutputScale; | ||||
281 | } | ||||
282 | void setInitialOutputScale(qreal scale) { | ||||
283 | m_initialOutputScale = scale; | ||||
284 | } | ||||
271 | 285 | | |||
272 | public Q_SLOTS: | 286 | public Q_SLOTS: | ||
273 | void pointerMotion(const QPointF &position, quint32 time); | 287 | void pointerMotion(const QPointF &position, quint32 time); | ||
274 | void pointerButtonPressed(quint32 button, quint32 time); | 288 | void pointerButtonPressed(quint32 button, quint32 time); | ||
275 | void pointerButtonReleased(quint32 button, quint32 time); | 289 | void pointerButtonReleased(quint32 button, quint32 time); | ||
276 | void pointerAxisHorizontal(qreal delta, quint32 time); | 290 | void pointerAxisHorizontal(qreal delta, quint32 time); | ||
277 | void pointerAxisVertical(qreal delta, quint32 time); | 291 | void pointerAxisVertical(qreal delta, quint32 time); | ||
278 | void keyboardKeyPressed(quint32 key, quint32 time); | 292 | void keyboardKeyPressed(quint32 key, quint32 time); | ||
▲ Show 20 Lines • Show All 66 Lines • ▼ Show 20 Line(s) | 354 | private: | |||
345 | } m_cursor; | 359 | } m_cursor; | ||
346 | bool m_handlesOutputs = false; | 360 | bool m_handlesOutputs = false; | ||
347 | bool m_ready = false; | 361 | bool m_ready = false; | ||
348 | QSize m_initialWindowSize; | 362 | QSize m_initialWindowSize; | ||
349 | QByteArray m_deviceIdentifier; | 363 | QByteArray m_deviceIdentifier; | ||
350 | bool m_pointerWarping = false; | 364 | bool m_pointerWarping = false; | ||
351 | bool m_outputsEnabled = true; | 365 | bool m_outputsEnabled = true; | ||
352 | int m_initialOutputCount = 1; | 366 | int m_initialOutputCount = 1; | ||
367 | qreal m_initialOutputScale = 1; | ||||
353 | EGLDisplay m_eglDisplay; | 368 | EGLDisplay m_eglDisplay; | ||
354 | int m_hideCursorCounter = 0; | 369 | int m_hideCursorCounter = 0; | ||
355 | }; | 370 | }; | ||
356 | 371 | | |||
357 | } | 372 | } | ||
358 | 373 | | |||
359 | Q_DECLARE_INTERFACE(KWin::Platform, "org.kde.kwin.Platform") | 374 | Q_DECLARE_INTERFACE(KWin::Platform, "org.kde.kwin.Platform") | ||
360 | 375 | | |||
361 | #endif | 376 | #endif |