KWin
Loading...
Searching...
No Matches
drag.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: 2019 Roman Gilg <subdiff@gmail.com>
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9#pragma once
10
11#include <QObject>
12#include <QPoint>
13
14#include <xcb/xcb.h>
15
16namespace KWin
17{
18class Window;
19
20namespace Xwl
21{
22enum class DragEventReply;
23
27class Drag : public QObject
28{
29 Q_OBJECT
30
31public:
32 explicit Drag(QObject *parent = nullptr);
33 ~Drag() override;
34
35 static void sendClientMessage(xcb_window_t target, xcb_atom_t type, xcb_client_message_data_t *data);
36
37 virtual bool handleClientMessage(xcb_client_message_event_t *event) = 0;
38 virtual DragEventReply moveFilter(Window *target) = 0;
39
40Q_SIGNALS:
41 void finish(Drag *self);
42
43private:
44 Q_DISABLE_COPY(Drag)
45};
46
47} // namespace Xwl
48} // namespace KWin
Drag(QObject *parent=nullptr)
Definition drag.cpp:19
void finish(Drag *self)
virtual DragEventReply moveFilter(Window *target)=0
virtual bool handleClientMessage(xcb_client_message_event_t *event)=0
static void sendClientMessage(xcb_window_t target, xcb_atom_t type, xcb_client_message_data_t *data)
Definition drag.cpp:28
~Drag() override
Definition drag.cpp:24
Session::Type type
Definition session.cpp:17