KWin
Loading...
Searching...
No Matches
databridge.h
Go to the documentation of this file.
1/*
2 KWin - the KDE window manager
3 This file is part of the KDE project.
4
5 SPDX-FileCopyrightText: 2018 Roman Gilg <subdiff@gmail.com>
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9#pragma once
10
11#include "effect/globals.h"
12
13#include <QAbstractNativeEventFilter>
14#include <QObject>
15#include <QPoint>
16
17namespace KWin
18{
19class DataDeviceInterface;
20class SurfaceInterface;
21class Window;
22
23namespace Xwl
24{
25class Clipboard;
26class Dnd;
27class Primary;
28enum class DragEventReply;
29
36class DataBridge : public QObject, public QAbstractNativeEventFilter
37{
38 Q_OBJECT
39
40public:
41 explicit DataBridge();
42
44
45 Dnd *dnd() const
46 {
47 return m_dnd;
48 }
49
50 bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override;
51
52private:
53 void init();
54
55 Clipboard *m_clipboard = nullptr;
56 Dnd *m_dnd = nullptr;
57 Primary *m_primary = nullptr;
58};
59
60} // namespace Xwl
61} // namespace KWin
Dnd * dnd() const
Definition databridge.h:45
DragEventReply dragMoveFilter(Window *target)
bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override