Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
XdgToplevelTransport.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 fuddlesworth
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
7#include <PhosphorLayer/phosphorlayer_export.h>
8
9#include <memory>
10
11namespace PhosphorLayer {
12
41class PHOSPHORLAYER_EXPORT XdgToplevelTransport : public ILayerShellTransport
42{
43public:
46
47 bool isSupported() const override;
48 std::unique_ptr<ITransportHandle> attach(QQuickWindow* win, const TransportAttachArgs& args) override;
51
63
64private:
65 class Impl;
66 std::unique_ptr<Impl> m_impl;
67};
68
69} // namespace PhosphorLayer
Abstracts the layer-shell protocol binding.
Definition ILayerShellTransport.h:111
quint64 CompositorLostCookie
Definition ILayerShellTransport.h:150
std::function< void()> CompositorLostCallback
Register a callback fired when the compositor's layer-shell global is removed (compositor crash / res...
Definition ILayerShellTransport.h:149
Fallback transport for compositors without wlr-layer-shell.
Definition XdgToplevelTransport.h:42
void removeCompositorLostCallback(CompositorLostCookie cookie) override
std::unique_ptr< ITransportHandle > attach(QQuickWindow *win, const TransportAttachArgs &args) override
Mark win as a layer-shell surface with the given initial configuration.
bool isSupported() const override
True if the compositor advertises wlr-layer-shell.
void simulateCompositorLost()
Fire every registered compositor-lost callback.
CompositorLostCookie addCompositorLostCallback(CompositorLostCallback cb) override
Definition SurfaceAnimator.h:26
Arguments passed to ILayerShellTransport::attach().
Definition ILayerShellTransport.h:33