| 1 | // Copyright (C) 2020 Aleix Pol Gonzalez <aleixpol@kde.org> | 
| 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 QWAYLANDXDGACTIVATIONV1_P_H | 
| 5 | #define QWAYLANDXDGACTIVATIONV1_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 <QObject> | 
| 19 | #include "qwayland-xdg-activation-v1.h" | 
| 20 |  | 
| 21 | #include <QtWaylandClient/qtwaylandclientglobal.h> | 
| 22 |  | 
| 23 | QT_BEGIN_NAMESPACE | 
| 24 |  | 
| 25 | namespace QtWaylandClient { | 
| 26 |  | 
| 27 | class QWaylandDisplay; | 
| 28 | class QWaylandSurface; | 
| 29 |  | 
| 30 | class Q_WAYLANDCLIENT_EXPORT QWaylandXdgActivationTokenV1 | 
| 31 |     : public QObject, | 
| 32 |       public QtWayland::xdg_activation_token_v1 | 
| 33 | { | 
| 34 |     Q_OBJECT | 
| 35 | public: | 
| 36 |     ~QWaylandXdgActivationTokenV1() override; | 
| 37 |     void xdg_activation_token_v1_done(const QString &token) override { Q_EMIT done(token); } | 
| 38 |  | 
| 39 | Q_SIGNALS: | 
| 40 |     void done(const QString &token); | 
| 41 | }; | 
| 42 |  | 
| 43 | class Q_WAYLANDCLIENT_EXPORT QWaylandXdgActivationV1 : public QtWayland::xdg_activation_v1 | 
| 44 | { | 
| 45 | public: | 
| 46 |     QWaylandXdgActivationV1(struct ::wl_registry *registry, uint32_t id, uint32_t availableVersion); | 
| 47 |     ~QWaylandXdgActivationV1() override; | 
| 48 |  | 
| 49 |     QWaylandXdgActivationTokenV1 *requestXdgActivationToken(QWaylandDisplay *display, | 
| 50 |                                                             struct ::wl_surface *surface, | 
| 51 |                                                             std::optional<uint32_t> serial, | 
| 52 |                                                             const QString &app_id); | 
| 53 | }; | 
| 54 |  | 
| 55 | QT_END_NAMESPACE | 
| 56 |  | 
| 57 | } | 
| 58 |  | 
| 59 | #endif // QWAYLANDXDGACTIVATIONV1_P_H | 
| 60 |  |