1/*
2 SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleixpol@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef WAYLANDXDGACTIVATIONV1_P_H
8#define WAYLANDXDGACTIVATIONV1_P_H
9
10#include "qwayland-xdg-activation-v1.h"
11#include <QObject>
12#include <QtWaylandClient/QWaylandClientExtension>
13
14class QWaylandSurface;
15
16class WaylandXdgActivationTokenV1 : public QObject, public QtWayland::xdg_activation_token_v1
17{
18 Q_OBJECT
19public:
20 void xdg_activation_token_v1_done(const QString &token) override
21 {
22 Q_EMIT done(token);
23 }
24
25Q_SIGNALS:
26 void failed();
27 void done(const QString &token);
28};
29
30class WaylandXdgActivationV1 : public QWaylandClientExtensionTemplate<WaylandXdgActivationV1>, public QtWayland::xdg_activation_v1
31{
32public:
33 ~WaylandXdgActivationV1() override;
34
35 static WaylandXdgActivationV1 *self();
36
37 WaylandXdgActivationTokenV1 *requestXdgActivationToken(wl_seat *seat, struct ::wl_surface *surface, uint32_t serial, const QString &app_id);
38
39private:
40 WaylandXdgActivationV1();
41};
42
43#endif
44

source code of kwindowsystem/src/platforms/wayland/waylandxdgactivationv1_p.h