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

Dependency bundle for SurfaceFactory. More...

#include <PhosphorLayer/SurfaceFactory.h>

Public Attributes

ILayerShellTransport * transport = nullptr
 Required. Concrete transport implementation (e.g. PhosphorWaylandTransport).
IScreenProvider * screens = nullptr
 Required. Source of truth for the QScreen set.
IQmlEngineProvider * engineProvider = nullptr
 Optional.
ISurfaceAnimator * animator = nullptr
 Optional.

Detailed Description

Dependency bundle for SurfaceFactory.

Note
Pre-1.0 ABI. Deps is a plain aggregate exposed across the DSO boundary. Adding or reordering fields between releases is a binary-incompatible change until the library reaches 1.0 (SOVERSION 0 signals this). Consumers using positional aggregate-init must rebuild against each release; prefer named-member init (Deps{.transport = ...}) for forward compatibility.

Member Data Documentation

◆ animator

ISurfaceAnimator* PhosphorLayer::SurfaceFactory::Deps::animator = nullptr

Optional.

Nullptr → Surface uses the no-op default animator (synchronous beginShow/beginHide; identical to the pre-Phase-5 lifecycle). Non-null → Surface dispatches show/hide transitions through this animator.

Lifetime contract: when non-null, the animator MUST outlive every Surface produced by this factory AND the factory itself. The factory propagates the raw pointer into each SurfaceDeps, and Surfaces dispatch through it on every state transition (including their own destruction, which calls cancel() to drop in-flight tracking). A common owner pattern: the consumer holds the animator and the SurfaceFactory together with the animator declared first so reverse-declaration-order destruction destroys the factory (and any Surfaces it parented) before the animator. See OverlayService member ordering for an example.

◆ engineProvider

IQmlEngineProvider* PhosphorLayer::SurfaceFactory::Deps::engineProvider = nullptr

Optional.

Nullptr → each Surface that loads contentUrl content without a sharedEngine owns its own QQmlEngine (default isolation). Non-null → provider decides (e.g. return the same engine for every call to share). A contentItem surface takes no engine either way.

Lifetime contract: see IQmlEngineProvider. A destroyed Surface releases its engine from the event loop after its window is gone, so the provider has to outlive that call too.

◆ screens

IScreenProvider* PhosphorLayer::SurfaceFactory::Deps::screens = nullptr

Required. Source of truth for the QScreen set.

◆ transport

ILayerShellTransport* PhosphorLayer::SurfaceFactory::Deps::transport = nullptr

Required. Concrete transport implementation (e.g. PhosphorWaylandTransport).


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