File indexing completed on 2024-05-19 16:35:17
0001 /* 0002 SPDX-FileCopyrightText: 2020 David Edmundson <davidedmundson@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 #pragma once 0007 0008 #include "kwin_export.h" 0009 0010 #include <QObject> 0011 0012 #include "datacontroldevicemanager_v1_interface.h" 0013 0014 struct wl_resource; 0015 0016 namespace KWaylandServer 0017 { 0018 class AbstractDataSource; 0019 class DataControlDeviceV1Interface; 0020 class DataControlSourceV1Interface; 0021 class DataControlOfferV1InterfacePrivate; 0022 0023 /** 0024 * The DataControlOfferV1Interface extension represents a piece of data offered for transfer. 0025 * 0026 * DataControlOfferV1Interface corresponds to the Wayland interface @c zwlr_data_control_offer_v1. 0027 */ 0028 class KWIN_EXPORT DataControlOfferV1Interface : public QObject 0029 { 0030 Q_OBJECT 0031 0032 public: 0033 ~DataControlOfferV1Interface() override; 0034 0035 void sendAllOffers(); 0036 wl_resource *resource() const; 0037 0038 private: 0039 friend class DataControlDeviceV1InterfacePrivate; 0040 explicit DataControlOfferV1Interface(AbstractDataSource *source, wl_resource *resource); 0041 0042 std::unique_ptr<DataControlOfferV1InterfacePrivate> d; 0043 }; 0044 0045 } 0046 0047 Q_DECLARE_METATYPE(KWaylandServer::DataControlOfferV1Interface *)