File indexing completed on 2024-05-19 16:35:36

0001 /*
0002     KWin - the KDE window manager
0003     This file is part of the KDE project.
0004 
0005     SPDX-FileCopyrightText: 2019 Roman Gilg <subdiff@gmail.com>
0006 
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 #pragma once
0010 
0011 #include <kwinglobals.h>
0012 
0013 #include <QObject>
0014 #include <QPoint>
0015 
0016 class QProcess;
0017 
0018 namespace KWaylandServer
0019 {
0020 class AbstractDropHandler;
0021 }
0022 
0023 namespace KWin
0024 {
0025 class Window;
0026 
0027 namespace Xwl
0028 {
0029 enum class DragEventReply {
0030     // event should be ignored by the filter
0031     Ignore,
0032     // event is filtered out
0033     Take,
0034     // event should be handled as a Wayland native one
0035     Wayland,
0036 };
0037 } // namespace Xwl
0038 
0039 class KWIN_EXPORT XwaylandInterface
0040 {
0041 public:
0042     virtual Xwl::DragEventReply dragMoveFilter(Window *target, const QPoint &pos) = 0;
0043     virtual KWaylandServer::AbstractDropHandler *xwlDropHandler() = 0;
0044 
0045 protected:
0046     explicit XwaylandInterface() = default;
0047     virtual ~XwaylandInterface() = default;
0048 
0049 private:
0050     Q_DISABLE_COPY(XwaylandInterface)
0051 };
0052 
0053 } // namespace KWin