// SPDX-FileCopyrightText: 2024 KylinSoft Co., Ltd.
//
// SPDX-License-Identifier: GPL-1.0-or-later

#pragma once

#include "qwayland-xdg-activation-v1.h"

#include <QObject>

namespace QtWaylandClient
{

class QWaylandDisplay;
class QWaylandSurface;

class XdgActivationTokenV1 : public QObject, public QtWayland::xdg_activation_token_v1
{
    Q_OBJECT
public:
    ~XdgActivationTokenV1() override;
    void xdg_activation_token_v1_done(const QString &token) override
    {
        Q_EMIT done(token);
    }

Q_SIGNALS:
    void done(const QString &token);
};

class XdgActivationV1 : public QtWayland::xdg_activation_v1
{
public:
    XdgActivationV1(struct ::wl_registry *registry, uint32_t id, uint32_t availableVersion);
    ~XdgActivationV1() override;

    XdgActivationTokenV1 *requestXdgActivationToken(QWaylandDisplay *display, struct ::wl_surface *surface, uint32_t serial, const QString &app_id);
};

}
