Abstract interface bridging compositor-agnostic logic to compositor-specific APIs. More...
#include <phosphor-compositor/include/PhosphorCompositor/ICompositorBridge.h>
Public Member Functions | |
| ICompositorBridge ()=default | |
| virtual | ~ICompositorBridge ()=default |
| ICompositorBridge (const ICompositorBridge &)=delete | |
| ICompositorBridge & | operator= (const ICompositorBridge &)=delete |
| ICompositorBridge (ICompositorBridge &&)=delete | |
| ICompositorBridge & | operator= (ICompositorBridge &&)=delete |
| virtual WindowHandle | findWindowById (const QString &windowId) const =0 |
| Find a window by its full window ID ("appId|instanceId") | |
| virtual QVector< WindowHandle > | findAllWindowsById (const QString &windowId) const =0 |
| Find all windows matching a window ID (exact + appId fallback for disambiguation) | |
| virtual QVector< WindowHandle > | stackingOrder () const =0 |
| Get all managed windows in stacking order (bottom to top) | |
| virtual QString | windowId (WindowHandle w) const =0 |
| Get the full window ID for a window ("appId|instanceId") | |
| virtual QString | windowScreenId (WindowHandle w) const =0 |
| Get the screen ID where a window is located. | |
| virtual QRectF | frameGeometry (WindowHandle w) const =0 |
| virtual QSizeF | minSize (WindowHandle w) const =0 |
| virtual bool | isMinimized (WindowHandle w) const =0 |
| virtual bool | isOnCurrentDesktop (WindowHandle w) const =0 |
| virtual bool | isOnCurrentActivity (WindowHandle w) const =0 |
| virtual bool | hasDecoration (WindowHandle w) const =0 |
| virtual bool | userCanSetNoBorder (WindowHandle w) const =0 |
| May this window's server-side decoration be toggled off? True for SSD windows even while they are CURRENTLY borderless (the toggle remains available); false for windows with no server-side title bar to hide — client-side-decorated apps (GTK/Electron), override- redirect surfaces, or decorations forced by a compositor rule. | |
| virtual bool | isNoBorder (WindowHandle w) const =0 |
| Is the server-side decoration currently suppressed? (KWin: Window::noBorder) | |
| virtual QRectF | moveResizeGeometry (WindowHandle w) const =0 |
| Geometry the compositor is currently moving the window toward. | |
| virtual WindowInfo | windowInfo (WindowHandle w) const =0 |
| Fill a WindowInfo snapshot (for bulk operations) | |
| virtual bool | shouldHandleWindow (WindowHandle w) const =0 |
| Should this window be managed by Phosphor at all? | |
| virtual bool | isTileableWindow (WindowHandle w) const =0 |
| Is this window eligible for autotile (stricter than shouldHandle)? | |
| virtual void | moveResize (WindowHandle w, const QRectF &geometry)=0 |
| Move/resize a window to the given geometry. | |
| virtual void | setNoBorder (WindowHandle w, bool noBorder)=0 |
| Set/remove server-side decoration (title bar) | |
| virtual void | setMaximized (WindowHandle w, bool maximized)=0 |
| Maximize or restore a window. | |
| virtual void | activateWindow (WindowHandle w)=0 |
| Give input focus to a window. | |
| virtual void | raiseWindow (WindowHandle w)=0 |
| Raise a window in the stacking order. | |
| virtual void | applyWindowGeometry (WindowHandle w, const QRectF &geometry, bool skipAnimation=false)=0 |
Move a window to a target geometry, running the configured placement transition (snap / tile / move) unless skipAnimation is set. | |
| virtual QObject * | asQObject ()=0 |
| Get the QObject parent for D-Bus watcher ownership. | |
| virtual bool | isDaemonReady () const =0 |
| Check if the daemon D-Bus service is registered and ready. | |
| virtual void | invalidateScreenIdCache ()=0 |
| Invalidate cached screen IDs (call on screen add/remove/reconfigure) | |
Abstract interface bridging compositor-agnostic logic to compositor-specific APIs.
This interface allows shared code (autotile state management, D-Bus signal dispatch, snap assist candidate building, etc.) to operate on windows without knowing whether the compositor is KWin, Wayfire, or something else.
Each compositor plugin implements this interface. The shared code calls these methods instead of directly accessing compositor-specific APIs.
Design principles:
Re-entrancy contract: const query methods (lookups, identity, properties, filtering) MUST NOT synchronously dispatch compositor events or call back into shared-code consumers. DecorationManager holds references into its window table across these queries; only the mutating actions (moveResize, setNoBorder, ...) are allowed to re-enter, and consumers order their state writes around those calls accordingly.
|
default |
|
virtualdefault |
|
delete |
|
delete |
|
pure virtual |
Give input focus to a window.
|
pure virtual |
Move a window to a target geometry, running the configured placement transition (snap / tile / move) unless skipAnimation is set.
|
pure virtual |
Get the QObject parent for D-Bus watcher ownership.
|
pure virtual |
Find all windows matching a window ID (exact + appId fallback for disambiguation)
|
pure virtual |
Find a window by its full window ID ("appId|instanceId")
|
pure virtual |
|
pure virtual |
|
pure virtual |
Invalidate cached screen IDs (call on screen add/remove/reconfigure)
|
pure virtual |
Check if the daemon D-Bus service is registered and ready.
|
pure virtual |
|
pure virtual |
Is the server-side decoration currently suppressed? (KWin: Window::noBorder)
|
pure virtual |
|
pure virtual |
|
pure virtual |
Is this window eligible for autotile (stricter than shouldHandle)?
|
pure virtual |
|
pure virtual |
Move/resize a window to the given geometry.
|
pure virtual |
Geometry the compositor is currently moving the window toward.
On Wayland this is set synchronously by moveResize(), unlike frameGeometry() which lags until the client acks the configure. (KWin: Window::moveResizeGeometry)
|
delete |
|
delete |
|
pure virtual |
Raise a window in the stacking order.
|
pure virtual |
Maximize or restore a window.
|
pure virtual |
Set/remove server-side decoration (title bar)
|
pure virtual |
Should this window be managed by Phosphor at all?
|
pure virtual |
Get all managed windows in stacking order (bottom to top)
|
pure virtual |
May this window's server-side decoration be toggled off? True for SSD windows even while they are CURRENTLY borderless (the toggle remains available); false for windows with no server-side title bar to hide — client-side-decorated apps (GTK/Electron), override- redirect surfaces, or decorations forced by a compositor rule.
(KWin: Window::userCanSetNoBorder)
|
pure virtual |
Get the full window ID for a window ("appId|instanceId")
|
pure virtual |
Fill a WindowInfo snapshot (for bulk operations)
|
pure virtual |
Get the screen ID where a window is located.