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

Bundle of dependencies the Surface inherits from the factory. More...

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

Public Attributes

ILayerShellTransporttransport = nullptr
 
IQmlEngineProviderengineProvider = nullptr
 
IScreenProviderscreenProvider = nullptr
 Screen provider the Surface subscribes to for hot-unplug detection.
 
ISurfaceAnimatoranimator = nullptr
 Phase-5 hook for show/hide visual transitions.
 
QString loggingCategory
 

Detailed Description

Bundle of dependencies the Surface inherits from the factory.

Kept in the public header because SurfaceFactory::create() returns a Surface* and the dependency pointers need to travel with it; private because only SurfaceFactory constructs Surfaces. No stable ABI guarantee between library versions — revisit if Surface becomes user-constructible.

Note
Pre-1.0 ABI. SurfaceDeps is a plain aggregate exposed across the DSO boundary. Adding or reordering fields is a binary-incompatible change until the library reaches 1.0; consumers that aggregate-init by position must rebuild. Use named-member init (SurfaceDeps{.transport = ...}) for forward-compatibility.

Member Data Documentation

◆ animator

ISurfaceAnimator* PhosphorLayer::SurfaceDeps::animator = nullptr

Phase-5 hook for show/hide visual transitions.

Optional: nullptr means the Surface uses the library-internal NoOp default (synchronous onComplete; identical pre-Phase-5 behaviour). The factory propagates SurfaceFactory::Deps::animator into this slot.

Lifetime contract: when non-null, the animator MUST outlive every Surface that holds this SurfaceDeps. The Surface dispatches through the raw pointer on every show/hide and on its own destruction (~Impl calls animator().cancel(this) to drop in-flight tracking). Dropping the animator while a Surface still holds the pointer is UB.

◆ engineProvider

IQmlEngineProvider* PhosphorLayer::SurfaceDeps::engineProvider = nullptr

◆ loggingCategory

QString PhosphorLayer::SurfaceDeps::loggingCategory

◆ screenProvider

IScreenProvider* PhosphorLayer::SurfaceDeps::screenProvider = nullptr

Screen provider the Surface subscribes to for hot-unplug detection.

Optional: if nullptr the Surface cannot re-validate its bound QScreen* after screensChanged and will hand dangling pointers to the transport on reattach. The factory always sets it.

◆ transport

ILayerShellTransport* PhosphorLayer::SurfaceDeps::transport = nullptr

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