2020-06-01 22:29:53 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2020 David Edmundson <davidedmundson@kde.org>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
|
|
|
*/
|
2021-03-10 16:08:30 +00:00
|
|
|
#pragma once
|
2020-06-01 22:29:53 +00:00
|
|
|
|
2022-04-22 09:27:33 +00:00
|
|
|
#include "kwin_export.h"
|
2020-06-01 22:29:53 +00:00
|
|
|
|
2022-04-22 09:27:33 +00:00
|
|
|
#include <QObject>
|
2022-08-01 21:29:02 +00:00
|
|
|
#include <memory>
|
2020-06-01 22:29:53 +00:00
|
|
|
|
|
|
|
#include "primaryselectiondevicemanager_v1_interface.h"
|
|
|
|
|
|
|
|
struct wl_resource;
|
|
|
|
namespace KWaylandServer
|
|
|
|
{
|
|
|
|
class AbstractDataSource;
|
|
|
|
class PrimarySelectionDeviceV1Interface;
|
|
|
|
class PrimarySelectionSourceV1Interface;
|
|
|
|
class PrimarySelectionOfferV1InterfacePrivate;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Represents the Resource for the wl_data_offer interface.
|
|
|
|
* Lifespan is mapped to the underlying object
|
2021-03-16 08:17:36 +00:00
|
|
|
*/
|
2022-04-22 09:27:33 +00:00
|
|
|
class KWIN_EXPORT PrimarySelectionOfferV1Interface : public QObject
|
2020-06-01 22:29:53 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
~PrimarySelectionOfferV1Interface() override;
|
|
|
|
|
|
|
|
void sendAllOffers();
|
|
|
|
wl_resource *resource() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
friend class PrimarySelectionDeviceV1InterfacePrivate;
|
|
|
|
explicit PrimarySelectionOfferV1Interface(AbstractDataSource *source, wl_resource *resource);
|
|
|
|
|
2022-08-01 21:29:02 +00:00
|
|
|
std::unique_ptr<PrimarySelectionOfferV1InterfacePrivate> d;
|
2020-06-01 22:29:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-08-29 05:11:06 +00:00
|
|
|
Q_DECLARE_METATYPE(KWaylandServer::PrimarySelectionOfferV1Interface *)
|