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 <PhosphorLayer/Surface.h>

Public Attributes

ILayerShellTransport * transport = nullptr
IQmlEngineProvider * engineProvider = nullptr
IScreenProvider * screenProvider = nullptr
 Screen provider the Surface subscribes to for hot-unplug detection and its primary-screen fallback.
ISurfaceAnimator * animator = nullptr
 Phase-5 hook for show/hide visual transitions.

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

◆ screenProvider

IScreenProvider* PhosphorLayer::SurfaceDeps::screenProvider = nullptr

Screen provider the Surface subscribes to for hot-unplug detection and its primary-screen fallback.

Optional: without it the Surface still follows its bound screen's destruction but cannot fall back to a primary. The factory always sets it.

◆ transport

ILayerShellTransport* PhosphorLayer::SurfaceDeps::transport = nullptr

The documentation for this struct was generated from the following file:
  • phosphor-layer/include/PhosphorLayer/Surface.h