KWin
Loading...
Searching...
No Matches
datacontroldevice_v1.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2020 David Edmundson <davidedmundson@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6#pragma once
7
8#include "kwin_export.h"
9
10#include <QObject>
11#include <memory>
12
13struct wl_resource;
14
15namespace KWin
16{
17class AbstractDataSource;
18class DataControlDeviceManagerV1Interface;
19class DataControlDeviceV1InterfacePrivate;
20class DataControlOfferV1Interface;
21class DataControlSourceV1Interface;
22class SeatInterface;
23class SurfaceInterface;
24
30class KWIN_EXPORT DataControlDeviceV1Interface : public QObject
31{
32 Q_OBJECT
33
34public:
36
37 SeatInterface *seat() const;
38 DataControlSourceV1Interface *selection() const;
39 DataControlSourceV1Interface *primarySelection() const;
40
41 void sendSelection(AbstractDataSource *other);
42
43 void sendPrimarySelection(AbstractDataSource *other);
44
45Q_SIGNALS:
47
49
50private:
52 explicit DataControlDeviceV1Interface(SeatInterface *seat, wl_resource *resource);
53
54 std::unique_ptr<DataControlDeviceV1InterfacePrivate> d;
55};
56
57}
58
The AbstractDataSource class abstracts the data that can be transferred to another client.
void primarySelectionChanged(KWin::DataControlSourceV1Interface *dataSource)
void selectionChanged(KWin::DataControlSourceV1Interface *dataSource)
Represents a Seat on the Wayland Display.
Definition seat.h:134
Q_DECLARE_METATYPE(KWin::SwitchEvent::State)