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 | void xdg_activation_token_v1_done(const QString &token) override { Q_EMIT done(token); } |
37 | |
38 | Q_SIGNALS: |
39 | void done(const QString &token); |
40 | }; |
41 | |
42 | class Q_WAYLANDCLIENT_EXPORT QWaylandXdgActivationV1 : public QtWayland::xdg_activation_v1 |
43 | { |
44 | public: |
45 | QWaylandXdgActivationV1(struct ::wl_registry *registry, uint32_t id, uint32_t availableVersion); |
46 | ~QWaylandXdgActivationV1() override; |
47 | |
48 | QWaylandXdgActivationTokenV1 *requestXdgActivationToken(QWaylandDisplay *display, |
49 | struct ::wl_surface *surface, |
50 | std::optional<uint32_t> serial, |
51 | const QString &app_id); |
52 | }; |
53 | |
54 | QT_END_NAMESPACE |
55 | |
56 | } |
57 | |
58 | #endif // QWAYLANDXDGACTIVATIONV1_P_H |
59 | |