| 1 | // Copyright (C) 2024 David Reondo <kde@david-redondo.de> |
| 2 | // Copyright (C) 2024 David Edmundson <davidedmundson@kde.org> |
| 3 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 4 | |
| 5 | #ifndef QWAYLANDTOPLEVELICONV1_P_H |
| 6 | #define QWAYLANDTOPLEVELICONV1_P_H |
| 7 | |
| 8 | // |
| 9 | // W A R N I N G |
| 10 | // ------------- |
| 11 | // |
| 12 | // This file is not part of the Qt API. It exists purely as an |
| 13 | // implementation detail. This header file may change from version to |
| 14 | // version without notice, or even be removed. |
| 15 | // |
| 16 | // We mean it. |
| 17 | // |
| 18 | |
| 19 | #include "wayland-xdg-shell-client-protocol.h" |
| 20 | #include <qwayland-xdg-toplevel-icon-v1.h> |
| 21 | |
| 22 | #include <QList> |
| 23 | |
| 24 | QT_BEGIN_NAMESPACE |
| 25 | |
| 26 | class QIcon; |
| 27 | |
| 28 | namespace QtWaylandClient { |
| 29 | |
| 30 | class QWaylandDisplay; |
| 31 | |
| 32 | class QWaylandXdgToplevelIconManagerV1 : public QtWayland::xdg_toplevel_icon_manager_v1 |
| 33 | { |
| 34 | public: |
| 35 | QWaylandXdgToplevelIconManagerV1(QWaylandDisplay *display, wl_registry *registry, uint32_t id, |
| 36 | int version); |
| 37 | ~QWaylandXdgToplevelIconManagerV1() override; |
| 38 | void setIcon(const QIcon &icon, ::xdg_toplevel *window); |
| 39 | |
| 40 | protected: |
| 41 | void xdg_toplevel_icon_manager_v1_icon_size(int32_t size) override; |
| 42 | void xdg_toplevel_icon_manager_v1_done() override; |
| 43 | |
| 44 | private: |
| 45 | QList<int> mPreferredSizes; |
| 46 | QWaylandDisplay *mDisplay; |
| 47 | }; |
| 48 | } // namespace QtWaylandClient |
| 49 | |
| 50 | QT_END_NAMESPACE |
| 51 | |
| 52 | #endif |
| 53 | |