Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorLayer::IScreenProvider Class Referenceabstract

Source-of-truth interface for the available QScreen set. More...

#include <phosphor-layer/include/PhosphorLayer/IScreenProvider.h>

Inheritance diagram for PhosphorLayer::IScreenProvider:
[legend]

Public Member Functions

 IScreenProvider ()=default
 
virtual ~IScreenProvider ()=default
 
virtual QList< QScreen * > screens () const =0
 Full list of screens the surfaces should be aware of.
 
virtual QScreen * primary () const =0
 Canonical "primary" screen.
 
virtual QScreen * focused () const =0
 Screen currently containing the focus / cursor.
 
virtual ScreenProviderNotifiernotifier () const =0
 Notifier for signal-driven updates.
 

Detailed Description

Source-of-truth interface for the available QScreen set.

Abstracted so PlasmaZones can inject a virtual-screen-aware provider (where one physical QScreen may host several logical "screens") while a standalone consumer uses the default QGuiApplication-backed one.

Constructor & Destructor Documentation

◆ IScreenProvider()

PhosphorLayer::IScreenProvider::IScreenProvider ( )
default

◆ ~IScreenProvider()

virtual PhosphorLayer::IScreenProvider::~IScreenProvider ( )
virtualdefault

Member Function Documentation

◆ focused()

virtual QScreen * PhosphorLayer::IScreenProvider::focused ( ) const
pure virtual

Screen currently containing the focus / cursor.

Implementations that don't track focus return primary(). Consumers pick between primary() and focused() themselves when constructing a SurfaceConfig; the library does not carry an affinity enum.

Implemented in PhosphorLayer::DefaultScreenProvider.

◆ notifier()

virtual ScreenProviderNotifier * PhosphorLayer::IScreenProvider::notifier ( ) const
pure virtual

Notifier for signal-driven updates.

Pointer is owned by the provider; consumers must not delete it. Lifetime >= the provider's.

Implemented in PhosphorLayer::DefaultScreenProvider.

◆ primary()

virtual QScreen * PhosphorLayer::IScreenProvider::primary ( ) const
pure virtual

Canonical "primary" screen.

SurfaceFactory falls back here when a SurfaceConfig doesn't pin a specific QScreen*. Also used as the recovery target when a bound screen is hot-unplugged.

Implemented in PhosphorLayer::DefaultScreenProvider.

◆ screens()

virtual QList< QScreen * > PhosphorLayer::IScreenProvider::screens ( ) const
pure virtual

Full list of screens the surfaces should be aware of.

Implemented in PhosphorLayer::DefaultScreenProvider.


The documentation for this class was generated from the following file: