8#include <PhosphorLayer/phosphorlayer_export.h>
132 static_assert(std::is_base_of_v<Surface, T>,
"T must derive from PhosphorLayer::Surface");
137 return new T(
Surface::CtorToken{}, std::move(cfg), std::move(*sdeps), parent ? parent :
this);
156 std::unique_ptr<Impl> m_impl;
Abstracts the layer-shell protocol binding.
Definition ILayerShellTransport.h:111
Hook point for consumer-controlled QQmlEngine ownership policy.
Definition IQmlEngineProvider.h:40
Source-of-truth interface for the available QScreen set.
Definition IScreenProvider.h:62
Hook point for show/hide transitions on Surfaces.
Definition ISurfaceAnimator.h:51
std::optional< SurfaceDeps > validateAndPrepareDeps(SurfaceConfig &cfg)
Run the factory's validation and produce a SurfaceDeps ready for Surface construction.
const Deps & deps() const noexcept
~SurfaceFactory() override
SurfaceFactory(Deps deps, QObject *parent=nullptr)
T * createAs(SurfaceConfig cfg, QObject *parent=nullptr)
Create a Surface subclass from a config.
Definition SurfaceFactory.h:130
Surface * create(SurfaceConfig cfg, QObject *parent=nullptr)
Create a Surface from a config.
Opaque construction token — only SurfaceFactory can create instances of it.
Definition Surface.h:257
One layer-shell surface with a managed lifecycle.
Definition Surface.h:105
Definition SurfaceAnimator.h:26
Immutable per-surface configuration passed to SurfaceFactory::create().
Definition SurfaceConfig.h:47
Bundle of dependencies the Surface inherits from the factory.
Definition Surface.h:42
Dependency bundle for SurfaceFactory.
Definition SurfaceFactory.h:49
ISurfaceAnimator * animator
Optional.
Definition SurfaceFactory.h:82
IQmlEngineProvider * engineProvider
Optional.
Definition SurfaceFactory.h:65
IScreenProvider * screens
Required. Source of truth for the QScreen set.
Definition SurfaceFactory.h:54
ILayerShellTransport * transport
Required. Concrete transport implementation (e.g. PhosphorWaylandTransport).
Definition SurfaceFactory.h:51