KWayland

datasource_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_SOURCE_INTERFACE_H
7 #define WAYLAND_SERVER_DATA_SOURCE_INTERFACE_H
8 
9 #include <QObject>
10 
11 #include <KWayland/Server/kwaylandserver_export.h>
12 
13 #include "resource.h"
14 #include "datadevicemanager_interface.h"
15 
16 namespace KWayland
17 {
18 namespace Server
19 {
20 
24 class KWAYLANDSERVER_EXPORT DataSourceInterface : public Resource
25 {
26  Q_OBJECT
27 public:
28  virtual ~DataSourceInterface();
29 
30  void accept(const QString &mimeType);
31  void requestData(const QString &mimeType, qint32 fd);
32  void cancel();
33 
34  QStringList mimeTypes() const;
35 
36  static DataSourceInterface *get(wl_resource *native);
37 
42  DataDeviceManagerInterface::DnDActions supportedDragAndDropActions() const;
43 
48  void dropPerformed();
53  void dndFinished();
59  void dndAction(DataDeviceManagerInterface::DnDAction action);
60 
61 Q_SIGNALS:
62  void mimeTypeOffered(const QString&);
67  void supportedDragAndDropActionsChanged();
68 
69 private:
70  friend class DataDeviceManagerInterface;
71  explicit DataSourceInterface(DataDeviceManagerInterface *parent, wl_resource *parentResource);
72 
73  class Private;
74  Private *d_func() const;
75 };
76 
77 }
78 }
79 
80 Q_DECLARE_METATYPE(KWayland::Server::DataSourceInterface*)
81 
82 #endif
Represents the Global for wl_data_device_manager interface.
DnDAction
Drag and Drop actions supported by the DataSourceInterface.
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.