Debian Codegraph @

wayland/qtwayland-dev/5.11.3/QtWaylandClient/private/qwaylandabstractdecoration_p.h

raw symbols SCIP
1 // Copyright (C) 2017 Robin Burchell <[email protected]>
2 // Copyright (C) 2019 The Qt Company Ltd.
3 // SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5 #ifndef QWAYLANDABSTRACTDECORATION_H
6 #define QWAYLANDABSTRACTDECORATION_H
7
8 //
9 // W A R N I N G
10 // -------------
11 //
12 // This file is not part of the Qt API. It exists purely as an
13 // implementation detail. This header file may change from version to
14 // version without notice, or even be removed.
15 //
16 // We mean it.
17 //
18
19 #include <QtCore/QMargins>
20 #include <QtCore/QPointF>
21 #include <QtGui/QGuiApplication>
22 #include <QtGui/QCursor>
23 #include <QtGui/QColor>
24 #include <QtGui/QStaticText>
25 #include <QtGui/QImage>
26 #include <QtWaylandClient/qtwaylandclientglobal.h>
27
28 #include <wayland-client.h>
29
30 #include <QtCore/QDebug>
31
32 QT_BEGIN_NAMESPACE
33
34 class QWindow;
35 class QPaintDevice;
36 class QPainter;
37 class QEvent;
38
39 namespace QtWaylandClient {
40
41 class QWaylandScreen;
42 class QWaylandWindow;
43 class QWaylandInputDevice;
44 class QWaylandAbstractDecorationPrivate;
45
46 class Q_WAYLAND_CLIENT_EXPORT QWaylandAbstractDecoration : public QObject
47 {
48 Q_OBJECT
49 Q_DECLARE_PRIVATE(QWaylandAbstractDecoration)
50 public:
51 QWaylandAbstractDecoration();
52 ~QWaylandAbstractDecoration() override;
53
54 void setWaylandWindow(QWaylandWindow *window);
55 QWaylandWindow *waylandWindow() const;
56
57 void update();
58 bool isDirty() const;
59
60 virtual QMargins margins() const = 0;
61 QWindow *window() const;
62 const QImage &contentImage();
63
64 virtual bool handleMouse(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global,Qt::MouseButtons b,Qt::KeyboardModifiers mods) = 0;
65 virtual bool handleTouch(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global, Qt::TouchPointState state, Qt::KeyboardModifiers mods) = 0;
66
67 protected:
68 virtual void paint(QPaintDevice *device) = 0;
69
70 void setMouseButtons(Qt::MouseButtons mb);
71
72 void startResize(QWaylandInputDevice *inputDevice,enum wl_shell_surface_resize resize, Qt::MouseButtons buttons);
73 void startMove(QWaylandInputDevice *inputDevice, Qt::MouseButtons buttons);
74
75 bool isLeftClicked(Qt::MouseButtons newMouseButtonState);
76 bool isLeftReleased(Qt::MouseButtons newMouseButtonState);
77 };
78
79 }
80
81 QT_END_NAMESPACE
82
83 #endif // QWAYLANDABSTRACTDECORATION_H