Changeset View
Changeset View
Standalone View
Standalone View
platform.h
Show First 20 Lines • Show All 178 Lines • ▼ Show 20 Line(s) | 82 | public: | |||
---|---|---|---|---|---|
179 | virtual QVector<qreal> screenScales() const; | 179 | virtual QVector<qreal> screenScales() const; | ||
180 | /** | 180 | /** | ||
181 | * Implement this method to receive configuration change requests through KWayland's | 181 | * Implement this method to receive configuration change requests through KWayland's | ||
182 | * OutputManagement interface. | 182 | * OutputManagement interface. | ||
183 | * | 183 | * | ||
184 | * Base implementation warns that the current backend does not implement this | 184 | * Base implementation warns that the current backend does not implement this | ||
185 | * functionality. | 185 | * functionality. | ||
186 | */ | 186 | */ | ||
187 | virtual void configurationChangeRequested(KWayland::Server::OutputConfigurationInterface *config); | 187 | void requestOutputsChange(KWayland::Server::OutputConfigurationInterface *config); | ||
188 | 188 | | |||
189 | /** | 189 | /** | ||
190 | * Whether the Platform requires compositing for rendering. | 190 | * Whether the Platform requires compositing for rendering. | ||
191 | * Default implementation returns @c true. If the implementing Platform allows to be used | 191 | * Default implementation returns @c true. If the implementing Platform allows to be used | ||
192 | * without compositing (e.g. rendering is done by the windowing system), re-implement this method. | 192 | * without compositing (e.g. rendering is done by the windowing system), re-implement this method. | ||
193 | */ | 193 | */ | ||
194 | virtual bool requiresCompositing() const; | 194 | virtual bool requiresCompositing() const; | ||
195 | /** | 195 | /** | ||
▲ Show 20 Lines • Show All 226 Lines • ▼ Show 20 Line(s) | |||||
422 | virtual Outputs outputs() const { | 422 | virtual Outputs outputs() const { | ||
423 | return Outputs(); | 423 | return Outputs(); | ||
424 | } | 424 | } | ||
425 | // actively compositing outputs (wl_output) | 425 | // actively compositing outputs (wl_output) | ||
426 | virtual Outputs enabledOutputs() const { | 426 | virtual Outputs enabledOutputs() const { | ||
427 | return Outputs(); | 427 | return Outputs(); | ||
428 | } | 428 | } | ||
429 | 429 | | |||
430 | AbstractOutput *findOutput(const QByteArray &uuid); | ||||
431 | virtual void enableOutput(AbstractOutput *output, bool enable); | ||||
432 | | ||||
430 | /** | 433 | /** | ||
431 | * A string of information to include in kwin debug output | 434 | * A string of information to include in kwin debug output | ||
432 | * It should not be translated. | 435 | * It should not be translated. | ||
433 | * | 436 | * | ||
434 | * The base implementation prints the name. | 437 | * The base implementation prints the name. | ||
435 | * @since 5.12 | 438 | * @since 5.12 | ||
436 | */ | 439 | */ | ||
437 | virtual QString supportInformation() const; | 440 | virtual QString supportInformation() const; | ||
▲ Show 20 Lines • Show All 68 Lines • ▼ Show 20 Line(s) | 498 | protected: | |||
506 | void setSupportsPointerWarping(bool set) { | 509 | void setSupportsPointerWarping(bool set) { | ||
507 | m_pointerWarping = set; | 510 | m_pointerWarping = set; | ||
508 | } | 511 | } | ||
509 | void setSupportsGammaControl(bool set) { | 512 | void setSupportsGammaControl(bool set) { | ||
510 | m_supportsGammaControl = set; | 513 | m_supportsGammaControl = set; | ||
511 | } | 514 | } | ||
512 | 515 | | |||
513 | /** | 516 | /** | ||
517 | * Whether the backend is supposed to change the configuration of outputs. | ||||
518 | */ | ||||
519 | void supportsOutputChanges() { | ||||
520 | m_supportsOutputChanges = true; | ||||
521 | } | ||||
522 | | ||||
523 | /** | ||||
514 | * Actual platform specific way to hide the cursor. | 524 | * Actual platform specific way to hide the cursor. | ||
515 | * Sub-classes need to implement if they support hiding the cursor. | 525 | * Sub-classes need to implement if they support hiding the cursor. | ||
516 | * | 526 | * | ||
517 | * This method is invoked by hideCursor if the cursor needs to be hidden. | 527 | * This method is invoked by hideCursor if the cursor needs to be hidden. | ||
518 | * The default implementation does nothing. | 528 | * The default implementation does nothing. | ||
519 | * | 529 | * | ||
520 | * @see doShowCursor | 530 | * @see doShowCursor | ||
521 | * @see hideCursor | 531 | * @see hideCursor | ||
Show All 27 Lines | 547 | private: | |||
549 | qreal m_initialOutputScale = 1; | 559 | qreal m_initialOutputScale = 1; | ||
550 | EGLDisplay m_eglDisplay; | 560 | EGLDisplay m_eglDisplay; | ||
551 | EGLConfig m_eglConfig = nullptr; | 561 | EGLConfig m_eglConfig = nullptr; | ||
552 | EGLContext m_context = EGL_NO_CONTEXT; | 562 | EGLContext m_context = EGL_NO_CONTEXT; | ||
553 | EGLSurface m_surface = EGL_NO_SURFACE; | 563 | EGLSurface m_surface = EGL_NO_SURFACE; | ||
554 | int m_hideCursorCounter = 0; | 564 | int m_hideCursorCounter = 0; | ||
555 | ColorCorrect::Manager *m_colorCorrect = nullptr; | 565 | ColorCorrect::Manager *m_colorCorrect = nullptr; | ||
556 | bool m_supportsGammaControl = false; | 566 | bool m_supportsGammaControl = false; | ||
567 | bool m_supportsOutputChanges = false; | ||||
557 | CompositingType m_selectedCompositor = NoCompositing; | 568 | CompositingType m_selectedCompositor = NoCompositing; | ||
558 | }; | 569 | }; | ||
559 | 570 | | |||
560 | } | 571 | } | ||
561 | 572 | | |||
562 | Q_DECLARE_INTERFACE(KWin::Platform, "org.kde.kwin.Platform") | 573 | Q_DECLARE_INTERFACE(KWin::Platform, "org.kde.kwin.Platform") | ||
563 | 574 | | |||
564 | #endif | 575 | #endif |