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
|
|
|
|
|
|
|
#include "abstract_data_source.h"
|
|
|
|
|
|
|
|
#include <KWaylandServer/kwaylandserver_export.h>
|
|
|
|
|
|
|
|
#include "primaryselectiondevicemanager_v1_interface.h"
|
|
|
|
|
|
|
|
namespace KWaylandServer
|
|
|
|
{
|
|
|
|
class PrimarySelectionSourceV1InterfacePrivate;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Represents the Resource for the zwp_primary_selection_source_v1 interface.
|
|
|
|
* Lifespan is mapped to the underlying object
|
2021-03-16 08:17:36 +00:00
|
|
|
*/
|
2020-06-01 22:29:53 +00:00
|
|
|
class KWAYLANDSERVER_EXPORT PrimarySelectionSourceV1Interface : public AbstractDataSource
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
~PrimarySelectionSourceV1Interface() override;
|
|
|
|
|
|
|
|
void requestData(const QString &mimeType, qint32 fd) override;
|
|
|
|
void cancel() override;
|
|
|
|
|
|
|
|
QStringList mimeTypes() const override;
|
|
|
|
|
|
|
|
static PrimarySelectionSourceV1Interface *get(wl_resource *native);
|
2020-06-25 15:27:52 +00:00
|
|
|
wl_client *client() const override;
|
2020-06-01 22:29:53 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
friend class PrimarySelectionDeviceManagerV1InterfacePrivate;
|
|
|
|
explicit PrimarySelectionSourceV1Interface(PrimarySelectionDeviceManagerV1Interface *parent, ::wl_resource *resource);
|
|
|
|
|
|
|
|
QScopedPointer<PrimarySelectionSourceV1InterfacePrivate> d;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2021-08-29 05:11:06 +00:00
|
|
|
Q_DECLARE_METATYPE(KWaylandServer::PrimarySelectionSourceV1Interface *)
|