KWayland

datadevice_interface.h
1 /*
2  SPDX-FileCopyrightText: 2014 Martin Gräßlin <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 #ifndef WAYLAND_SERVER_DATA_DEVICE_INTERFACE_H
7 #define WAYLAND_SERVER_DATA_DEVICE_INTERFACE_H
8 
9 #include <QObject>
10 
11 #include <KWayland/Server/kwaylandserver_export.h>
12 
13 #include "resource.h"
14 
15 namespace KWayland
16 {
17 namespace Server
18 {
19 
20 class DataDeviceManagerInterface;
21 class DataOfferInterface;
22 class DataSourceInterface;
23 class SeatInterface;
24 class SurfaceInterface;
25 
37 class KWAYLANDSERVER_EXPORT DataDeviceInterface : public Resource
38 {
39  Q_OBJECT
40 public:
41  virtual ~DataDeviceInterface();
42 
43  SeatInterface *seat() const;
44  DataSourceInterface *dragSource() const;
45  SurfaceInterface *origin() const;
46  SurfaceInterface *icon() const;
47 
52  quint32 dragImplicitGrabSerial() const;
53 
54  DataSourceInterface *selection() const;
55 
56  void sendSelection(DataDeviceInterface *other);
57  void sendClearSelection();
62  void drop();
75  void updateDragTarget(SurfaceInterface *surface, quint32 serial);
80  void updateProxy(SurfaceInterface *remote);
81 
82 Q_SIGNALS:
83  void dragStarted();
84  void selectionChanged(KWayland::Server::DataSourceInterface*);
85  void selectionCleared();
86 
87 private:
88  friend class DataDeviceManagerInterface;
89  explicit DataDeviceInterface(SeatInterface *seat, DataDeviceManagerInterface *parent, wl_resource *parentResource);
90 
91  class Private;
92  Private *d_func() const;
93 };
94 
95 }
96 }
97 
98 Q_DECLARE_METATYPE(KWayland::Server::DataDeviceInterface*)
99 
100 #endif
DataDeviceInterface allows clients to share data by copy-and-paste and drag-and-drop.
Represents the Global for wl_data_device_manager interface.
Represents a Seat on the Wayland Display.
Resource representing a wl_surface.
Represents a bound Resource.
Definition: resource.h:32
Represents the Resource for the wl_data_source interface.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Aug 7 2020 22:48:17 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.