Changeset View
Changeset View
Standalone View
Standalone View
xwl/xwayland_interface.h
- This file was copied to xwl/drag.h.
Show All 17 Lines | |||||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | #ifndef KWIN_XWL_XWAYLAND_INTERFACE | 20 | #ifndef KWIN_XWL_XWAYLAND_INTERFACE | ||
21 | #define KWIN_XWL_XWAYLAND_INTERFACE | 21 | #define KWIN_XWL_XWAYLAND_INTERFACE | ||
22 | 22 | | |||
23 | #include <kwinglobals.h> | 23 | #include <kwinglobals.h> | ||
24 | 24 | | |||
25 | #include <QObject> | 25 | #include <QObject> | ||
26 | #include <QPoint> | ||||
26 | 27 | | |||
27 | namespace KWin | 28 | namespace KWin | ||
28 | { | 29 | { | ||
30 | class Toplevel; | ||||
31 | | ||||
32 | namespace Xwl | ||||
33 | { | ||||
34 | enum class DragEventReply { | ||||
35 | // event should be ignored by the filter | ||||
36 | Ignore, | ||||
37 | // event is filtered out | ||||
38 | Take, | ||||
39 | // event should be handled as a Wayland native one | ||||
40 | Wayland, | ||||
41 | }; | ||||
42 | } | ||||
29 | 43 | | |||
30 | class KWIN_EXPORT XwaylandInterface : public QObject | 44 | class KWIN_EXPORT XwaylandInterface : public QObject | ||
31 | { | 45 | { | ||
32 | Q_OBJECT | 46 | Q_OBJECT | ||
33 | public: | 47 | public: | ||
34 | static XwaylandInterface *self(); | 48 | static XwaylandInterface *self(); | ||
35 | 49 | | |||
50 | virtual Xwl::DragEventReply dragMoveFilter(Toplevel *target, QPoint pos) = 0; | ||||
51 | | ||||
36 | protected: | 52 | protected: | ||
37 | explicit XwaylandInterface(QObject *parent = nullptr); | 53 | explicit XwaylandInterface(QObject *parent = nullptr); | ||
38 | virtual ~XwaylandInterface(); | 54 | virtual ~XwaylandInterface(); | ||
39 | }; | 55 | }; | ||
40 | 56 | | |||
41 | inline XwaylandInterface *xwayland() { | 57 | inline XwaylandInterface *xwayland() { | ||
42 | return XwaylandInterface::self(); | 58 | return XwaylandInterface::self(); | ||
43 | } | 59 | } | ||
44 | 60 | | |||
45 | } | 61 | } | ||
46 | 62 | | |||
47 | #endif | 63 | #endif |