Pass-through ISurfaceAnimator — calls onComplete() synchronously. More...
#include <phosphor-layer/include/PhosphorLayer/defaults/NoOpSurfaceAnimator.h>
Public Member Functions | |
| NoOpSurfaceAnimator ()=default | |
| ~NoOpSurfaceAnimator () override=default | |
| void | beginShow (Surface *, QQuickItem *, CompletionCallback onComplete) override |
Begin a show transition for surface. | |
| void | beginHide (Surface *, QQuickItem *, CompletionCallback onComplete) override |
Begin a hide transition for surface. | |
| void | cancel (Surface *) override |
Interrupt any in-flight animation for surface. | |
Public Member Functions inherited from PhosphorLayer::ISurfaceAnimator | |
| ISurfaceAnimator ()=default | |
| virtual | ~ISurfaceAnimator ()=default |
Additional Inherited Members | |
Public Types inherited from PhosphorLayer::ISurfaceAnimator | |
| using | CompletionCallback = std::function< void()> |
| Invoked when a show/hide animation completes. | |
Pass-through ISurfaceAnimator — calls onComplete() synchronously.
This is the implicit default when a consumer doesn't provide an animator. Handing it to SurfaceFactory::Deps is equivalent to leaving the animator field nullptr; the class exists so consumers that want an explicit "no animation" contract can opt in.
Rationale: 99% of layer-shell consumers animate in QML (Behavior on opacity { … }), which happens independently of this interface. The ISurfaceAnimator hook exists for cases QML can't cover (pre-show measurement, orchestrated multi-surface transitions).
|
default |
|
overridedefault |
|
inlineoverridevirtual |
Begin a hide transition for surface.
The Surface is transitioning Shown → Hidden. The animator should fade/slide the content, then invoke onComplete. The library does not delay window->hide() waiting for this — the current contract is "animate for visual polish, but the surface is considered hidden
the moment hide() is called".
Implements PhosphorLayer::ISurfaceAnimator.
|
inlineoverridevirtual |
Begin a show transition for surface.
The Surface has just become visible (Hidden → Shown). The animator can mutate rootItem (opacity, scale, y-offset) and drive an animation. Invoke onComplete when the transition finishes; the library uses this as a no-op today but a future version may defer compositor sync until the completion signal arrives.
Implements PhosphorLayer::ISurfaceAnimator.
|
inlineoverridevirtual |
Interrupt any in-flight animation for surface.
Called when the Surface is destroyed or the animation is superseded by an opposite transition (show-while-hiding).
Implements PhosphorLayer::ISurfaceAnimator.