Trivial IPanelSource that reports zero offsets and ready=true. More...
#include <phosphor-screens/include/PhosphorScreens/NoOpPanelSource.h>
Public Member Functions | |
| NoOpPanelSource (QObject *parent=nullptr) | |
| void | start () override |
| Begin watching. | |
| void | stop () override |
| Stop watching. | |
| Offsets | currentOffsets (QScreen *) const override |
| Snapshot for a given screen. | |
| bool | ready () const override |
Has any successful query landed? Drives ScreenManager's panelGeometryReady one-shot signal — consumers that compute initial zone geometry at daemon startup gate on this so they don't lay out windows against the unreserved screen rect. | |
| void | requestRequery (int delayMs=0) override |
| Best-effort: ask the backend to re-query immediately, optionally after a short delay (e.g. | |
Public Member Functions inherited from Phosphor::Screens::IPanelSource | |
| IPanelSource (QObject *parent=nullptr) | |
| ~IPanelSource () override=default | |
Additional Inherited Members | |
Signals inherited from Phosphor::Screens::IPanelSource | |
| void | panelOffsetsChanged (QScreen *screen) |
Offsets for screen changed. | |
| void | requeryCompleted () |
A requestRequery cycle completed. | |
Trivial IPanelSource that reports zero offsets and ready=true.
Use on hosts where panels don't reserve geometry (Wayfire, Sway, COSMIC with manual layout) or in unit tests. ScreenManager treats ready()=true as "no point waiting on panel geometry, the screen rect is the rect" so panelGeometryReady fires on the first start() and downstream layout starts immediately instead of stalling.
Header-only and inline — no compiled object code.
|
inlineexplicit |
|
inlineoverridevirtual |
Snapshot for a given screen.
Returns zero offsets if the source has no information for this screen yet.
Implements Phosphor::Screens::IPanelSource.
|
inlineoverridevirtual |
Has any successful query landed? Drives ScreenManager's panelGeometryReady one-shot signal — consumers that compute initial zone geometry at daemon startup gate on this so they don't lay out windows against the unreserved screen rect.
Latch semantics: implementations MAY keep ready() returning true across stop / start cycles — the contract is "panels
have been queried successfully at least once", not "a fresh query
has completed since the last start". Consumers that need a liveness indicator should listen for requeryCompleted after their own requestRequery, rather than polling ready().
Implements Phosphor::Screens::IPanelSource.
|
inlineoverridevirtual |
Best-effort: ask the backend to re-query immediately, optionally after a short delay (e.g.
to let a panel-editor UI close fully before settling). Implementations that don't support push-style refresh can no-op; requeryCompleted is still expected to fire at most once per call so callers can chain UI updates.
Implements Phosphor::Screens::IPanelSource.
|
inlineoverridevirtual |
Begin watching.
Implementations may emit panelOffsetsChanged any time after this returns; ScreenManager reads currentOffsets on each emission to refresh its cache.
Implements Phosphor::Screens::IPanelSource.
|
inlineoverridevirtual |
Stop watching.
Subsequent currentOffsets queries should still return the last-known values; only the change channel is closed.
Implements Phosphor::Screens::IPanelSource.