Changeset View
Changeset View
Standalone View
Standalone View
platform.h
Show First 20 Lines • Show All 170 Lines • ▼ Show 20 Line(s) | 82 | public: | |||
---|---|---|---|---|---|
171 | virtual QVector<qreal> screenScales() const; | 171 | virtual QVector<qreal> screenScales() const; | ||
172 | /** | 172 | /** | ||
173 | * Implement this method to receive configuration change requests through KWayland's | 173 | * Implement this method to receive configuration change requests through KWayland's | ||
174 | * OutputManagement interface. | 174 | * OutputManagement interface. | ||
175 | * | 175 | * | ||
176 | * Base implementation warns that the current backend does not implement this | 176 | * Base implementation warns that the current backend does not implement this | ||
177 | * functionality. | 177 | * functionality. | ||
178 | */ | 178 | */ | ||
179 | virtual void configurationChangeRequested(KWayland::Server::OutputConfigurationInterface *config); | 179 | void requestOutputsChange(KWayland::Server::OutputConfigurationInterface *config); | ||
180 | 180 | | |||
181 | /** | 181 | /** | ||
182 | * Whether the Platform requires compositing for rendering. | 182 | * Whether the Platform requires compositing for rendering. | ||
183 | * Default implementation returns @c true. If the implementing Platform allows to be used | 183 | * Default implementation returns @c true. If the implementing Platform allows to be used | ||
184 | * without compositing (e.g. rendering is done by the windowing system), re-implement this method. | 184 | * without compositing (e.g. rendering is done by the windowing system), re-implement this method. | ||
185 | */ | 185 | */ | ||
186 | virtual bool requiresCompositing() const; | 186 | virtual bool requiresCompositing() const; | ||
187 | /** | 187 | /** | ||
▲ Show 20 Lines • Show All 225 Lines • ▼ Show 20 Line(s) | |||||
413 | virtual Outputs outputs() const { | 413 | virtual Outputs outputs() const { | ||
414 | return Outputs(); | 414 | return Outputs(); | ||
415 | } | 415 | } | ||
416 | // actively compositing outputs (wl_output) | 416 | // actively compositing outputs (wl_output) | ||
417 | virtual Outputs enabledOutputs() const { | 417 | virtual Outputs enabledOutputs() const { | ||
418 | return Outputs(); | 418 | return Outputs(); | ||
419 | } | 419 | } | ||
420 | 420 | | |||
421 | AbstractOutput *findOutput(const QByteArray &uuid); | ||||
422 | virtual void enableOutput(AbstractOutput *output, bool enable); | ||||
423 | | ||||
421 | /** | 424 | /** | ||
422 | * A string of information to include in kwin debug output | 425 | * A string of information to include in kwin debug output | ||
423 | * It should not be translated. | 426 | * It should not be translated. | ||
424 | * | 427 | * | ||
425 | * The base implementation prints the name. | 428 | * The base implementation prints the name. | ||
426 | * @since 5.12 | 429 | * @since 5.12 | ||
427 | */ | 430 | */ | ||
428 | virtual QString supportInformation() const; | 431 | virtual QString supportInformation() const; | ||
▲ Show 20 Lines • Show All 68 Lines • ▼ Show 20 Line(s) | 489 | protected: | |||
497 | void setSupportsPointerWarping(bool set) { | 500 | void setSupportsPointerWarping(bool set) { | ||
498 | m_pointerWarping = set; | 501 | m_pointerWarping = set; | ||
499 | } | 502 | } | ||
500 | void setSupportsGammaControl(bool set) { | 503 | void setSupportsGammaControl(bool set) { | ||
501 | m_supportsGammaControl = set; | 504 | m_supportsGammaControl = set; | ||
502 | } | 505 | } | ||
503 | 506 | | |||
504 | /** | 507 | /** | ||
508 | * Whether the backend is supposed to change the configuration of outputs. | ||||
509 | */ | ||||
510 | void supportsOutputChanges() { | ||||
511 | m_supportsOutputChanges = true; | ||||
512 | } | ||||
513 | | ||||
514 | /** | ||||
505 | * Actual platform specific way to hide the cursor. | 515 | * Actual platform specific way to hide the cursor. | ||
506 | * Sub-classes need to implement if they support hiding the cursor. | 516 | * Sub-classes need to implement if they support hiding the cursor. | ||
507 | * | 517 | * | ||
508 | * This method is invoked by hideCursor if the cursor needs to be hidden. | 518 | * This method is invoked by hideCursor if the cursor needs to be hidden. | ||
509 | * The default implementation does nothing. | 519 | * The default implementation does nothing. | ||
510 | * | 520 | * | ||
511 | * @see doShowCursor | 521 | * @see doShowCursor | ||
512 | * @see hideCursor | 522 | * @see hideCursor | ||
Show All 27 Lines | 538 | private: | |||
540 | qreal m_initialOutputScale = 1; | 550 | qreal m_initialOutputScale = 1; | ||
541 | EGLDisplay m_eglDisplay; | 551 | EGLDisplay m_eglDisplay; | ||
542 | EGLConfig m_eglConfig = nullptr; | 552 | EGLConfig m_eglConfig = nullptr; | ||
543 | EGLContext m_context = EGL_NO_CONTEXT; | 553 | EGLContext m_context = EGL_NO_CONTEXT; | ||
544 | EGLSurface m_surface = EGL_NO_SURFACE; | 554 | EGLSurface m_surface = EGL_NO_SURFACE; | ||
545 | int m_hideCursorCounter = 0; | 555 | int m_hideCursorCounter = 0; | ||
546 | ColorCorrect::Manager *m_colorCorrect = nullptr; | 556 | ColorCorrect::Manager *m_colorCorrect = nullptr; | ||
547 | bool m_supportsGammaControl = false; | 557 | bool m_supportsGammaControl = false; | ||
558 | bool m_supportsOutputChanges = false; | ||||
548 | CompositingType m_selectedCompositor = NoCompositing; | 559 | CompositingType m_selectedCompositor = NoCompositing; | ||
549 | }; | 560 | }; | ||
550 | 561 | | |||
551 | } | 562 | } | ||
552 | 563 | | |||
553 | Q_DECLARE_INTERFACE(KWin::Platform, "org.kde.kwin.Platform") | 564 | Q_DECLARE_INTERFACE(KWin::Platform, "org.kde.kwin.Platform") | ||
554 | 565 | | |||
555 | #endif | 566 | #endif |