| 1 | // Copyright (C) 2018 The Qt Company Ltd. | 
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only | 
| 3 |  | 
| 4 | #ifndef QWAYLANDXDGDECORATIONV1_P_H | 
| 5 | #define QWAYLANDXDGDECORATIONV1_P_H | 
| 6 |  | 
| 7 | // | 
| 8 | //  W A R N I N G | 
| 9 | //  ------------- | 
| 10 | // | 
| 11 | // This file is not part of the Qt API.  It exists purely as an | 
| 12 | // implementation detail.  This header file may change from version to | 
| 13 | // version without notice, or even be removed. | 
| 14 | // | 
| 15 | // We mean it. | 
| 16 | // | 
| 17 |  | 
| 18 | #include "qwayland-xdg-decoration-unstable-v1.h" | 
| 19 |  | 
| 20 | #include <QtWaylandClient/qtwaylandclientglobal.h> | 
| 21 |  | 
| 22 | QT_BEGIN_NAMESPACE | 
| 23 |  | 
| 24 | class QWindow; | 
| 25 |  | 
| 26 | namespace QtWaylandClient { | 
| 27 |  | 
| 28 | class QWaylandXdgToplevel; | 
| 29 | class QWaylandXdgToplevelDecorationV1; | 
| 30 |  | 
| 31 | class Q_WAYLANDCLIENT_EXPORT QWaylandXdgDecorationManagerV1 : public QtWayland::zxdg_decoration_manager_v1 | 
| 32 | { | 
| 33 | public: | 
| 34 |     QWaylandXdgDecorationManagerV1(struct ::wl_registry *registry, uint32_t id, uint32_t availableVersion); | 
| 35 |     ~QWaylandXdgDecorationManagerV1() override; | 
| 36 |     QWaylandXdgToplevelDecorationV1 *createToplevelDecoration(::xdg_toplevel *toplevel); | 
| 37 | }; | 
| 38 |  | 
| 39 | class Q_WAYLANDCLIENT_EXPORT QWaylandXdgToplevelDecorationV1 : public QtWayland::zxdg_toplevel_decoration_v1 | 
| 40 | { | 
| 41 | public: | 
| 42 |     QWaylandXdgToplevelDecorationV1(::zxdg_toplevel_decoration_v1 *decoration); | 
| 43 |     ~QWaylandXdgToplevelDecorationV1() override; | 
| 44 |     void requestMode(mode mode); | 
| 45 |     void unsetMode(); | 
| 46 |     mode pending() const; | 
| 47 |     bool isConfigured() const; | 
| 48 |  | 
| 49 | protected: | 
| 50 |     void zxdg_toplevel_decoration_v1_configure(uint32_t mode) override; | 
| 51 |  | 
| 52 | private: | 
| 53 |     mode m_pending = mode_client_side; | 
| 54 |     mode m_requested = mode_client_side; | 
| 55 |     bool m_modeSet = false; | 
| 56 |     bool m_configured = false; | 
| 57 | }; | 
| 58 |  | 
| 59 | QT_END_NAMESPACE | 
| 60 |  | 
| 61 | } | 
| 62 |  | 
| 63 | #endif // QWAYLANDXDGDECORATIONV1_P_H | 
| 64 |  |