19#include <PhosphorOverlay/phosphoroverlay_export.h>
59 QStringView screenId, quint64 generation);
61class PHOSPHOROVERLAY_EXPORT
ShellHost :
public QObject
185 bool rekey(
const QString& oldKey,
const QString& newKey);
209 void hideSlot(
const QString& screenId,
const QString& slotKey, std::function<
void()> completion = {});
261 QHash<QString, ShellState*> m_states;
262 QSet<QString> m_creationFailed;
Concrete PhosphorLayer::ISurfaceAnimator driving show/hide via phosphor-animation Profiles.
Definition SurfaceAnimator.h:121
One layer-shell surface with a managed lifecycle.
Definition Surface.h:99
Definition ShellHost.h:62
std::function< void(const QString &screenId)> PreDestroyCallback
Hook fired before the library deletes the shell surface.
Definition ShellHost.h:90
QStringList failureScreenIds() const
Snapshot of every screen id currently flagged as failed.
const ShellState * stateFor(const QString &screenId) const
Read-only accessor.
void markFailure(const QString &screenId)
Sticky per-screen creation-failure flag.
ShellHost(QObject *parent=nullptr)
void hideSlot(const QString &screenId, const QString &slotKey, std::function< void()> completion={})
Animator-driven slot hide for the slot keyed by slotKey on the shell for screenId.
ShellState & stateFor(const QString &screenId)
Read-write accessor.
void destroyShell(const QString &screenId)
Tear down the shell for screenId.
void registerConfigForRole(const PhosphorLayer::Role &role, PhosphorAnimationLayer::SurfaceAnimator::Config config)
Register an animator config under role.
std::function< PhosphorLayer::Surface *(const QString &screenId, QScreen *physScreen)> SurfaceFactory
Consumer-provided factory for the per-screen layer-shell surface.
Definition ShellHost.h:70
bool hasFailure(const QString &screenId) const
void setPostCreateCallback(PostCreateCallback callback)
Inject the post-create hook (optional but typically used).
void removeState(const QString &screenId)
Remove the ShellState for screenId entirely.
ShellState * ensureShell(const QString &screenId, QScreen *physScreen)
Idempotent: bring up (or return) the per-screen shell for screenId on physScreen.
bool hasState(const QString &screenId) const
True if a ShellState exists (live or zeroed) for screenId.
QStringList screenIds() const
Enumerate every screen id with a ShellState entry (in arbitrary QHash iteration order).
void setSurfaceFactory(SurfaceFactory factory)
Inject the per-screen surface factory.
void setPreDestroyCallback(PreDestroyCallback callback)
Inject the pre-destroy hook (optional).
bool rekey(const QString &oldKey, const QString &newKey)
Move the ShellState entry from oldKey to newKey, preserving the underlying heap-allocated state objec...
std::function< void(const QString &screenId, ShellState &state)> PostCreateCallback
Hook fired after a fresh shell surface + window are recorded in the ShellState.
Definition ShellHost.h:77
void clearFailure(const QString &screenId)
void syncSurfaceState(const QString &screenId, bool anyVisible, bool anyInputGrabbing)
Reconcile the shell's mapped state + pointer-input region with the consumer's view of what's live on ...
void setSurfaceAnimator(PhosphorAnimationLayer::SurfaceAnimator *animator)
Inject the SurfaceAnimator that drives every slot's show/hide leg.
Definition ShellState.h:40
Definition SurfaceAnimator.h:26
Definition ShellHost.h:39
PHOSPHOROVERLAY_EXPORT PhosphorLayer::Role makePerInstanceRole(const PhosphorLayer::Role &base, QStringView screenId, quint64 generation)
Build a per-instance PhosphorLayer::Role by appending -{screenId}-{generation} to base's scope prefix...
constexpr const char * Surface
Definition LayerSurface.h:21
Per-role profile + scale tuning bundle.
Definition SurfaceAnimator.h:155
Value type describing a surface's protocol-level configuration.
Definition Role.h:77