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

QObject that emits signals for IScreenProvider state changes. More...

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

Inheritance diagram for PhosphorLayer::ScreenProviderNotifier:
[legend]

Signals

void screensChanged ()
 The screen list or geometry has changed.
 
void focusChanged ()
 IScreenProvider::focused() would now return a different QScreen*.
 
void primaryChanged ()
 IScreenProvider::primary() would now return a different QScreen*.
 

Public Member Functions

 ScreenProviderNotifier (QObject *parent=nullptr)
 
 ~ScreenProviderNotifier () override
 

Detailed Description

QObject that emits signals for IScreenProvider state changes.

Exposed separately from IScreenProvider because the interface itself is non-QObject (so implementers can freely multiple-inherit it into domain QObjects without the Qt multiple-QObject-inheritance restriction). Implementations return a pointer to a notifier they own; consumers connect to it with type-safe Qt5-style connect(...).

Constructor & Destructor Documentation

◆ ScreenProviderNotifier()

PhosphorLayer::ScreenProviderNotifier::ScreenProviderNotifier ( QObject *  parent = nullptr)
explicit

◆ ~ScreenProviderNotifier()

PhosphorLayer::ScreenProviderNotifier::~ScreenProviderNotifier ( )
override

Member Function Documentation

◆ focusChanged

void PhosphorLayer::ScreenProviderNotifier::focusChanged ( )
signal

IScreenProvider::focused() would now return a different QScreen*.

Implementations that can't track focus omit emitting this.

◆ primaryChanged

void PhosphorLayer::ScreenProviderNotifier::primaryChanged ( )
signal

IScreenProvider::primary() would now return a different QScreen*.

Implementations that alias primary to qGuiApp's primary should emit this on QGuiApplication::primaryScreenChanged; providers with their own primary policy (focused-monitor primary, virtual- screen primary) emit when their own state flips. Consumers observing isPrimary roles rely on this rather than reaching into qGuiApp directly — without it, multi-screen shells whose provider disagrees with qGuiApp would report a stale primary until the next full screensChanged.

◆ screensChanged

void PhosphorLayer::ScreenProviderNotifier::screensChanged ( )
signal

The screen list or geometry has changed.

Consumers diff the new IScreenProvider::screens() against their tracked set.


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