File indexing completed on 2024-12-08 04:58:34
0001 /** Copyright (C) 2020 Aleix Pol Gonzalez <aleixpol@kde.org> 0002 * SPDX-License-Identifier: LGPL-3.0-or-later 0003 */ 0004 0005 #ifndef QWAYLANDXDGACTIVATIONV1_P_H 0006 #define QWAYLANDXDGACTIVATIONV1_P_H 0007 0008 #include "qwayland-xdg-activation-v1.h" 0009 #include <QObject> 0010 0011 #include <QtWaylandClient/QWaylandClientExtension> 0012 0013 namespace QtWaylandClient 0014 { 0015 class QWaylandDisplay; 0016 class QWaylandSurface; 0017 } 0018 0019 class QWaylandXdgActivationTokenV1 : public QObject, public QtWayland::xdg_activation_token_v1 0020 { 0021 Q_OBJECT 0022 public: 0023 ~QWaylandXdgActivationTokenV1() override 0024 { 0025 destroy(); 0026 } 0027 0028 protected: 0029 void xdg_activation_token_v1_done(const QString &token) override 0030 { 0031 Q_EMIT done(token); 0032 } 0033 0034 Q_SIGNALS: 0035 void done(const QString &token); 0036 }; 0037 0038 class QWaylandXdgActivationV1 : public QWaylandClientExtensionTemplate<QWaylandXdgActivationV1>, public QtWayland::xdg_activation_v1 0039 { 0040 public: 0041 QWaylandXdgActivationV1(); 0042 ~QWaylandXdgActivationV1() override; 0043 0044 QWaylandXdgActivationTokenV1 * 0045 requestXdgActivationToken(QtWaylandClient::QWaylandDisplay *display, struct ::wl_surface *surface, std::optional<uint32_t> serial, const QString &app_id); 0046 }; 0047 0048 #endif // QWAYLANDXDGACTIVATIONV1_P_H