kwin/src/wayland/primaryselectiondevicemanager_v1_interface.h
Vlad Zahorodnii 09e079b78f Remove factory methods in Display
The main reason why we have factory methods is that up to some point,
kwayland had its own signal to indicate when globals have to be removed.

Now that all globals add destroy listeners for the wl_display object,
we don't have that signal. Most factory methods are equivalent to doing
new T(display).

Besides adding unnecessary boilerplate code, another reason to get rid
of the factory methods is to reduce the amount of merge conflicts. If
several persons work on implementing wayland protocols at the same time,
sooner or later someone will have to resolve merge conflicts in Display.
2020-12-14 13:04:59 +00:00

43 lines
1.2 KiB
C++

/*
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
*/
#ifndef WAYLAND_SERVER_PRIMARY_SELECTION_DEVICE_MANAGER_INTERFACE_H
#define WAYLAND_SERVER_PRIMARY_SELECTION_DEVICE_MANAGER_INTERFACE_H
#include <QObject>
#include <KWaylandServer/kwaylandserver_export.h>
namespace KWaylandServer
{
class Display;
class PrimarySelectionSourceV1Interface;
class PrimarySelectionDeviceManagerV1InterfacePrivate;
class PrimarySelectionDeviceV1Interface;
/**
* @brief Represents the Global for zwp_primary_selection_manager_v1 interface.
*
**/
class KWAYLANDSERVER_EXPORT PrimarySelectionDeviceManagerV1Interface : public QObject
{
Q_OBJECT
public:
explicit PrimarySelectionDeviceManagerV1Interface(Display *display, QObject *parent = nullptr);
~PrimarySelectionDeviceManagerV1Interface();
Q_SIGNALS:
void dataSourceCreated(KWaylandServer::PrimarySelectionSourceV1Interface *dataSource);
void dataDeviceCreated(KWaylandServer::PrimarySelectionDeviceV1Interface *dataDevice);
private:
QScopedPointer<PrimarySelectionDeviceManagerV1InterfacePrivate> d;
};
}
#endif