Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qwaylandabstractdecoration_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 Robin Burchell <robin.burchell@viroteck.net>
2// Copyright (C) 2019 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR 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 <QtGui/QEventPoint>
27#include <QtWaylandClient/qtwaylandclientglobal.h>
28
29#include <QtCore/QDebug>
30#include <QtCore/private/qglobal_p.h>
31
33
34class QWindow;
35class QPaintDevice;
36class QPainter;
37class QEvent;
38
39namespace QtWaylandClient {
40
41class QWaylandScreen;
42class QWaylandWindow;
43class QWaylandInputDevice;
44class QWaylandAbstractDecorationPrivate;
45
46class Q_WAYLANDCLIENT_EXPORT QWaylandAbstractDecoration : public QObject
47{
49 Q_DECLARE_PRIVATE(QWaylandAbstractDecoration)
50public:
54 ShadowsOnly
55 };
56
59
60 void setWaylandWindow(QWaylandWindow *window);
61 QWaylandWindow *waylandWindow() const;
62
63 void update();
64 bool isDirty() const;
65
66 virtual QMargins margins(MarginsType marginsType = Full) const = 0;
67
68 QWindow *window() const;
69 const QImage &contentImage();
70
71 virtual bool handleMouse(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global,Qt::MouseButtons b,Qt::KeyboardModifiers mods) = 0;
72 virtual bool handleTouch(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global, QEventPoint::State state, Qt::KeyboardModifiers mods) = 0;
73
74protected:
75 virtual void paint(QPaintDevice *device) = 0;
76
77 void setMouseButtons(Qt::MouseButtons mb);
78
79 void startResize(QWaylandInputDevice *inputDevice, Qt::Edges edges, Qt::MouseButtons buttons);
80 void startMove(QWaylandInputDevice *inputDevice, Qt::MouseButtons buttons);
81 void showWindowMenu(QWaylandInputDevice *inputDevice);
82
83 bool isLeftClicked(Qt::MouseButtons newMouseButtonState);
84 bool isRightClicked(Qt::MouseButtons newMouseButtonState);
85 bool isLeftReleased(Qt::MouseButtons newMouseButtonState);
86};
87
88}
89
91
92#endif // QWAYLANDABSTRACTDECORATION_H
IOBluetoothDevice * device
State
Specifies the state of this event point.
Definition qeventpoint.h:48
\inmodule QtCore
Definition qcoreevent.h:45
\inmodule QtGui
Definition qimage.h:37
\inmodule QtCore
Definition qmargins.h:24
\inmodule QtCore
Definition qobject.h:103
The QPainter class performs low-level painting on widgets and other paint devices.
Definition qpainter.h:46
\inmodule QtCore\reentrant
Definition qpoint.h:217
\inmodule QtGui
Definition qwindow.h:63
virtual bool handleTouch(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global, QEventPoint::State state, Qt::KeyboardModifiers mods)=0
virtual QMargins margins(MarginsType marginsType=Full) const =0
virtual void paint(QPaintDevice *device)=0
virtual bool handleMouse(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global, Qt::MouseButtons b, Qt::KeyboardModifiers mods)=0
else opt state
[0]
Combined button and popup list for selecting options.
GLboolean GLboolean GLboolean b
#define Q_OBJECT
aWidget window() -> setWindowTitle("New Window Title")
[2]
QJSValue global