DtkGui
DTK Gui module
载入中...
搜索中...
未找到
treelanddecorationclientextension.h
1// SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef TREELANDDECORATIONCLIENTEXTENSION_H
6#define TREELANDDECORATIONCLIENTEXTENSION_H
7
8#include "qwayland-treeland-decoration-unstable-v1.h"
9
10#include <dtkgui_global.h>
11#include <private/qwaylanddisplay_p.h>
12
13#include <QtWaylandClient/QWaylandClientExtension>
14#include <QWaylandClientExtensionTemplate>
15
16DGUI_BEGIN_NAMESPACE
17
18class TreelandDecorationManager : public QWaylandClientExtensionTemplate<TreelandDecorationManager>,
19 public QtWayland::treeland_decoration_manager_v1
20{
21 Q_OBJECT
22public:
23 static TreelandDecorationManager *instance();
24
25 [[nodiscard]] inline bool isSupported() const { return m_isSupported; }
26
27private:
28 void addListener();
29 void removeListener();
30
32 static void handleListenerGlobal(void *data, wl_registry *registry, uint32_t id, const QString &interface, uint32_t version);
33
34private:
35 QtWaylandClient::QWaylandDisplay *m_waylandDisplay = nullptr;
36 bool m_isSupported;
37};
38
39class TreelandDecorationContext : public QWaylandClientExtensionTemplate<TreelandDecorationContext>,
40 public QtWayland::treeland_decoration_context_v1
41{
42 Q_OBJECT
43public:
44 explicit TreelandDecorationContext(struct ::treeland_decoration_context_v1 *context);
46};
47
48DGUI_END_NAMESPACE
49
50#endif // TREELANDDECORATIONCLIENTEXTENSION_H
Definition treelanddecorationclientextension.h:41
Definition treelanddecorationclientextension.h:20