Changeset View
Changeset View
Standalone View
Standalone View
platform.h
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Line(s) | |||||
60 | class WaylandCursorTheme; | 60 | class WaylandCursorTheme; | ||
61 | 61 | | |||
62 | namespace Decoration | 62 | namespace Decoration | ||
63 | { | 63 | { | ||
64 | class Renderer; | 64 | class Renderer; | ||
65 | class DecoratedClientImpl; | 65 | class DecoratedClientImpl; | ||
66 | } | 66 | } | ||
67 | 67 | | |||
68 | class KWIN_EXPORT Outputs : public QVector<AbstractOutput*> | | |||
69 | { | | |||
70 | public: | | |||
71 | Outputs(){}; | | |||
72 | template <typename T> | | |||
73 | Outputs(const QVector<T> &other) { | | |||
74 | resize(other.size()); | | |||
75 | std::copy(other.constBegin(), other.constEnd(), begin()); | | |||
76 | } | | |||
77 | }; | | |||
78 | | ||||
79 | class KWIN_EXPORT Platform : public QObject | 68 | class KWIN_EXPORT Platform : public QObject | ||
80 | { | 69 | { | ||
81 | Q_OBJECT | 70 | Q_OBJECT | ||
82 | public: | 71 | public: | ||
83 | ~Platform() override; | 72 | ~Platform() override; | ||
84 | 73 | | |||
85 | virtual void init() = 0; | 74 | virtual void init() = 0; | ||
86 | virtual Screens *createScreens(QObject *parent = nullptr); | 75 | virtual Screens *createScreens(QObject *parent = nullptr); | ||
▲ Show 20 Lines • Show All 327 Lines • ▼ Show 20 Line(s) | 402 | bool supportsGammaControl() const { | |||
414 | return m_supportsGammaControl; | 403 | return m_supportsGammaControl; | ||
415 | } | 404 | } | ||
416 | 405 | | |||
417 | ColorCorrect::Manager *colorCorrectManager() { | 406 | ColorCorrect::Manager *colorCorrectManager() { | ||
418 | return m_colorCorrect; | 407 | return m_colorCorrect; | ||
419 | } | 408 | } | ||
420 | 409 | | |||
421 | // outputs with connections (org_kde_kwin_outputdevice) | 410 | // outputs with connections (org_kde_kwin_outputdevice) | ||
422 | virtual Outputs outputs() const { | 411 | virtual QVector<AbstractOutput *> outputs() const; | ||
gladhorn: This could even be non-virtual in my suggestion:
```
QVector<Output *> outputs() const {… | |||||
423 | return Outputs(); | | |||
424 | } | | |||
425 | // actively compositing outputs (wl_output) | 412 | // actively compositing outputs (wl_output) | ||
426 | virtual Outputs enabledOutputs() const { | 413 | virtual QVector<AbstractOutput *> enabledOutputs() const; | ||
427 | return Outputs(); | | |||
428 | } | | |||
429 | AbstractOutput *findOutput(const QByteArray &uuid); | 414 | AbstractOutput *findOutput(const QByteArray &uuid); | ||
430 | 415 | | |||
431 | /** | 416 | /** | ||
432 | * A string of information to include in kwin debug output | 417 | * A string of information to include in kwin debug output | ||
433 | * It should not be translated. | 418 | * It should not be translated. | ||
434 | * | 419 | * | ||
435 | * The base implementation prints the name. | 420 | * The base implementation prints the name. | ||
436 | * @since 5.12 | 421 | * @since 5.12 | ||
▲ Show 20 Lines • Show All 122 Lines • ▼ Show 20 Line(s) | 530 | private: | |||
559 | EGLConfig m_eglConfig = nullptr; | 544 | EGLConfig m_eglConfig = nullptr; | ||
560 | EGLContext m_context = EGL_NO_CONTEXT; | 545 | EGLContext m_context = EGL_NO_CONTEXT; | ||
561 | EGLSurface m_surface = EGL_NO_SURFACE; | 546 | EGLSurface m_surface = EGL_NO_SURFACE; | ||
562 | int m_hideCursorCounter = 0; | 547 | int m_hideCursorCounter = 0; | ||
563 | ColorCorrect::Manager *m_colorCorrect = nullptr; | 548 | ColorCorrect::Manager *m_colorCorrect = nullptr; | ||
564 | bool m_supportsGammaControl = false; | 549 | bool m_supportsGammaControl = false; | ||
565 | bool m_supportsOutputChanges = false; | 550 | bool m_supportsOutputChanges = false; | ||
566 | CompositingType m_selectedCompositor = NoCompositing; | 551 | CompositingType m_selectedCompositor = NoCompositing; | ||
567 | }; | 552 | }; | ||
gladhorn: QVector<Output*> m_outputs; | |||||
568 | 553 | | |||
569 | } | 554 | } | ||
570 | 555 | | |||
571 | Q_DECLARE_INTERFACE(KWin::Platform, "org.kde.kwin.Platform") | 556 | Q_DECLARE_INTERFACE(KWin::Platform, "org.kde.kwin.Platform") | ||
572 | 557 | | |||
573 | #endif | 558 | #endif |
This could even be non-virtual in my suggestion: